query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7247938", "0.7202959", "0.7196692", "0.71785426", "0.7108701", "0.70417315", "0.70402646", "0.70132303", "0.7011096", "0.69826573", "0.6946997", "0.69409776", "0.6935366", "0.69191027", "0.69191027", "0.6893088", "0.6885528", "0.6877815", "0.68763673", "0.686437", "0.686437", "0.686437", "0.686437", "0.68540627", "0.68493474", "0.68218297", "0.68192774", "0.68153644", "0.68153644", "0.6815331", "0.6808357", "0.680292", "0.68001926", "0.6793566", "0.6790724", "0.6790344", "0.67855906", "0.67613244", "0.67596716", "0.67503935", "0.674636", "0.674636", "0.6743352", "0.6741959", "0.6728363", "0.6725486", "0.67250663", "0.67250663", "0.67230934", "0.67131525", "0.67084885", "0.67067933", "0.6701798", "0.6700826", "0.6699366", "0.6696747", "0.66889644", "0.6685846", "0.6685846", "0.6684866", "0.6682888", "0.66810936", "0.6679739", "0.6670028", "0.6669299", "0.6664124", "0.6659152", "0.6659152", "0.6659152", "0.6658369", "0.66567385", "0.66567385", "0.66567385", "0.66540265", "0.6653653", "0.66526854", "0.66509074", "0.66492856", "0.6648748", "0.6648541", "0.6648053", "0.66467965", "0.66467464", "0.66459095", "0.66453874", "0.66439164", "0.6641125", "0.66372454", "0.663597", "0.6634331", "0.6634331", "0.6634331", "0.66339976", "0.6631227", "0.6630643", "0.6628774", "0.66286343", "0.66267", "0.6621867", "0.6620775", "0.6620775" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement switch (item.getItemId()) { case android.R.id.home: // app icon in action bar clicked; goto parent activity. this.finish(); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.790433", "0.78052884", "0.7766116", "0.77269244", "0.7631314", "0.76214564", "0.75844425", "0.7530182", "0.748751", "0.7438209", "0.74215984", "0.74033666", "0.7391367", "0.7386547", "0.7378906", "0.73700386", "0.73624307", "0.73555857", "0.734534", "0.7341001", "0.7329573", "0.7328464", "0.732542", "0.73187584", "0.73161364", "0.73133296", "0.730374", "0.730374", "0.7301578", "0.7297925", "0.72935253", "0.7286381", "0.728296", "0.7280917", "0.7278273", "0.72595716", "0.72595716", "0.72595716", "0.72594506", "0.7258975", "0.7249544", "0.7224888", "0.7219197", "0.7216406", "0.72040117", "0.7201528", "0.72002995", "0.71931463", "0.7184822", "0.7177731", "0.7168134", "0.71670145", "0.71535766", "0.7152848", "0.71356684", "0.7134476", "0.7134476", "0.7128907", "0.7128605", "0.7123538", "0.7122872", "0.7122704", "0.7121557", "0.71169186", "0.71169186", "0.71169186", "0.71169186", "0.7116654", "0.71165264", "0.71160054", "0.71144056", "0.71118295", "0.71092284", "0.7108203", "0.7104891", "0.7099518", "0.7097655", "0.7095719", "0.7093119", "0.7093119", "0.7085876", "0.70827055", "0.70806557", "0.7079835", "0.7073702", "0.70676506", "0.706124", "0.70596653", "0.7059546", "0.70508295", "0.7037259", "0.7037259", "0.70355344", "0.70347226", "0.70347226", "0.70325696", "0.7030457", "0.70290285", "0.7018263" ]
0.7457498
10
Initialize the contents of the frame.
private void initialize() { setFrame(new JFrame()); getFrame().setBounds(100, 100, 271, 210); JPanel panel = new JPanel(); textField = new JTextField(); textField.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent arg0) { } @Override public void keyReleased(KeyEvent arg0) { } @Override public void keyPressed(KeyEvent arg0) { if (arg0.getKeyCode() == 10) { code = textField.getText(); frame.setVisible(false); } else if (arg0.getKeyCode() == 27){ cancelled = true; frame.setVisible(false); } } }); textField.setColumns(10); JButton btnNewButton = new JButton("Go"); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { code = textField.getText(); frame.setVisible(false); } }); JButton button = new JButton("Cancel"); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { cancelled = true; frame.setVisible(false); } }); GroupLayout groupLayout = new GroupLayout(getFrame().getContentPane()); groupLayout.setHorizontalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addGroup(groupLayout.createParallelGroup(Alignment.LEADING, false) .addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup() .addComponent(button, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE)) .addComponent(panel, GroupLayout.PREFERRED_SIZE, 237, GroupLayout.PREFERRED_SIZE)) .addContainerGap()) .addGroup(groupLayout.createSequentialGroup() .addComponent(textField, GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE) .addGap(8)))) ); groupLayout.setVerticalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addContainerGap() .addComponent(panel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(textField, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE) .addGap(13) .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) .addComponent(button) .addComponent(btnNewButton)) .addGap(0, 0, Short.MAX_VALUE)) ); JTextPane txtpnNoAlphabeticalPrefix = new JTextPane(); txtpnNoAlphabeticalPrefix.setEditable(false); txtpnNoAlphabeticalPrefix.setText("No alphabetical prefix on 0 level part,\r\nplease supply 2nd - 4th characters of\r\nproduct M-BOM (Eg \"830\" for A830E)."); panel.add(txtpnNoAlphabeticalPrefix); getFrame().getContentPane().setLayout(groupLayout); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1100, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tsetUIComponents();\n\t\tsetControllers();\n\n\t}", "private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"Media Inventory\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"BirdSong\");\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\tframe.setBounds(100, 100, 400, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tabc = new BirdPanel();\n\t\ttime = new TimePanel();\n\t\tgetContentPane().setLayout(new BoxLayout(frame, BoxLayout.Y_AXIS));\n\n\t\tframe.getContentPane().add(abc, BorderLayout.NORTH);\n\t\tframe.getContentPane().add(time, BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}", "public Frame() {\n initComponents();\n }", "public Frame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "protected HFrame(){\n\t\tinit();\n\t}", "private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }", "private void initialize() {\r\n\t\t//setFrame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(125,175, 720, 512);\r\n\t\tframe.setTitle(\"Periodic Table\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "private void initFrame() {\n setLayout(new BorderLayout());\n }", "private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}", "public FrameControl() {\n initComponents();\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "public MainFrame() {\n initComponents();\n \n }", "private void init(Element frame) {\n\t\tthis.frameWidth = Integer.parseInt(frame.attributeValue(\"width\"));\n\t\tthis.frameHeight = Integer.parseInt(frame.attributeValue(\"height\"));\n\t\tthis.paddle = Integer.parseInt(frame.attributeValue(\"paddle\"));\n\t\tthis.size = Integer.parseInt(frame.attributeValue(\"size\"));\n\t}", "public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }", "public internalFrame() {\r\n initComponents();\r\n }", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "public Mainframe() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }", "private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}", "public void initializeFrame() {\n frame.getContentPane().removeAll();\n createComponents(frame.getContentPane());\n// frame.setSize(new Dimension(1000, 600));\n }", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"DB Filler\");\n\t\tframe.setBounds(100, 100, 700, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdbc = new DataBaseConnector();\n\t\tcreateFileChooser();\n\n\t\taddTabbedPane();\n\t\tsl_panel = new SpringLayout();\n\t\taddAddFilePanel();\n\t}", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "public mainframe() {\n initComponents();\n }", "public FrameDesign() {\n initComponents();\n }", "public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }", "public JGSFrame() {\n\tsuper();\n\tinitialize();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n try {\n initComponents();\n initElements();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage());\n }\n }", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }", "public SMFrame() {\n initComponents();\n updateComponents();\n }", "private void initialize() {\n m_frame = new JFrame(\"Video Recorder\");\n m_frame.setResizable(false);\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n m_frame.setLayout(new BorderLayout());\n m_frame.add(buildContentPanel(), BorderLayout.CENTER);\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));\n JButton startButton = new JButton(\"Start\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n listen();\n }\n });\n buttonPanel.add(startButton);\n\n m_connectionLabel = new JLabel(\"Disconnected\");\n m_connectionLabel.setOpaque(true);\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));\n m_connectionLabel.setPreferredSize(new Dimension(100, 26));\n m_connectionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n buttonPanel.add(m_connectionLabel);\n\n m_frame.add(buttonPanel, BorderLayout.PAGE_END);\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Play\");\n\t\tbtnNewButton.setFont(new Font(\"Bodoni 72\", Font.BOLD, 13));\n\t\tbtnNewButton.setBounds(frame.getWidth() / 2 - 60, 195, 120, 30);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Space Escape\");\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\tlblNewLabel.setFont(new Font(\"Bodoni 72\", Font.BOLD, 24));\n\t\tlblNewLabel.setBounds(frame.getWidth() / 2 - 60, 30, 135, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\n\t\tlblNewLabel_1.setBounds(0, 0, frame.getWidth(), frame.getHeight());\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t}", "private void initializeFrame()\r\n\t{\r\n\t\tthis.setResizable(false);\r\n\r\n\t\tsetSize(DIMENSIONS); // set the correct dimensions\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetLayout( new GridLayout(1,1) );\r\n\t}", "private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}", "public MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "public launchFrame() {\n \n initComponents();\n \n }", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "public PilaFrame() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 900, 900);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tgame = new Game();\n\t\t\n\t\tGameTable puzzle = new GameTable(game.getPuzzle());\n\t\tpuzzle.setBounds(100, 100, 700, 700);\n\t\t\n\t\tframe.add(puzzle);\n\t\t\n\t\tSystem.out.println(\"SAD\");\n\t\t\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tPanel mainFramePanel = new Panel();\r\n\t\tmainFramePanel.setBounds(10, 10, 412, 235);\r\n\t\tframe.getContentPane().add(mainFramePanel);\r\n\t\tmainFramePanel.setLayout(null);\r\n\t\t\r\n\t\tfinal TextField textField = new TextField();\r\n\t\ttextField.setBounds(165, 62, 79, 24);\r\n\t\tmainFramePanel.add(textField);\r\n\t\t\r\n\t\tButton changeTextButt = new Button(\"Change Text\");\r\n\t\tchangeTextButt.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttextField.setText(\"Domograf\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tchangeTextButt.setBounds(165, 103, 79, 24);\r\n\t\tmainFramePanel.add(changeTextButt);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t}", "StudentFrame() {\n \tgetContentPane().setFont(new Font(\"Times New Roman\", Font.PLAIN, 11));\n s1 = null; // setting to null\n initializeComponents(); // causes frame components to be initialized\n }", "public NewFrame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public SerialCommFrame()\n {\n super();\n initialize();\n }", "public LoginFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public BaseFrame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "public MercadoFrame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(X_FRAME, Y_FRAME, WIDTH_FRAME, HEIGHT_FRAME);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnAddSong = new JButton(\"Add song\");\r\n\t\tbtnAddSong.setBounds(X_BTN, Y_ADDSONG, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddSong);\r\n\t\t\r\n\t\tJTextPane txtpnBlancoYNegro = new JTextPane();\r\n\t\ttxtpnBlancoYNegro.setText(\"Blanco y negro\\r\\nThe Spectre\\r\\nGirasoles\\r\\nFaded\\r\\nTu Foto\\r\\nEsencial\");\r\n\t\ttxtpnBlancoYNegro.setBounds(X_TXT, Y_TXT, WIDTH_TXT, HEIGHT_TXT);\r\n\t\tframe.getContentPane().add(txtpnBlancoYNegro);\r\n\t\t\r\n\t\tJLabel lblSongs = new JLabel(\"Songs\");\r\n\t\tlblSongs.setBounds(X_LBL, Y_LBL, WIDTH_LBL, HEIGHT_LBL);\r\n\t\tframe.getContentPane().add(lblSongs);\r\n\t\t\r\n\t\tJButton btnAddAlbum = new JButton(\"Add album\");\r\n\t\tbtnAddAlbum.setBounds(X_BTN, Y_ADDALBUM, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddAlbum);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}", "public holdersframe() {\n initComponents();\n }", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "public void init() {\n\t\tsetSize(500,300);\n\t}", "public addStFrame() {\n initComponents();\n }", "public JFrame() {\n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"View Report\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJButton backButton = new JButton(\"Back\");\n\t\tbackButton.setBounds(176, 227, 89, 23);\n\t\tframe.getContentPane().add(backButton);\n\t\tbackButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBounds(50, 30, 298, 173);\n\t\tframe.getContentPane().add(textArea);\n\t\ttextArea.append(control.seeReport());\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblSubmission = new JLabel(\"Submission\");\n\t\tlblSubmission.setForeground(Color.WHITE);\n\t\tlblSubmission.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 16));\n\t\tlblSubmission.setBounds(164, 40, 83, 14);\n\t\tframe.getContentPane().add(lblSubmission);\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title:\");\n\t\tlblTitle.setForeground(Color.WHITE);\n\t\tlblTitle.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblTitle.setBounds(77, 117, 41, 14);\n\t\tframe.getContentPane().add(lblTitle);\n\t\t\n\t\tJLabel lblPath = new JLabel(\"Path:\");\n\t\tlblPath.setForeground(Color.WHITE);\n\t\tlblPath.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblPath.setBounds(85, 155, 33, 14);\n\t\tframe.getContentPane().add(lblPath);\n\t\t\n\t\ttitle = new JTextField();\n\t\ttitle.setBounds(128, 116, 197, 20);\n\t\tframe.getContentPane().add(title);\n\t\ttitle.setColumns(10);\n\t\t\n\t\tpath = new JTextField();\n\t\tpath.setBounds(128, 154, 197, 20);\n\t\tframe.getContentPane().add(path);\n\t\tpath.setColumns(10);\n\t\t\n\t\tbtnSubmit = new JButton(\"Submit\");\n\t\tbtnSubmit.setBackground(Color.BLACK);\n\t\tbtnSubmit.setForeground(Color.WHITE);\n\t\tbtnSubmit.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tbtnSubmit.setBounds(158, 210, 89, 23);\n\t\tframe.getContentPane().add(btnSubmit);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}", "public FrameIntroGUI() {\n\t\ttry {\n\t\t\tjbInit();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblCoisa = new JLabel(\"Coisa\");\n\t\tlblCoisa.setBounds(10, 11, 46, 14);\n\t\tframe.getContentPane().add(lblCoisa);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(39, 8, 86, 20);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t}", "private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}" ]
[ "0.7769806", "0.75645775", "0.744096", "0.7367939", "0.7366207", "0.7356814", "0.73127955", "0.73093945", "0.72973347", "0.7296576", "0.7276723", "0.72713083", "0.72694886", "0.72694886", "0.72140867", "0.71808106", "0.71675664", "0.7140664", "0.71397793", "0.7125805", "0.7105894", "0.70999616", "0.7091813", "0.7081309", "0.706696", "0.7062362", "0.7060244", "0.7058889", "0.7050907", "0.70430565", "0.69948846", "0.6977318", "0.6971185", "0.6955329", "0.69376785", "0.69292814", "0.69285643", "0.69244397", "0.6921545", "0.6919632", "0.6913407", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.69102097", "0.6900884", "0.6889535", "0.6885302", "0.6872394", "0.6869779", "0.68671405", "0.6864778", "0.68621385", "0.68579245", "0.68535745", "0.6852263", "0.68143743", "0.6813034", "0.68074334", "0.67975104", "0.67918676", "0.67797387", "0.6763989", "0.6746957", "0.67307526", "0.6716625", "0.6711505", "0.67049205", "0.6696294", "0.6691563", "0.6690699", "0.6689472", "0.66709447", "0.66590154", "0.6648341", "0.6640382", "0.66401315", "0.6638011", "0.66368794", "0.66340685", "0.6624794", "0.66244256", "0.6610577", "0.66076916", "0.6600162", "0.65993017", "0.65894395", "0.65860456", "0.6584732", "0.6573833", "0.6573252", "0.65701455", "0.6559242" ]
0.0
-1
Gets the i th table being selected. Clients should treat the returned value as immutable.
public TableIdentifier getFrom(int i) { TableIdentifier[] tableIDs = _from.toTableArray(); return (tableIDs[i]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSelectedTable() {\n\t\treturn selectedTable;\n\t}", "public Table getSelectedTable() {\n Integer id = (Integer)super.getSelectedItem();\n if (id == null) {\n return null;\n }\n try {\n return tableHome.getTable(id.intValue());\n }\n catch (PersistenceException ex) {\n // Cas impossible : Le model contient obligatoirement des Id valide\n ex.printStackTrace();\n return null;\n }\n }", "private JXTable getSelectedTable() {\n JScrollPane scrollPane = (JScrollPane) closeableTabbedPane1.getSelectedComponent();\n\n return (JXTable) scrollPane.getViewport().getView();\n }", "public Table getTable() { return this.table; }", "public Table getTable() { \n\t\treturn this.table; \n\t}", "public String getTable() {\n return table;\n }", "public int getValue()\n { \n return table.get(getSelectedItem());\n }", "public String getTable()\n {\n return table;\n }", "public String getTable() {\n return table;\n }", "public final Table getTable()\n {\n return table;\n }", "public Table getTable() {\n return table;\n }", "public String getSelectedTableType() {\n\t\treturn selectedTableType;\n\t}", "public Table getTable() {\n return table;\n }", "TableModel getSelected() {\r\n // get the list of selected index\r\n int[] selected = plots[0][0].fitnessTable.getSelectedRows();\r\n // get the population table\r\n Population p = IGAFitnessPlotView.this.currentPop;\r\n Table t = p.getTable();\r\n\r\n return new SelectedTableModel(t, selected);\r\n }", "public Table getTable() {\n\t\treturn table;\n\t}", "public int getSelectedLayer ()\n {\n return _table.getSelectedRow();\n }", "public TablePanel getTable() \n\t{\n\t\treturn table;\n\t}", "int getTableID() {\r\n return table_id;\r\n }", "public int getTableNumber() {\r\n\t\treturn tableNumber;\r\n\t}", "public JTable getTable() { return viewTable;}", "public TableReference getTable() {\r\n return table;\r\n }", "public TableUI getTableUI() {\n return tableUI;\n }", "public int getId() {\n return tableId;\n }", "TableType getTableType()\n {\n return tableType;\n }", "public TableInfo getTableInfo() {\r\n\t\treturn ti;\r\n\t}", "public int getTableID() {\r\n\t\treturn tableID;\r\n\t}", "Table getTable();", "public String getTableId() {\n return this.tableId;\n }", "public String getTableId() {\n return this.tableId;\n }", "private HashMap<Long, String> getTable() {\n return table;\n }", "public TableInfoDTO getSelectedTableInfoField() {\n\t\treturn tableInfoSelectedField;\n\t}", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public Ward getSelected() {\n\t\treturn table.getSelectionModel().getSelectedItem();\n\t}", "public int getSirinaTable() {\n\t\treturn this.sirinaTable;\n\t}", "public TableIdentity getTableIdentity() {\r\n\t\treturn tableId;\r\n\t}", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "public static TableLayout getTable(){return table;}", "public String table() {\n return tableName;\n }", "public String table() {\n return tableName;\n }", "protected final String immutableGetTableName()\n {\n return m__strTableName;\n }", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "public String getTableCode() {\n return tableCode;\n }", "private DefaultTableModel getTableModel() {\n return (DefaultTableModel) constantsTable.getModel();\n }", "private String getTableName() {\n return this.tableName;\n }", "public final String getTableId() {\n\t\treturn tableId;\n\t}", "public int getVisinaTable() {\n\t\treturn this.visinaTable;\n\t}", "public Long getTableId() {\n return tableId;\n }", "public JTable getTableau() {\n\t\treturn this.liste;\n\t}", "public XSSFTable getTable() {\n return table;\n }", "public String getTableKey() {\n return tableKey;\n }", "public JTable getJTable()\n\t{\n\t\treturn jTable1;\n\t}", "protected Object getTableValue()\n\t\t{\n\t\t\treturn Value ;\n\t\t}", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "private Rubrica getTableRubricaSeleccionada() {\n if (tbRubrica != null) {\n List<Rubrica> tabela = tbRubrica.getSelectionModel().getSelectedItems();\n if (tabela.size() == 1) {\n final Rubrica rubricaSeleccionada = tabela.get(0);\n return rubricaSeleccionada;\n }\n }\n return null;\n }", "public Double getTableBase() {\r\n return tableBase;\r\n }", "public javax.accessibility.AccessibleTable getAccessibleTable() {\n return this;\n }", "public String getTarget_table() {\n return target_table;\n }", "protected int getTableCondtion()\n\t\t{\n\t\t\treturn Condtion ;\n\t\t}", "public Iterator getIterator(int i) {\r\n return table[i].iterator();\r\n }", "public Table getTables(int i) {\r\n\t\treturn tables.get(i);\r\n\t}", "TableId table();", "@Override\n\tpublic long getTableId() {\n\t\treturn _expandoColumn.getTableId();\n\t}", "public long getId() {\n return ctTableColumn.getId();\n }", "public int getSelectedRow()\n {\n \treturn this.getSelectedIndex();\n }", "public JTable getJTable() { return jTable; }", "public int getNumTable() {\n\t\treturn numTable;\n\t}", "public TableViewer getTableViewer() {\n return viewer;\n }", "public TableReference getFromTable() {\r\n return fromTable;\r\n }", "public JTable getJTable() {return jTable1;}", "public Balanza GetMAterialFromTable() {\n int FilaSelec = table.getSelectedRow();\n if (FilaSelec > -1) {\n Balanza seleted = list.get(FilaSelec);\n return seleted;// esta funcion me retorn es la posicion \n } else {\n JOptionPane.showMessageDialog(this, \"Fila No seleccionada \");\n }\n return null;\n }", "public javax.accessibility.AccessibleRole getAccessibleRole() {\n return javax.accessibility.AccessibleRole.TABLE;\n }", "static int getIndexSelected() {\n return indexSelected;\n }", "public int SelectTable(Integer space_id) {\n\t\treturn postDao.SelectTable(space_id);\r\n\t}", "public Element getElement() {\n return table;\n }", "public HTMLTableSectionElement getElementTablaTablero() { return this.$element_TablaTablero; }", "public String getTablename() {\n return tablename;\n }", "Object getTables();", "public TableKey getKey() {\n \treturn key;\n }", "public MyTable getMyTable() {\n\t\treturn myTable;\n\t}", "public Cliente GetMAterialFromTableCliente() {\n int FilaSelec = table.getSelectedRow();\n if (FilaSelec > -1) {\n Cliente seleted = lista.get(FilaSelec);\n return seleted;// esta funcion me retorn es la posicion \n } else {\n JOptionPane.showMessageDialog(this, \"Fila No seleccionada \");\n }\n return null;\n }", "@Override\n\tpublic String getTableName(int arg0) throws SQLException {\n\t\treturn tMeta[0].tableName();\n\t}", "public int[] getSelectedAccessibleRows() {\n try {\n return unoAccessibleTable.getSelectedAccessibleRows();\n } catch (com.sun.star.uno.RuntimeException e) {\n return null;\n }\n }", "public abstract String getCurrentRow();", "public Long getTABLE_ID() {\n return TABLE_ID;\n }", "public Table select(int teableSeq) throws Exception {\n\t\treturn tableDao.select(teableSeq);\r\n\t}", "public WebElement Table1() {\r\n\t\treturn SeleniumUtil.getVisibileWebElement(d, \"Table_T\", \"CashFlow\", null);\r\n\t}", "public String getTableName() {\n return this.tableName;\n }", "public TapTable findOneTable(String tableName);", "String getTableName();", "public String getTableName() {\n return (String) getAttributeInternal(TABLENAME);\n }", "@Override\n\tpublic Collection<Colors> getCurrentTable() {\n\t\treturn null;\n\t}", "public String getNomTable();", "public String getTableName() {\n return this.tableName;\n }", "public String getTableName() {\n return this.tableName;\n }", "public int getSelected() {\n \t\treturn selected;\n \t}", "Table getTables(int index);", "public final String getTableName() {\n\t\treturn wTableName;\n\t}" ]
[ "0.76087594", "0.750889", "0.71069646", "0.6748065", "0.67259413", "0.6701194", "0.6677308", "0.66739905", "0.66729474", "0.6667206", "0.66484064", "0.6636797", "0.66308707", "0.6614075", "0.65729576", "0.656984", "0.6521678", "0.64640516", "0.6407047", "0.6377046", "0.63562596", "0.63447374", "0.6329517", "0.6299996", "0.6281833", "0.6274312", "0.62717634", "0.62654763", "0.62654763", "0.6254303", "0.62220013", "0.62073445", "0.6135474", "0.6121465", "0.61109984", "0.61016655", "0.6092423", "0.6081355", "0.6081355", "0.6077482", "0.6056182", "0.6053133", "0.6039495", "0.6022013", "0.601934", "0.60166055", "0.6010143", "0.6000234", "0.59935987", "0.5991375", "0.5990923", "0.5982005", "0.5964668", "0.5964668", "0.5964668", "0.5964668", "0.5947169", "0.59327483", "0.59097725", "0.59071416", "0.58888173", "0.58720857", "0.58696383", "0.5863341", "0.58579093", "0.58493125", "0.5836716", "0.58282924", "0.5814152", "0.5811866", "0.581162", "0.5809094", "0.58051157", "0.5804943", "0.5802145", "0.5799877", "0.57891685", "0.57481337", "0.57448447", "0.5724689", "0.5713569", "0.57085884", "0.57055694", "0.57014513", "0.57001555", "0.5687509", "0.56838274", "0.5682333", "0.5664111", "0.5661512", "0.5655118", "0.5646887", "0.56441873", "0.56408095", "0.5639409", "0.5628074", "0.5628074", "0.5616144", "0.5609593", "0.56092197" ]
0.6344268
22
Gets the number of tables being from.
public int getFromCount() { return _from.getTableCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTablesCount();", "public int getTablesCount() {\n if (tablesBuilder_ == null) {\n return tables_.size();\n } else {\n return tablesBuilder_.getCount();\n }\n }", "private int countTables() {\r\n\tint result = -1;\r\n\r\n\tStatement stat = null;\r\n\tResultSet rs = null;\r\n\ttry {\r\n\t stat = conn.createStatement();\r\n\r\n\t rs = stat\r\n\t\t .executeQuery(\"SELECT count(1) FROM sqlite_master where name not like '%sequence%'\");\r\n\r\n\t if (rs.next()) {\r\n\t\tint count = rs.getInt(1);\r\n\r\n\t\tif (count > 0) {\r\n\t\t result = count;\r\n\t\t}\r\n\t }\r\n\t} catch (Exception e) {\r\n\t // nothing todo here\r\n\t} finally {\r\n\t Cleanup(stat, rs);\r\n\t}\r\n\r\n\treturn result;\r\n }", "@Override\n public int getTablesCount() {\n return tables_.size();\n }", "public int getNumTable() {\n\t\treturn numTable;\n\t}", "private static int getTableCount(ISession session, String tableName) {\n int result = -1;\n ResultSet rs = null;\n try {\n String sql = \"select count(*) from \"+tableName; \n rs = executeQuery(session, sql);\n if (rs.next()) {\n result = rs.getInt(1);\n }\n } catch (Exception e) {\n /* Do Nothing - this can happen when the table doesn't exist */\n } finally {\n SQLUtilities.closeResultSet(rs, true);\n }\n return result; \n }", "public int getNumEntries(String tableName){\n\t\tint numEntries = -9999;\n\t\ttry{\n\t\t\tpst = con.prepareStatement(\"SELECT COUNT(*) FROM \" + tableName);\n\t\t\trs = pst.executeQuery();\n\t\t if (rs.next()) // COUNT(*) query should only return 1 row of result\n\t\t numEntries = Integer.parseInt(rs.getString(1));\n }catch(SQLException ex){\n \tLogger lgr = Logger.getLogger(FillRelations.class.getName());\n \tlgr.log(Level.WARNING, ex.getMessage(), ex);\n }\n return numEntries;\n\t}", "@Override\n\t\tpublic int getRowCount() \n\t\t{\n\t\t\treturn tables.size();\n\t\t}", "private int getRowCount(String table) {\n return getIntFromQuery(\"SELECT COUNT(*) from \" + table, null);\n }", "int tableSize();", "public static int getNumberOfRowsTBLSERVERS() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt4 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt4.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // SQL Count query\r\n\t\trownumber.next();\r\n\r\n\t\tint rnum = rownumber.getInt(1);\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return value\r\n\r\n\t}", "public int tableLength() {\n\t\treturn table.length;\n\t}", "public int getNumberOfEntries()\r\n\t{\r\n\t\treturn tr.size();\r\n\t}", "private int getTableLength() {\n\t\tif (proposalList == null)\n\t\t\treturn 0;\n\t\treturn proposalList.length() + proposalList.getProviderList().size()\n\t\t\t\t+ proposalList.getTopProposalList().size();\n\t}", "public int tableSize() {\n return this.table.length;\n }", "public int getTableCount(int tableID){\n int count = -1;\n\n try {\n PreparedStatement getCount = db.getConnection()\n .prepareStatement(\"SELECT * FROM \" + DBConst.TABLE_RESERVATIONS + \" WHERE \"\n + DBConst.RESERVATIONS_COLUMN_TABLE + \" = '\" + tableID + \"'\", ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n ResultSet data = getCount.executeQuery();\n data.last();\n count = data.getRow();\n }\n catch(SQLException e) {\n e.printStackTrace();\n }\n return count;\n\n }", "int getLevelTableListCount();", "public static void main_getSize(){\n\n System.out.println(table.size());\n\n }", "public int lines( )\n {\n int lin = 0;\n\n if( table != null )\n {\n lin = table.length;\n } //end\n return(lin);\n }", "private int getJTableNumberOfRows() {\n\n\t\tint count = 0; /* create a integer object for rows count */\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\tstatement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT COUNT(*) as numberOfRows FROM invoice\");\n\t\t\tresultSet.next();\n\t\t\tcount = resultSet.getInt(\"numberOfRows\");\n\t\t\tresultSet.close();\n\t\t} // end try\n\t\tcatch (SQLException sqlException) {\n\t\t\tsqlException.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} // end catch\n\t\tfinally // ensure statement and connection are closed properly\n\t\t{\n\t\t\ttry {\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t} // end try\n\t\t\tcatch (Exception exception) {\n\t\t\t\texception.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} // end catch\n\t\t} // end finally\n\t\treturn count; /* return the result of rows count */\n\t}", "public int getLevelTableListCount() {\n return levelTableList_.size();\n }", "public int getLevelTableListCount() {\n return levelTableList_.size();\n }", "public long getTableRowCount(String tableName) throws SQLException {\n throw new UnsupportedOperationException();\n }", "int getNumberOfCachedRegionLocations(final byte[] tableName) {\n Integer key = Bytes.mapKey(tableName);\n synchronized (this.cachedRegionLocations) {\n Map<byte[], HRegionLocation> tableLocs =\n this.cachedRegionLocations.get(key);\n\n if (tableLocs == null) {\n return 0;\n }\n return tableLocs.values().size();\n }\n }", "int get_row_count(String table) {\n //table does not exist\n if (!get_table_names().contains(table) && !table.equals(\"relationship\")) {\n throw new RuntimeException(\"Table does not exist.\");\n }\n\n //maybe use select count(id) from table instead\n String sql = \"select * from \" + table;\n int count = 0;\n\n ResultSet resultSet = execute_statement(sql, true);\n try {\n while (resultSet.next()) {\n count++; //count number of entities\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n\n try {\n this.disconnect(resultSet, null, null); //disconnect from database\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return count;\n }", "public int getListCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n cursor.close();\n return cursor.getCount();\n }", "public int getTabCount() {\n\t\treturn tabMap.size();\n\t}", "public int getcount() {\n\t\tString countQuery = \"SELECT * FROM \" + DATABASE_TABLE1;\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int cnt = cursor.getCount();\n\t cursor.close();\n\t return cnt;\n\t\n\t}", "@Override\n\tpublic int getCount() throws TableException\n\t{\n\t\tAtomicInteger count = new AtomicInteger(0);\n\t\ttry\n\t\t{\n\t\t\tcountTuplesRec(protocol, count);\n\t\t}\n\t\tcatch (DatabaseException e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn count.get();\n\t}", "int getDatabasesCount();", "public static int getTableRowCount() {\n\t\treturn TABLE_ROW_COUNT;\n\t}", "int getRowsCount();", "int getCountAllRowsForTable(String tableName) throws DaoException;", "protected int countRows(String tableName) \n\t{\n\t\tint result = -1;\n\t\t\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(\"select count(*) from \" + tableName + \";\");\n\t\t\tresult = rs.getInt(rs.getRow());\n\t\t\t// freakin hell wat een @#*$@#($* werk om deze op te zoeken :/\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tSystem.out.println(\"Something went wrong counting users from Persons\");\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public int getUangCount(){\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n cursor.close();\n return cursor.getCount();\n }", "public int size() throws MPJException {\n if (table != null) {\n return table.size();\n }\n return MPJ.UNDEFINED;\n }", "public static int getTableCount(ISession session, \n String catalog,\n String schema, \n String tableName,\n int sessionType) \n throws UserCancelledOperationException\n {\n String table = getQualifiedObjectName(session, \n catalog, \n schema,\n tableName, \n sessionType);\n return getTableCount(session, table);\n }", "public int CountTable(String TableName) throws SQLException {\n int count = 0;\n Connect();\n Statement stmt = conn.createStatement();\n ResultSet r = stmt.executeQuery(\"SELECT COUNT(*) AS rowcount FROM \" + TableName);\n while (r.next()) {\n count = r.getInt(1);\n }\n r.close();\n DisConnect();\n return count;\n }", "protected int getLength(String table, String where) {\n String whereState = \"\";\n if (where != null) {\n whereState = \" WHERE \" + where;\n }\n String sql = \"SELECT COUNT(*) FROM \" + table + whereState;\n SQLiteStatement statement = database.compileStatement(sql);\n\n long count = statement.simpleQueryForLong();\n statement.close();\n return (int) count;\n }", "public static int getCountofPeople(){\n int training_set = 0;\n \n try (Connection con = DriverManager.getConnection(url, user, password)){\n String query = \"SELECT count(*) FROM \"+DATABASE_NAME+\".People;\";\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n if (rs.next()) {\n training_set = rs.getInt(1);\n }\n con.close();\n }catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return training_set;\n }", "@Override\n public int getG2HashTableNumberOfEntries() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.G2_HASH_TABLE_NUMBER_OF_ENTRIES_);\n return ((Integer)retnValue).intValue ();\n }", "int getQueriesCount();", "public int getAllCount(){\r\n\t\tString sql=\"select count(*) from board_notice\";\r\n\t\tint result=0;\r\n\t\tConnection conn=null;\r\n\t\tStatement stmt=null;\r\n\t\tResultSet rs=null;\r\n\t\ttry{\r\n\t\t\tconn=DBManager.getConnection();\r\n\t\t\tstmt=conn.createStatement();\r\n\t\t\trs=stmt.executeQuery(sql);\r\n\t\t\trs.next();\r\n\t\t\tresult=rs.getInt(1);\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBManager.close(conn, stmt, rs);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public int totalRowsCount();", "int getConnectionCount();", "public int getSize() throws SQLException{\n\t\tint counter = 0;\n\t\tStatement s = null;\n\t\ts = derbyConn.createStatement();\n\t\tResultSet results = s.executeQuery(\"select * from \"+tableName);\n\t\twhile(results.next()) {\n\t\t counter++;\n\t\t}\n\t\tsize = counter;\n\t\treturn size;\n\t}", "public int numberOfRows(){\n int numRows = (int) DatabaseUtils.queryNumEntries(db, TRACKINGS_TABLE_NAME);\n return numRows;\n }", "public int getRowCount(String tableName) throws SQLException {\n\t\tString rows = null;\n\t\ttry {\n\t\t\tif (stmt == null || con == null) {\n\t\t\t\tSystem.out.println(\"Null value found for statement or connection\");\n\t\t\t}\n\t\t\trs = stmt.executeQuery(\"SELECT count(*) from \" + tableName + \";\");\n\t\t\twhile (rs.next()) {\n\t\t\t\trows = rs.getString(1);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"SQL Exception \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(rows);\n\t\tint rowCount = Integer.parseInt(rows);\n\t\treturn rowCount;\n\t}", "public Integer getAllCount() {\n\t\tString sql=\"select count(*) from statistics\";\n\t\tint count = (int)getCount(sql);\n\t\treturn count;\n\t}", "public int numberOfRows(){\n SQLiteDatabase db = this.getReadableDatabase();\n int numRows = (int) DatabaseUtils.queryNumEntries(db,TABLE_NAME);\n return numRows;\n }", "public int getTargetTableRecordsCount(final DataSource dataSource, final String tableName) {\n List<Map<String, Object>> targetList = queryForListWithLog(dataSource, \"SELECT COUNT(1) AS count FROM \" + tableName);\n assertFalse(targetList.isEmpty());\n return ((Number) targetList.get(0).get(\"count\")).intValue();\n }", "@Override\n\tpublic int size() {\n\t\tint tamano = 0;\n\t\tint i = 0;\n\t\tIterator it = tabla.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tit.next();\n\t\t\ttamano += tabla.get(i).keySet().size();\n\t\t\ti++;\n\t\t}\n\t\treturn tamano;\n\t}", "public int bookCount() {\r\n\t\tint rowCount = jdbcTemplate.queryForInt(\"select count(1) from persone\");\r\n\t\treturn rowCount;\r\n\t}", "public int getTableNumber() {\r\n\t\treturn tableNumber;\r\n\t}", "int getRecordCount();", "public int getBaseTableLength() {\n return mem.getChar(4);\n }", "public int getNumberOfEntries();", "public long countRecords(String tableName) {\r\n\tlong result = -1;\r\n\r\n\tStatement st = null;\r\n\tResultSet rs = null;\r\n\ttry {\r\n\t st = conn.createStatement();\r\n\r\n\t rs = st.executeQuery(\"select count(1) from \" + tableName + \";\");\r\n\r\n\t if (rs.next()) {\r\n\t\tresult = rs.getLong(1);\r\n\t }\r\n\t} catch (Exception e) {\r\n\t // nothing todo here\r\n\t} finally {\r\n\t Cleanup(st, rs);\r\n\t}\r\n\r\n\treturn result;\r\n }", "public int numberOfEntries();", "int getEntryCount();", "public static int size() {\n\t\treturn anisLookup.size();\n\t}", "long getDbCount();", "public int getDatabaseSize() {\n\n\t\tString countQuery = \"SELECT * FROM \" + SONG_TABLE_NAME;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(countQuery, null);\n\t\tint cnt = cursor.getCount();\n\t\tcursor.close();\n\t\treturn cnt;\n\t}", "int getNumberOfRows() {\n lock.readLock().lock();\n try {\n return extensionPointPluginMap.rowMap().size();\n } finally {\n lock.readLock().unlock();\n }\n }", "public int getKeyspacesCount() {\n if (keyspacesBuilder_ == null) {\n return keyspaces_.size();\n } else {\n return keyspacesBuilder_.getCount();\n }\n }", "public static long getRowCount(Session session, String tableName) {\n\t\tObjects.requireNonNull(session, \"Session must not be null\");\n\t\tObjects.requireNonNull(tableName, \"Table must not be null\");\n\t\tlong count = 0;\n\t\tResultSet resultSet = executeStatement(session, String.format(\"SELECT COUNT(*) as total FROM %s\", tableName));\n\t\tfor (Row row : resultSet) {\n\t\t\tcount += row.getLong(\"total\");\n\t\t}\n\t\treturn count;\n\t}", "private int getChatTabCount()\n {\n return (chatTabbedPane == null) ? 0 : chatTabbedPane.getTabCount();\n }", "public static int getNumberOfRows() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt3 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt3.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLACCOUNT\"); // SQL Count query\r\n\t\trownumber.next();\r\n\r\n\t\tint rnum = rownumber.getInt(1);\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return value\r\n\r\n\t}", "public static int getNumberOfRowsServer() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt3 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt3.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // sql count statement\r\n\t\trownumber.next(); // move cursor to first position\r\n\r\n\t\tint rnum = rownumber.getInt(1); //store result in an integer variable\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return integer\r\n\r\n\t}", "static int getCachedRegionCount(Configuration conf,\n final byte[] tableName)\n throws IOException {\n return execute(new HConnectable<Integer>(conf) {\n @Override\n public Integer connect(HConnection connection) {\n return ((HConnectionImplementation) connection)\n .getNumberOfCachedRegionLocations(tableName);\n }\n });\n }", "int getFHPackagesCount();", "public int size(){\n\t\treturn hashTableSize;\n\t}", "public int size() {\r\n\t\tint size = 0;\r\n\t\tfor (Integer key : connectionLists.keySet()) {\r\n\t\t\tsize += connectionLists.get(key).size();\r\n\t\t}\r\n\t\treturn size;\r\n\t}", "int getConnectionsCount();", "public int numCollisions() {\r\n int collisions = 0;\r\n for (int i = 0; i < tableSize; i++) {\r\n if (table[i].length() > 1) {\r\n collisions += table[i].length() - 1;\r\n }\r\n }\r\n return collisions;\r\n }", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "public int deleteUnusedTables()\n\t{\n\t\ttry\n\t\t{\n\t\t\n\t\t\tString query = \"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.SYSTEM_TABLES\"\n\t\t\t\t\t\t\t+ \" WHERE TABLE_TYPE='TABLE' AND TABLE_SCHEM='PUBLIC'\";\n\t\t\t\n\t\t\tResultSet tables = executeSQLQuery(query);\n\t\t\tObject[][] items = dump(tables);\n\t\t\t\n\t\t\tSet<String> knownTables = new HashSet<String>();\n\t\t\t\n\t\t\tfor(Record<?> tmp : new CSVRecordLoader().getPlugins())\n\t\t\t{\n\t\t\t\tknownTables.add(tmp.getTableName());\n\t\t\t}\n\t\t\t\n\t\t\tint unknown = 0;\n\t\t\t\n\t\t\tfor(Object[] item : items)\n\t\t\t{\n\t\t\t\tif(! knownTables.contains(item[0].toString()))\n\t\t\t\t{\n\t\t\t\t\tunknown++;\n\t\t\t\t\tString dropQuery = \"DROP TABLE \\\"\" + item[0].toString() + \"\\\"\";\n\t\t\t\t\texecuteSQLResult(dropQuery);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\n\t\t\treturn unknown;\n\t\t}catch(SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Error dropping unused tables\",e);\n\t\t\treturn -1;\n\t\t}\n\t}", "public int getNumEntries ()\n\t{\n\t\treturn entries.size ();\n\t}", "public static int count() {\n\t\treturn definitions.length;\n\t}", "int countRows() throws IOException {\n Scan s = new Scan();\n ResultScanner rs = tbl.getScanner(s);\n int i = 0;\n while(rs.next() !=null) {\n i++;\n }\n return i;\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "int getSessionCount();", "public int getTotalRows();", "protected int countRowsInTable( String tableName ) {\n return SimpleJdbcTestUtils.countRowsInTable( this.simpleJdbcTemplate, tableName );\n }", "private int getNumberOfAccounts()\n {\n ProtocolProviderFactory factory =\n DictAccRegWizzActivator.getDictProtocolProviderFactory();\n\n return factory.getRegisteredAccounts().size();\n }", "int getKeyspacesCount();", "public int obtenerNumeroFuentes() {\n\t\tint n = 0;\n\n\t\ttry {\n\n\t\t\trs = stmt\n\t\t\t\t\t.executeQuery(\"SELECT COUNT(IDFUENTE) AS FUENTES FROM FUENTE\");\n\t\t\trs.next();\n\n\t\t\tn = rs.getInt(\"FUENTES\");\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"No es posible recuperar el numero de fuentes\");\n\n\t\t}\n\n\t\treturn n;\n\t}", "public static int getTabViewCount() {\n return tabViews.size();\n }", "public int getSize() {\n\t\tint total = 0;\n\t\tfor (int i = 0; i < capacity; i++) {\n\t\t\ttotal += table.get(i).getSize();\n\t\t}\n\t\treturn total;\n\t}", "public int getLocationCount(){\n\t\tString countQuery = \"SELECT * FROM \" + table_location;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(countQuery, null);\n\t\tint count = cursor.getCount();\n\t\tdb.close();\n\t\treturn count;\n\t}", "public int countOrders(){\n int count = 0;\n sql = \"SELECT * FROM Order\";\n ResultSet rs = db.SelectDB(sql);\n try{\n while(rs.next()){\n count++;\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash at countOrders method (for Order). \" + e);\n }\n return count;\n }", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public int getSkoreCount() {\n \tString countQuery = \"SELECT * FROM \" + \"skore\";\n \tSQLiteDatabase db = this.getReadableDatabase();\n \tCursor cursor = db.rawQuery(countQuery, null);\n \tint count = cursor.getCount(); //added line here\n \t\n \tcursor.close(); \t\n \tdb.close();\n \t\n \treturn count;\n }", "@Override\r\n\tpublic int getTableSize() {\r\n\t\treturn size;\r\n\t}", "public int getNumEntries() {\n return entries.size();\n }", "@Override\n\tpublic int getRowCount() {\n\t\ttry\n\t\t{\n\t\t\tUint256 retval = contractBean.getContract().getCount().get();\n\t\t\treturn retval.getValue().intValue();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.getMessage();\n\t\t}\n\t\t// If something goes wrong, return 1\n\t\treturn 1;\n\t}", "public int getCount() {\n\n int counter = 0;\n SQLiteDatabase db = getReadableDatabase();\n String GOALS_SELECT_QUERY =\n String.format(\"SELECT * FROM %s \", TABLE_GOALS);\n Cursor cursor = db.rawQuery(GOALS_SELECT_QUERY, null);\n\n try {\n counter = cursor.getCount();\n } catch (Exception e) {\n Log.d(TAG, \"Error while trying to get count from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n return counter;\n }", "public int getXrefCount() {\n String countQuery = \"SELECT * FROM \" + XREF_TABLE;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int xrefCount = cursor.getCount();\n cursor.close();\n\n return xrefCount;\n }", "int getColumnsCount();", "int getColumnsCount();" ]
[ "0.85894954", "0.806277", "0.80199856", "0.7935398", "0.7483331", "0.7322992", "0.719938", "0.71670103", "0.7077476", "0.69433695", "0.6893229", "0.6884415", "0.67815256", "0.6763621", "0.67595005", "0.6753836", "0.67460865", "0.6725568", "0.67002267", "0.6644511", "0.6640424", "0.66385204", "0.6542489", "0.65387607", "0.65361047", "0.65204144", "0.65146405", "0.64825314", "0.6473996", "0.64724416", "0.644363", "0.6385661", "0.637583", "0.63636076", "0.6341323", "0.63385034", "0.6302869", "0.62500495", "0.62213093", "0.6212751", "0.6208875", "0.6206437", "0.61968255", "0.6192751", "0.6184053", "0.6172761", "0.61626214", "0.6159787", "0.6154151", "0.61507076", "0.61483234", "0.6142363", "0.613426", "0.6131132", "0.6129862", "0.6115455", "0.6115379", "0.6111284", "0.6100457", "0.6099178", "0.6093114", "0.6091674", "0.609125", "0.60804886", "0.6070417", "0.60647595", "0.6064205", "0.6033602", "0.60325795", "0.6027233", "0.60247415", "0.6016945", "0.59968257", "0.5996643", "0.5991791", "0.59855", "0.59844613", "0.5973969", "0.5962664", "0.5959925", "0.595821", "0.5952898", "0.5951915", "0.594796", "0.5933714", "0.59304464", "0.5930072", "0.59288454", "0.5921258", "0.5913731", "0.5906733", "0.5902309", "0.58980376", "0.5896283", "0.5894803", "0.58924866", "0.58922744", "0.58806694", "0.5880036", "0.5880036" ]
0.7371623
5
Gets Selectable in Group by clause.
@SuppressWarnings("unchecked") public List getGroupBy() { if (_groupBy != null) { return Collections.unmodifiableList(_groupBy); } return Collections.EMPTY_LIST; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Selectable getGroupBy(int i) {\n if (_groupBy != null) {\n return (Selectable) (_groupBy.get(i));\n } \n return null;\n }", "public GroupBy getGroupBy() {\n\t\t\n\t\treturn groupBy;\n\t}", "io.dstore.values.BooleanValue getGroupByCategory();", "public boolean isGroupBy() {\n return groupBy;\n }", "public interface Groupable {\n\n /**\n * Group by columns.\n * It's possible to put function as the column's name:\n * <pre>\n * <code>groupBy(\"SUM(Price) AS TotalPrice\", \"Name\",...)</code>\n * </pre>\n * @param columns column names.\n * @return GroupBy object\n * @see com.bingzer.android.dbv.queries.GroupBy\n */\n GroupBy groupBy(String... columns);\n\n}", "GroupByColumnFull createGroupByColumnFull();", "public T caseGroupByClause(GroupByClause object)\n {\n return null;\n }", "OrGroupByColumn createOrGroupByColumn();", "public static boolean GroupByClause(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"GroupByClause\")) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, GROUP_BY_CLAUSE, \"<group by clause>\");\n r = consumeTokens(b, 2, K_GROUP, K_BY);\n p = r; // pin = 2\n r = r && GroupingSpecList(b, l + 1);\n exit_section_(b, l, m, r, p, FLWORExprRecover_parser_);\n return r || p;\n }", "GroupOpt getGroup();", "SeGroup selectByPrimaryKey(SeGroupKey key);", "List<SeGroup> selectByExample(SeGroupExample example);", "Boolean groupingEnabled();", "io.dstore.values.BooleanValueOrBuilder getGroupByCategoryOrBuilder();", "public void setGroupBy(boolean value) {\n this.groupBy = value;\n }", "com.google.ads.googleads.v6.resources.AdGroupCriterion getAdGroupCriterion();", "public Group selectByPrimaryKey(Integer tgId) {\n\t\treturn groupMapper.selectByPrimaryKey(tgId);\n\t}", "public interface Selectable\n{\n\tboolean isSelected();\n\n\tvoid setSelected(boolean selected);\n\n\tvoid setGroup(SelectionGroup group);\n}", "public io.dstore.values.BooleanValueOrBuilder getGroupByCategoryOrBuilder() {\n return getGroupByCategory();\n }", "public Boolean groupingEnabled() {\n return this.groupingEnabled;\n }", "public io.dstore.values.BooleanValue getGroupByCategory() {\n return groupByCategory_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : groupByCategory_;\n }", "public io.dstore.values.BooleanValue getGroupByCategory() {\n if (groupByCategoryBuilder_ == null) {\n return groupByCategory_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : groupByCategory_;\n } else {\n return groupByCategoryBuilder_.getMessage();\n }\n }", "public Expression getSelectExpression() {\n return select;\n }", "public void executeGroupByCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT name, price\n ProjectionList projectionList = Projections.projectionList();\n projectionList.add(Projections.groupProperty(\"name\"));\n projectionList.add(Projections.property(\"price\"));\n\n // FROM Product p\n Criteria criteria = session.createCriteria(Product.class);\n\n // GROUP BY p.name\n criteria.setProjection(projectionList);\n\n displayObjectsList(criteria.list());\n transaction.commit();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.Group getGroup();", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "protected void generateGroupBy( SQLQueryModel query, LogicalModel model, List<Selection> selections,\n Map<LogicalTable, String> tableAliases, Map<String, Object> parameters, boolean genAsPreparedStatement,\n DatabaseMeta databaseMeta, String locale ) {\n // Can be moved to selection loop.\n for ( Selection selection : selections ) {\n // Check if the column has any nested aggregation in there like a calculated column : SUM(a)/SUM(b) with no\n // aggregation set.\n //\n if ( !hasFactsInIt( model, selection, parameters, genAsPreparedStatement, databaseMeta, locale ) ) {\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, selection, tableAliases, parameters, genAsPreparedStatement, databaseMeta,\n locale );\n query.addGroupBy( sqlAndTables.getSql(), null );\n }\n }\n }", "public ObjectGroup getObjectGroup() {\r\n return ObjectGroup.forType(id);\r\n }", "private List<Expression<?>> constructGroupBy(CriteriaBuilderImpl cb, AbstractQuery<?> q, Tree groupByDef) {\n \t\tfinal List<Expression<?>> groupBy = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < groupByDef.getChildCount(); i++) {\n \t\t\tgroupBy.add(this.getExpression(cb, q, groupByDef.getChild(i), null));\n \t\t}\n \n \t\treturn groupBy;\n \t}", "GroupQuery createQuery();", "public Groupe getSelectedGroup() {\n return selectedGroup;\n }", "public boolean isFilterByGroup()\r\n {\r\n return getSemanticObject().getBooleanProperty(swpres_filterByGroup);\r\n }", "public Expression getSelectionCriteria() {\n return getSQLStatement().getWhereClause();\n }", "Group getGroupById(String id);", "public List<Group> selectByGroupByParamMap(Map paramMap) {\n\t\treturn groupMapper.selectByGroupByParamMap(paramMap);\n\t}", "private String groupSelect(String selectType, String sql) {\n\t\tString condition = null;\n\t\tStringTokenizer tok = null;\n\t\tboolean isFirstToken = true;\n\t\tString idType = null;\n\n\t\tif (selectType.equalsIgnoreCase(\"employee\")) {\n\t\t\tidType = \"E.EMP_ID\";\n\t\t\ttok = new StringTokenizer(employee, \",\");\n\t\t} else if (selectType.equalsIgnoreCase(\"calcGroup\")) {\n\t\t\tidType = \"E.CALCGRP_ID\";\n\t\t\ttok = new StringTokenizer(calcGroup, \",\");\n\t\t} else if (selectType.equalsIgnoreCase(\"payGroup\")) {\n\t\t\tidType = \"E.PAYGRP_ID\";\n\t\t\ttok = new StringTokenizer(payGroup, \",\");\n\t\t} else {\n\t\t\tidType = \"T.WBT_ID\";\n\t\t\ttok = new StringTokenizer(team, \",\");\n\t\t}\n\t\t// specifically for the team case, we must access the employee team\n\t\t// table\n\t\tif (idType.equalsIgnoreCase(\"T.WBT_ID\")) {\n\t\t\tif (sql.length() > oriSqlLength)\n\t\t\t\tsql = sql.substring(0, oriSqlLength) + \", \" + empTeamTable\n\t\t\t\t\t\t+ \" T\" + sql.substring(oriSqlLength);\n\t\t\telse\n\t\t\t\tsql = sql + \", \" + empTeamTable + \" T\";\n\t\t\tcondition = \"T.EMP_ID= E.EMP_ID AND\";\n\t\t}\n\n\t\twhile (tok.hasMoreTokens()) {\n\t\t\tString id = tok.nextToken();\n\t\t\tif (isFirstToken) {\n\t\t\t\tif (condition == null)\n\t\t\t\t\tcondition = \"(\" + idType + \"= \" + id;\n\t\t\t\telse\n\t\t\t\t\tcondition = condition + \" (\" + idType + \"= \" + id;\n\t\t\t\tisFirstToken = false;\n\t\t\t} else\n\t\t\t\tcondition = condition + \" OR \" + idType + \"= \" + id;\n\t\t}\n\t\tcondition = condition + \")\";\n\n\t\tboolean noConditions = (sql.indexOf(\"WHERE\") == -1);\n\t\t// if we have not added any conditions\n\t\tif (noConditions)\n\t\t\tsql = sql + \" WHERE \" + condition;\n\t\t// otherwise\n\t\telse\n\t\t\tsql = sql + \" AND \" + condition;\n\t\treturn sql;\n\t}", "IGroup getFullGroup();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.6374789", "0.6281174", "0.61376935", "0.59504133", "0.5930695", "0.5860847", "0.5772797", "0.5762819", "0.56959087", "0.56365454", "0.5555288", "0.55541855", "0.55432045", "0.55170375", "0.5457924", "0.5449669", "0.5434062", "0.5432117", "0.5399058", "0.5398075", "0.5353395", "0.5353202", "0.5324362", "0.5309194", "0.5303619", "0.5279024", "0.52607524", "0.5238481", "0.5235941", "0.523211", "0.51970595", "0.51772076", "0.51732904", "0.51691157", "0.51635367", "0.5162514", "0.51500267", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745", "0.5149745" ]
0.56913507
9
Gets Selectable in Group by clause. Clients should treat the returned value as immutable.
public Selectable getGroupBy(int i) { if (_groupBy != null) { return (Selectable) (_groupBy.get(i)); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GroupBy getGroupBy() {\n\t\t\n\t\treturn groupBy;\n\t}", "public boolean isGroupBy() {\n return groupBy;\n }", "io.dstore.values.BooleanValue getGroupByCategory();", "public interface Selectable\n{\n\tboolean isSelected();\n\n\tvoid setSelected(boolean selected);\n\n\tvoid setGroup(SelectionGroup group);\n}", "@SuppressWarnings(\"unchecked\")\n public List getGroupBy() {\n if (_groupBy != null) {\n return Collections.unmodifiableList(_groupBy);\n }\n return Collections.EMPTY_LIST;\n }", "public void setGroupBy(boolean value) {\n this.groupBy = value;\n }", "GroupOpt getGroup();", "io.dstore.values.BooleanValueOrBuilder getGroupByCategoryOrBuilder();", "public io.dstore.values.BooleanValueOrBuilder getGroupByCategoryOrBuilder() {\n return getGroupByCategory();\n }", "public Boolean groupingEnabled() {\n return this.groupingEnabled;\n }", "public io.dstore.values.BooleanValue getGroupByCategory() {\n if (groupByCategoryBuilder_ == null) {\n return groupByCategory_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : groupByCategory_;\n } else {\n return groupByCategoryBuilder_.getMessage();\n }\n }", "Boolean groupingEnabled();", "public io.dstore.values.BooleanValue getGroupByCategory() {\n return groupByCategory_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : groupByCategory_;\n }", "public Groupe getSelectedGroup() {\n return selectedGroup;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.Group getGroup();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "SeGroup selectByPrimaryKey(SeGroupKey key);", "public Group getGroup() {\n return this.inGroup;\n }", "public interface Groupable {\n\n /**\n * Group by columns.\n * It's possible to put function as the column's name:\n * <pre>\n * <code>groupBy(\"SUM(Price) AS TotalPrice\", \"Name\",...)</code>\n * </pre>\n * @param columns column names.\n * @return GroupBy object\n * @see com.bingzer.android.dbv.queries.GroupBy\n */\n GroupBy groupBy(String... columns);\n\n}", "public Groups getFlaggedGroup() {\n return flaggedGroup;\n }", "public abstract Collection getGroups();", "public io.dstore.values.BooleanValue.Builder getGroupByCategoryBuilder() {\n \n onChanged();\n return getGroupByCategoryFieldBuilder().getBuilder();\n }", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "IGroup getFullGroup();" ]
[ "0.64466774", "0.6294671", "0.6253811", "0.6156683", "0.61558276", "0.59894586", "0.5840342", "0.58298", "0.5799742", "0.5731586", "0.57192814", "0.56937003", "0.5693352", "0.56914514", "0.56653017", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5648493", "0.5638298", "0.5635526", "0.5603988", "0.5585841", "0.55825186", "0.5557284", "0.55362976", "0.55333817" ]
0.64734966
0
=================================================================================== Union Query ===========
public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) { WhiteStilettoAliasRefCQ bq = (WhiteStilettoAliasRefCQ)bqs; WhiteStilettoAliasRefCQ uq = (WhiteStilettoAliasRefCQ)uqs; if (bq.hasConditionQueryWhiteStilettoAlias()) { uq.queryWhiteStilettoAlias().reflectRelationOnUnionQuery(bq.queryWhiteStilettoAlias(), uq.queryWhiteStilettoAlias()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<ProtocolPo> queryByUnion(ProtocolPo query);", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public static ArrayList<ArrayList<String>> unionD(String table1Name, String table2Name){\n\t\tArrayList<ArrayList<String>> union = new ArrayList<ArrayList<String>>();\r\n\t\t//these will hold the data from the input tables\r\n\t\tArrayList<ArrayList<String>> columns1 = new ArrayList<ArrayList<String>>();\r\n\t\tArrayList<ArrayList<String>> columns2 = new ArrayList<ArrayList<String>>();\r\n\t\t//find the input tables in the database list\r\n\t\tfor (int i = 0; i < tables.size(); i++) {\r\n\t\t\tif (tables.get(i).getName().equals(table1Name)) {\r\n\t\t\t\tcolumns1 = new ArrayList<ArrayList<String>>(tables.get(i).datas);\r\n\t\t\t}\r\n\t\t\tif (tables.get(i).getName().equals(table2Name)) {\r\n\t\t\t\tcolumns2 = new ArrayList<ArrayList<String>>(tables.get(i).datas);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check if the tables are union compatable\r\n\t\tif (columns1.size() != columns2.size()) {\r\n\t\t\tSystem.out.println(\"Unable to perform union - unnequal number of columns.\");\r\n\t\t}\r\n\t\telse {\t//only continue if they are union compatable\r\n\t\t\t//true if all columns have the same type\r\n\t\t\tint sameTypes = 1;\r\n\t\t\tint type1 = 0;\r\n\t\t\tint type2 = 0;\r\n\t\t\t//a max char value of -1 indicates the type is integer\r\n\t\t\tfor (int j = 0; j < columns1.size(); j++) {\r\n\t\t\t\ttype1 = Integer.valueOf(new String(columns1.get(j).get(1)));\r\n\t\t\t\ttype2 = Integer.valueOf(columns2.get(j).get(1));\r\n\t\t\t\tif (type1 > 0) { type1 = 1; }\r\n\t\t\t\telse if (type1 < 0) { type1 = -1; }\r\n\t\t\t\tif (type2 > 0) { type2 = 1; }\r\n\t\t\t\telse if (type2 < 0) { type2 = -1; }\r\n\t\t\t\t//if the types were not equal, don't continue\r\n\t\t\t\tif (type1 != type2) {\r\n\t\t\t\t\tSystem.out.println(\"Unable to perform union - incompatible types.\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\t//continue if the types are equal\r\n\t\t\t\t\t\t//create new columns holding the name from the first table and the greatest char max\r\n\t\t\t\t\tArrayList<String> newColumn = new ArrayList<String>();\r\n\t\t\t\t\tint largestChar = 0;\r\n\t\t\t\t\tif (type1 != -1) {\t//if they aren't integers\r\n\t\t\t\t\t\t//find the largest max char value\r\n\t\t\t\t\t\tif (Integer.parseInt(columns1.get(j).get(1)) >= Integer.parseInt(columns2.get(j).get(1))) {\r\n\t\t\t\t\t\t\tlargestChar = Integer.parseInt(new String(columns1.get(j).get(1)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse { \r\n\t\t\t\t\t\t\tlargestChar = Integer.parseInt(columns2.get(j).get(1)); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//keep the type as integer\r\n\t\t\t\t\telse { \r\n\t\t\t\t\t\tlargestChar = -1; \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t//use the name from the first table and largest char max\r\n\t\t\t\t\tnewColumn.add(new String(columns1.get(j).get(0)));\r\n\t\t\t\t\tnewColumn.add(String.valueOf(largestChar));\r\n\t\t\t\t\tunion.add(newColumn);\r\n\t\t\t\t\t//check if there are equal rows to avoid duplicates\r\n\t\t\t\t\tint colCount = 0;\r\n\t\t\t\t\tfor (int n = 2; n < columns1.get(colCount).size(); n++) {\t//for each row in table1\r\n\t\t\t\t\t\tunion.get(j).add(new String(columns1.get(j).get(n)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\t\t\tfor(int t = 2; t<columns2.get(0).size(); t++){\t//column2 row\r\n\t\t\t\tboolean completeUniqe = true;\r\n\t\t\t\tfor(int p = 2; p < union.get(0).size(); p++){// rows of union\r\n\t\t\t\t\tint sameCount = 0;\r\n\t\t\t\t\tfor(int u = 0; u<union.size(); u++){//columns of union\r\n\t\t\t\t\t\tif(columns2.get(u).get(t).equals(union.get(u).get(p))){\r\n\t\t\t\t\t\t\tsameCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(sameCount);\r\n\t\t\t\t\tif(sameCount == union.size()){\r\n\t\t\t\t\t\tcompleteUniqe = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(completeUniqe){\r\n\t\t\t\t\tfor(int u = 0; u<union.size(); u++){//columns of union\r\n\t\t\t\t\t\tunion.get(u).add(new String(columns2.get(u).get(t)));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn union;\r\n\t}", "void union(int p, int q) {}", "@Override\n public boolean supportsUnionAll() {\n return true;\n }", "@Test void testInterpretUnion() {\n rootSchema.add(\"simple\", new ScannableTableTest.SimpleTable());\n final String sql = \"select * from \\\"simple\\\"\\n\"\n + \"union\\n\"\n + \"select * from \\\"simple\\\"\";\n sql(sql).returnsRowsUnordered(\"[0]\", \"[10]\", \"[20]\", \"[30]\");\n }", "protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {\r\n }", "BUnion createBUnion();", "public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n result.add(e);\n }\n \n return result;\n }", "@Test\n public void testTwoUnions() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : int);\"\n + \"u1 = union onschema l1, l2;\"\n + \"l3 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : double);\"\n + \"u2 = union onschema u1, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u2\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Test void testInterpretUnionAll() {\n rootSchema.add(\"simple\", new ScannableTableTest.SimpleTable());\n final String sql = \"select * from \\\"simple\\\"\\n\"\n + \"union all\\n\"\n + \"select * from \\\"simple\\\"\";\n sql(sql).returnsRowsUnordered(\"[0]\", \"[10]\", \"[20]\", \"[30]\", \"[0]\", \"[10]\",\n \"[20]\", \"[30]\");\n }", "public Bag union(Bag u) {\n return u;\n }", "public Set union(Set join){\n Set newSet = new Set();\n for(int element = 0; element < join.size(); element++){\n if (!elementOf(join.getSet()[element]))\n newSet.add(join.getSet()[element]);\n }\n for(int element = 0; element < set.length; element++){\n newSet.add(set[element]);\n }\n return newSet;\n }", "@Test\n\t public void test_Union_Set_Same() throws Exception{\n\t\t int[] setarray1= new int[]{1,2,3};\n\t\t int[] setarray2= new int[]{1,2,3};\n\t\t SET set = new SET(setarray1);\n\t\t int returnedArrOperation[] =set.Union(setarray1,setarray2); \n\t\t int []expectedArr = new int[] {1,2,3};\n\t\t Assert.assertArrayEquals( expectedArr, returnedArrOperation );\n\t }", "@Test\n public void testUnionOnSchemaSameSchema() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, j: int\");\n Schema sch = pig.dumpSchema(\"u\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2)\",\n \"(5,3)\",\n \"(1,2)\",\n \"(5,3)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Test\r\n\t\tpublic void testUnion() {\n\t\t\ttestingSet = new IntegerSet(list1);\r\n\t\t\ttestingSet2= new IntegerSet(list2);\r\n\t\t\t// 3rd set =to the union of the two lists \r\n\t\t\ttestingSet3= new IntegerSet(union);\r\n\t\t\t// 4th set equal to the union of sets 1 and 2 \r\n\t\t\ttestingSet4= testingSet.union(testingSet, testingSet2);\r\n\t\t\t// sets 3 and 4 should be equal\r\n\t\t\t// assertEquals method is deprecated \r\n\t\t\tassertArrayEquals(testingSet3.toArray(),testingSet4.toArray());\r\n\t\t\t \r\n\t\t}", "private static Collection<Node> union(Collection<Node> xs, Collection<Node> ys) {\n if (xs == null || xs.size() == 0) {\n return ys;\n }\n if (ys == null || ys.size() == 0) {\n return xs;\n }\n \n List<Node> result = new ArrayList<>(xs);\n for (Node y : ys) {\n if (!result.contains(y)) {\n result.add(y);\n }\n }\n return result;\n }", "public ArrBag<T> union( ArrBag<T> other )\n {\n ArrBag<T> unionArray = new ArrBag<T>(other.size() + this.size()); \n\n int unionCount = 0; \n for (int i = 0; i <this.size(); i++ ){\n unionArray.add(this.get(i));\n unionCount++;\n } for (int i = 0; i<other.size(); i++){\n if (!unionArray.contains(other.get(i))){\n unionArray.add(other.get(i));\n unionCount ++;\n }\n }\n return unionArray;\n }", "@Test\n public void testUnionOnSchemaNoCommonCols() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2,null,null)\",\n \"(5,3,null,null)\",\n \"(null,null,1L,2.0F)\",\n \"(null,null,5L,3.0F)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "public Filter doUnion(Filter f);", "private String buildUnionOut(Stream strm){\n\t\tInteger i = 0;\n\t\tString str = genTableStr + strm.getName() + \"_starqlout\"+\" AS WCACHE\\r\\n\";\n\t\tstr += \"select * from (mergeunion '\";\n\t\twhile (i < outNum){\n\t\t\ti++;\n\t\t\tstr += strm.getName() + \"_starqlout_\"+i;\t\t\t\n\t\t\tif(i < outNum)\n\t\t\t\tstr += \",\";\n\t\t}\n\t\tstr += \t\"' cols:timestamp);\\r\\n\";\n\t\treturn str;\n\t}", "protected <Ty> HashSet<Ty> union(HashSet<Ty> setA, HashSet<Ty> setB) {\n HashSet<Ty> retSet = new HashSet<>();\n retSet.addAll(setA);\n retSet.addAll(setB);\n return retSet;\n }", "private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }", "@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //create return SetInterface\n SetInterface<T> result = new LinkedSet();\n //add the items from the calling set to the result set\n Node n = first;\n while(n != null){\n result.addItem(n.value);\n n = n.next;\n }\n \n //convert rhs to an array so we know what we're dealing with\n T[] rhsArr = rhs.toArray();\n //add the items from rhsArr to result\n for(int i = 0; i < rhsArr.length; i++){\n result.addItem(rhsArr[i]);\n }\n \n return result;\n }", "@Test\n public void testUnionOnSchemaDiffNumType() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : double);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public boolean supportsUnionAll() {\n \t\treturn false;\n \t}", "@Test\n public void testUnionOnSchemaCastOnByteArray() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i, j);\"\n + \" f1 = foreach l1 generate (int)i, (int)j;\"\n + \"u = union onschema f1, l1;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2)\",\n \"(5,3)\",\n \"(1,2)\",\n \"(5,3)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "public void queryTaskUnionSet1() {\r\n\t\t// task 1\r\n\t\tTask task1 = new Task();\r\n\t\ttask1.setName(\"DEFECTS\");\r\n\t\ttask1.setDisplayName(\"Defects\");\r\n\t\ttask1.setDescription(\"User story to address product defects\");\r\n\t\ttask1 = (Task) aggregateService.create(task1, new Settings());\t\r\n\r\n\t\t// task 2\r\n\t\tTask task2 = new Task();\r\n\t\ttask2.setName(\"FIX_DEFECTS\");\r\n\t\ttask2.setDisplayName(\"Fix defects\");\r\n\t\ttask2.setDescription(\"Task to track the defect fixing effort\");\r\n\t\ttask2 = (Task) aggregateService.create(task2, new Settings());\r\n\r\n\t\t// task 3\r\n\t\tTask task3 = new Task();\r\n\t\ttask3.setName(\"PRIORITIZE_DEFECTS\");\r\n\t\ttask3.setDisplayName(\"Prioritize defects\");\r\n\t\ttask3.setDescription(\"Based upon the effort required for the defects prioritize them\");\r\n\t\ttask3 = (Task) aggregateService.create(task3, new Settings());\r\n\r\n\t\ttask1 = (Task) aggregateService.read(task1, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setParam(\"name1\", \"FIX_DEFECTS\");\r\n\t\tsettings.setParam(\"name2\", \"PRIORITIZE_DEFECTS\");\r\n\t\tsettings.setView(aggregateService.getView(\"TASKUNIONSET\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(new Task(), settings);\r\n\r\n\t\tassert(toList.size() == 2);\r\n\r\n\t\tObject obj1 = toList.get(0);\r\n\t\tObject obj2 = toList.get(1);\r\n\r\n\t\tassert(Task.class.isAssignableFrom(obj1.getClass()));\r\n\t\tassert(Task.class.isAssignableFrom(obj2.getClass()));\r\n\t\t\r\n\t\tTask t1 = (Task) obj1;\r\n\t\tTask t2 = (Task) obj2;\t\t\r\n\t\t\r\n\t\tassert( (t1.getName().equals(\"FIX_DEFECTS\") && t2.getName().equals(\"PRIORITIZE_DEFECTS\")) ||\r\n\t\t\t\t(t2.getName().equals(\"FIX_DEFECTS\") && t1.getName().equals(\"PRIORITIZE_DEFECTS\")) );\r\n\t}", "@Test\n public void testUnionWithEmptyDataSet() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n // Don't know how to make an empty result in an other way than filtering it\n DataSet<Tuple3<Integer, Long, String>> empty =\n CollectionDataSets.get3TupleDataSet(env).filter(new RichFilter1());\n\n DataSet<Tuple3<Integer, Long, String>> unionDs =\n CollectionDataSets.get3TupleDataSet(env).union(empty);\n\n List<Tuple3<Integer, Long, String>> result = unionDs.collect();\n\n String expected = FULL_TUPLE_3_STRING;\n\n compareResultAsTuples(result, expected);\n }", "public static <T> Set<T> union(Set<? extends T> s1, Set<? extends T> s2) {\n Set<T> result = new HashSet<>(s1);\n result.addAll(s2);\n return result;\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n StShohinKonyuCQ bq = (StShohinKonyuCQ)bqs;\n StShohinKonyuCQ uq = (StShohinKonyuCQ)uqs;\n if (bq.hasConditionQueryCmShain()) {\n uq.queryCmShain().reflectRelationOnUnionQuery(bq.queryCmShain(), uq.queryCmShain());\n }\n }", "public PipeUnion<T> getUnion();", "public static <T> List<T> union(List<T> a, List<T> b) {\n\t\t\n\t\tHashMap<T, Boolean> include = new HashMap<T, Boolean>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tinclude.put(elt, true);\n\t\tfor (T elt : b)\n\t\t\tinclude.put(elt, true);\n\t\t\n\t\tList<T> toReturn = new ArrayList<T>();\n\t\tfor (T elt : include.keySet())\n\t\t\ttoReturn.add(elt);\n\t\t\n\t\treturn toReturn;\n\t}", "public BSTSet union(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] unionArray = new int[thisArray.length + sArray.length];\n int unionArrayIndex = 0;\n\n // add both arrays together\n for (int i = 0; i < thisArray.length; i++) {\n unionArray[unionArrayIndex++] = thisArray[i];\n }\n\n for (int i = 0; i < sArray.length; i++) {\n unionArray[unionArrayIndex++] = sArray[i];\n }\n\n return new BSTSet(unionArray);\n }", "@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //Declare return SetInterface\n SetInterface<T> answer = new ArraySet();\n //Add the items from the calling ArraySet to the return Set\n for (int i = 0; i < this.numItems; i++){\n answer.addItem(arr[i]);\n }\n //Convert the other set to an array in case it isnt and to \n //ease iteration\n T[] other = rhs.toArray();\n //Add the items from RHS to return Set\n for (int j = 0; j < rhs.getSize(); j++){\n answer.addItem(other[j]);\n }\n //Return the answer\n return answer; \n }", "default Stream<T> union(Stream<T> other) {\n return union(Arrays.asList(other));\n }", "public ArrayList<Object> fullUnion(ArrayList<Object> list1 , ArrayList<Object> list2){\r\n ArrayList<Object> retList = new ArrayList<Object>();\r\n retList.addAll(list1);\r\n retList.addAll(list2);\r\n return retList;\r\n }", "@Test\n public void testUnionOnSchema3Inputs() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int); \"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : double, x : int); \" \n + \"l3 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : long, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"u = union onschema l1, l2, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"u\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1.0,2,null,null,null)\",\n \"(5.0,3,null,null,null)\",\n \"(1.0,null,2,null,null)\",\n \"(5.0,null,3,null,null)\",\n \"(1.0,2,null,'abc',{(1,'a'),(1,'b')})\",\n \"(5.0,3,null,'def',{(2,'a'),(2,'b')})\",\n\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "public static synchronized Vector union(Vector left, Vector right)\n\t throws IcofException {\n\n\tString funcName = new String(\"union(Vector, Vector)\");\n\n\tVector aUnion = new Vector();\n\n\ttry {\n\n\t for (int i = 0; i < left.size(); i++) {\n\t\tif (!left.elementAt(i).toString().equals(\"\")) {\n\t\t if (!aUnion.contains(left.elementAt(i))) {\n\t\t\taUnion.add(left.elementAt(i));\n\t\t }\n\t\t}\n\t }\n\n\t for (int j = 0; j < right.size(); j++) {\n\t\tif (!right.elementAt(j).toString().equals(\"\")) {\n\t\t if (!aUnion.contains(right.elementAt(j))) {\n\t\t\taUnion.add(right.elementAt(j));\n\t\t }\n\t\t}\n\t }\n\n\t aUnion.trimToSize();\n\t} catch (Exception e) {\n\t IcofException ie = new IcofException(CLASS_NAME, funcName,\n\t\t IcofException.SEVERE, \"Error creating union of Vectors \",\n\t\t \"\");\n\t throw (ie);\n\t}\n\n\treturn aUnion;\n }", "@Test\n\tpublic void testUnion5() {\n\n\t\tint[] arr = {};\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tint[] uni2 = { 0, 2, 3 };\n\t\tSLLSet listObj7 = new SLLSet(uni2);\n\t\tSLLSet listObj8 = listObj2.union(listObj7);\n\n\t\tString expected = \"0, 2, 3\";\n\t\tint expectedSize = 3;\n\n\t\tassertEquals(expectedSize, listObj8.getSize());\n\t\tassertEquals(expected, listObj8.toString());\n\n\t}", "@Test\n public void testUnionOnSchemaScopeMulti() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" a = load '\" + INP_FILE_2NUMS+ \"' as (i:int, j:int); \"\n + \"b = group a by i; \"\n + \"c = foreach b generate group as gp, flatten(a); \"\n + \"d = group c by $0; \"\n + \"e = foreach d generate group as gp, flatten(c); \"\n + \"f = load '\" + INP_FILE_2NUMS + \"' as (i, j); \"\n ;\n String query = query_prefix + \"u = union onschema e,f;\";\n Util.registerMultiLineQuery(pig, query);\n\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"gp: int,c::gp: int,i: int,j: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n query = query_prefix + \"u = union onschema f,e;\";\n Util.registerMultiLineQuery(pig, query);\n\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int,j: int, gp: int,c::gp: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2,null,null)\",\n \"(5,3,null,null)\",\n \"(1,2,1,1)\",\n \"(5,3,5,5)\",\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "public static Set unionRaw(Set s1, Set s2) {\n\t\t// Warning : HashSet is a raw type. References to generic type HashSet<E> should\n\t\t// be parameterized\n\t\tSet result = new HashSet(s1);\n\t\t// Warning : Type safety: The method addAll(Collection) belongs to the raw type\n\t\t// Set. References to generic type Set<E> should be parameterized\n\t\tresult.addAll(s2);\n\t\treturn result;\n\t}", "public static Vector Union (Vector A, Vector B)\n\t{\n\t\tVector C = A;\n\t\tfor (int i = 0; i < B.size (); i++)\n\t\t\tA.addElement (B.elementAt (i));\n\t\treturn C;\n\t}", "@Test\n public void testUnionOnSchemaSuccOps() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : int, y : int);\"\n + \"u = union onschema l1, l2;\"\n + \"o = order u by i desc;\"\n + \"lim = limit o 2;\"\n + \"fil = filter lim by i == 5 and y is null;\"\n ; \n Util.registerMultiLineQuery(pig, query); \n \n Schema sch = pig.dumpSchema(\"fil\");\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, x: int, y: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n\n Iterator<Tuple> it = pig.openIterator(\"fil\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(5,null,null)\",\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Override\n public IntSet union(IntSet other) {\n return other;\n }", "public static <T> Set<T> union(final Set<T> a, final Set<T> b) {\n return new Set<T>() {\n public boolean has(final T n) {\n return a.has(n) || b.has(n);\n }\n };\n }", "public void union(int p, int q) {\n\t\tint i = root(p);\n\t\tint j = root(q);\n//\t\tid[i] = j; instead of this do below improvement\n\t\tif (sz[i] < sz[j]) {\n\t\t\tid[i] = j;\n\t\t\tsz[j] += sz[i];\n\t\t} else {\n\t\t\tid[j] = i;\n\t\t\tsz[i] += sz[j];\n\t\t}\n\t}", "public ArrayList<ArrayList> union(ArrayList<ArrayList> data, ArrayList<ArrayList> data2)\n {\n if(data == null || data2 == null)\n {\n return null;\n }\n ArrayList<Document> docs = data.get(0);\n ArrayList<Double> relevance = data.get(1);\n ArrayList<Integer> occurrence = data.get(2);\n ArrayList<Integer> popularity = data.get(3);\n \n ArrayList<Document> docs2 = data2.get(0);\n ArrayList<Double> relevance2 = data2.get(1);\n ArrayList<Integer> occurrence2 = data2.get(2);\n ArrayList<Integer> popularity2 = data2.get(3);\n \n ArrayList<Document> docs3 = new ArrayList<>();\n ArrayList<Double> relevance3 = new ArrayList<>();\n ArrayList<Integer> occurrence3 = new ArrayList<>();\n ArrayList<Integer> popularity3 = new ArrayList<>();\n \n for(int i = 0; i < docs.size(); i++)\n {\n docs3.add(docs.get(i));\n relevance3.add(relevance.get(i));\n occurrence3.add(occurrence.get(i));\n popularity3.add(popularity.get(i));\n }\n \n for(Document d: docs2)\n {\n if(!docs3.contains(d))\n {\n docs3.add(d);\n int docIndex = docs2.indexOf(d);\n relevance3.add(relevance2.get(docIndex));\n occurrence3.add(occurrence2.get(docIndex));\n popularity3.add(d.popularity);\n }\n else\n {\n int docIndex = docs3.indexOf(d);\n int docIndex2 = docs2.indexOf(d);\n double oldRel = (double) relevance3.get(docIndex);\n int oldOcc = (int) occurrence3.get(docIndex);\n relevance3.set(docIndex, oldRel+relevance2.get(docIndex2));\n if(oldOcc > occurrence2.get(docIndex2))\n {\n occurrence3.set(docIndex, occurrence2.get(docIndex2));\n }\n } \n }\n ArrayList<ArrayList> data3 = new ArrayList();\n data3.add(docs3);\n data3.add(relevance3);\n data3.add(occurrence3);\n data3.add(popularity3);\n return data3; \n }", "public void queryTaskUnionSet2() {\r\n\t\t// task 1\r\n\t\tTask task1 = new Task();\r\n\t\ttask1.setName(\"DEFECTS\");\r\n\t\ttask1.setDisplayName(\"Defects\");\r\n\t\ttask1.setDescription(\"User story to address product defects\");\r\n\t\t\r\n\t\tTask d1 = new Task();\r\n\t\td1.setName(\"DEFECT 1\");\r\n\t\td1.setDisplayName(\"Defect 1\");\r\n\t\td1.setDescription(\"First defect\");\r\n\t\tTask d2 = new Task();\r\n\t\td2.setName(\"DEFECT 2\");\r\n\t\td2.setDisplayName(\"Defect 2\");\r\n\t\td2.setDescription(\"Second defect\");\r\n\t\tSet<Task> c = new HashSet<Task>();\r\n\t\tc.add(d1);\r\n\t\tc.add(d2);\r\n\t\ttask1.setTaskChildren(c);\r\n\t\ttask1 = (Task) aggregateService.create(task1, new Settings());\r\n\r\n\t\t\tSystem.out.println(\"Name: \" + task1.getName() + \", Id: \" + task1.getId());\r\n\r\n\t\t// task 2\r\n\t\tTask task2 = new Task();\r\n\t\ttask2.setName(\"FIX_DEFECTS\");\r\n\t\ttask2.setDisplayName(\"Fix defects\");\r\n\t\ttask2.setDescription(\"Task to track the defect fixing effort\");\r\n\t\ttask2 = (Task) aggregateService.create(task2, new Settings());\r\n\r\n\t\t// task 3\r\n\t\tTask task3 = new Task();\r\n\t\ttask3.setName(\"PRIORITIZE_DEFECTS\");\r\n\t\ttask3.setDisplayName(\"Prioritize defects\");\r\n\t\ttask3.setDescription(\"Based upon the effort required for the defects prioritize them\");\r\n\t\ttask3 = (Task) aggregateService.create(task3, new Settings());\r\n\r\n\t\ttask1 = (Task) aggregateService.read(task1, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setParam(\"name1\", \"DEFECTS\");\r\n\t\tsettings.setParam(\"name2\", \"PRIORITIZE_DEFECTS\");\r\n\t\tsettings.setParam(\"name3\", \"FIX_DEFECTS\");\r\n\t\tsettings.addFunction(FunctionHandler.NE, \"name\", \"name3\");\r\n\t\tsettings.addFunction(FunctionType.ASC, \"name\");\r\n\t\tsettings.setView(aggregateService.getView(\"TASKUNIONSET\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(new Task(), settings);\r\n\r\n\t\tSystem.out.println(\"SIZE : \" + toList.size());\r\n\t\tfor(Object o: toList) {\r\n\t\t\tTask t = (Task) o;\r\n\t\t\tSystem.out.println(\"Name: \" + t.getName() + \", Id: \" + t.getId());\r\n\t\t}\r\n\t\tassert(toList.size() == 2);\r\n\r\n\t\tObject obj1 = toList.get(0);\r\n\t\tObject obj2 = toList.get(1);\r\n\r\n\t\tassert(Task.class.isAssignableFrom(obj1.getClass()));\r\n\t\tassert(Task.class.isAssignableFrom(obj2.getClass()));\r\n\t\t\r\n\t\tTask t1 = (Task) obj1;\r\n\t\tTask t2 = (Task) obj2;\r\n\r\n\t\tassert ((t1.getName().equals(\"DEFECTS\") && t2.getName().equals(\"PRIORITIZE_DEFECTS\")) ||\r\n\t\t\t(t2.getName().equals(\"DEFECTS\") && t1.getName().equals(\"PRIORITIZE_DEFECTS\")));\r\n\r\n\t\tTask d = t1.getName().equals(\"DEFECTS\") ? t1 : t2;\r\n\t\tassert (d.getTaskChildren() != null && d.getTaskChildren().size() == 2);\r\n\r\n//\t\tSystem.out.println(\"Task 1: \" + t1.getName() + \", Task 2: \" + t2.getName());\r\n//\t\tassert (t1.getName().equals(\"DEFECTS\") && t2.getName().equals(\"DEFECT 1\"));\r\n//\t\tassert(t1.getTaskChildren() != null && t1.getTaskChildren().size() == 2);\r\n\t}", "void union(int a, int b) {\n int aParent = find(a); // find parent of a\n int bParent = find(b); // find parent of b\n\n // here we are everytime setting the parent of a_set as b_set in union\n // set the parent of all a as parent of b\n childToParentMap.put(aParent, bParent);\n }", "public T union( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If already were in same set, just return data from the root of that\n // set.\n if ( root1 == root2 )\n return root1.data;\n // If not already, then doing union reduces overall number of sets.\n numSets-- ;\n // We use root2 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this case,\n // or (b) the tree containing obj1 has lower rank.\n if ( ( root1.rank == root2.rank && Math.random() < 0.5 ) || root1.rank < root2.rank )\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root1.parent = root2;\n root2.size += root1.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root2.rank++ ;\n \n return root2.data;\n }\n else\n // We use root1 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this\n // case, or (b) the tree containing obj2 has lower rank.\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root2.parent = root1;\n root1.size += root2.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root1.rank++ ;\n \n return root1.data;\n }\n }", "@Test\n\tpublic void testUnionSLLSetArrayAll0() {\n\n\t\tint[] arr1 = { 0, 0, 0 };\n\t\tint[] arr2 = { 0, 0, 0, 0 };\n\t\tint[] arr3 = { 0, 0 };\n\t\tint[] arr4 = { 0, 0 };\n\t\tSLLSet listObj100 = new SLLSet(arr1);\n\t\tSLLSet listObj99 = new SLLSet(arr2);\n\t\tSLLSet listObj98 = new SLLSet(arr3);\n\t\tSLLSet listObj97 = new SLLSet(arr4);\n\t\tSLLSet listObj96 = new SLLSet();\n\t\tSLLSet[] Array = { listObj100, listObj99, listObj98, listObj97, listObj96 }; // test static SLLSet union(sArray)\n\n\t\tSLLSet listObj23 = SLLSet.union(Array);\n\n\t\tString expected = \"0\";\n\t\tint expectedSize = 1;\n\n\t\tassertEquals(expectedSize, listObj23.getSize());\n\t\tassertEquals(expected, listObj23.toString());\n\n\t}", "@Test\n public void testUnion2IdenticalDataSets() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.get3TupleDataSet(env);\n DataSet<Tuple3<Integer, Long, String>> unionDs =\n ds.union(CollectionDataSets.get3TupleDataSet(env));\n\n List<Tuple3<Integer, Long, String>> result = unionDs.collect();\n\n String expected = FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING;\n\n compareResultAsTuples(result, expected);\n }", "@Test\n public void testUnionOnSchemaAdditionalColumn() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : long, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"l3 = load '\" + INP_FILE_EMPTY + \"' as (i : int, x : long);\"\n + \"u = union onschema l1, l2, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"u\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2,null,null,null,null)\",\n \"(5L,3,null,null,null,null)\",\n \"(1L,2,'abc',{(1,'a'),(1,'b')},(1,'c'),null)\",\n \"(5L,3,'def',{(2,'a'),(2,'b')},(2,'c'),null)\",\n\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "public Set Union(Set secondSet) {\n\t\t\n\t\tArrayList<String> firstArray = noDuplicates(stringArray);\n\t\t// Taking out duplications out of our sets by calling the noDuplicates private function\n\t\tArrayList<String> secondArray = noDuplicates(secondSet.returnArray());\n\t\t\n\t\tArrayList<String> unionOfBoth = new ArrayList<String>();\n\t\t// New ArrayList to hold the final values\n\t\t\n\t\tfor (int i=0; i < 10; i++) {\n\t\t\tif (firstArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(firstArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (secondArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(secondArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSet unionReturn = new Set(unionOfBoth); // Initiate a Set object from out final ArrayList\n\t\t\n\t\treturn unionReturn; // Return the final Set Object\n\t}", "public void union(Shape s);", "private static int[] union(int[] items1, int[] items2) {\n\t\tSet<Integer> itemSet = new HashSet<Integer>();\n\t\tfor(int i : items1) {\n\t\t\titemSet.add(i);\n\t\t}\n\t\tfor(int i : items2){\n\t\t\titemSet.add(i);\n\t\t}\n\t\tint[] items = new int[itemSet.size()];\n\t\tint i = 0;\n\t\tfor(int val : itemSet){\n\t\t\titems[i++] = val; \n\t\t}\n\t\treturn items;\n\t}", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testUnionWithNullInput() {\n\t\t\ttestingSet = new IntegerSet(null);\r\n\t\t\ttestingSet2= new IntegerSet(null); \r\n\t\t\t// union of 2 sets should result in null value \r\n\t\t\ttestingSet3= testingSet.union(testingSet, testingSet2);\r\n\t\t\t\r\n\t\t}", "@Override\n public SetI union(SetI other) {\n Set o;\n\n if (!(other instanceof Set)) {\n // Different Set impl. Convertion needed.\n // Will impact performance.\n o = Set.fromAnotherImpl(other);\n }\n else {\n o = (Set) other;\n }\n\n int[] newArr = new int[count + o.count];\n int i = 0, j = 0, k = 0;\n\n // Merge sorted arrays.\n while (i < count && j < o.count) {\n // Skip duplicated elements.\n if (contains(o.arr[j])) {\n ++j;\n }\n else if (arr[i] < o.arr[j]) {\n newArr[k++] = arr[i++];\n }\n else {\n newArr[k++] = o.arr[j++];\n }\n }\n\n while (i < count) {\n newArr[k++] = arr[i++];\n }\n\n while (j < o.count) {\n // Skip duplicated elements.\n if (!contains(o.arr[j])) {\n newArr[k++] = o.arr[j];\n }\n ++j;\n }\n\n return new Set(newArr, k);\n }", "public org.w3c.dom.NodeList union(org.w3c.dom.NodeList list1, org.w3c.dom.NodeList list2)throws Exception{\n\t return super.execute(list1, list2, op);\n }", "@Test\n public void testUnionOnSchemaFilter() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, x : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"u = union onschema l1, l2;\"\n + \"fil = filter u by i == 5 and (x is null or x != 1);\"\n ; \n Util.registerMultiLineQuery(pig, query);\n \n Schema sch = pig.dumpSchema(\"fil\");\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, x: int, j: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n\n Iterator<Tuple> it = pig.openIterator(\"fil\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(5,null,3)\",\n \"(5,3,null)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "void union(int x, int y) {\n\n // **** set the modes in the parents array ****\n if (parents[x] == 0)\n parents[x] = x;\n\n if (parents[y] == 0)\n parents[y] = y;\n\n // **** update the representative element of each set ****\n if (parents[x] != 0 || parents[y] != 0) {\n\n // **** get the low and high from these nodes ****\n int high = Math.max(parents[x], parents[y]);\n int low = Math.min(parents[x], parents[y]);\n\n // ???? ????\n System.out.println(\"union <<< high: \" + high + \" low: \" + low);\n\n // **** update to point to the proper representative ****\n for (int i = 0; i < parents.length; i++) {\n if (parents[i] == high)\n parents[i] = low;\n }\n }\n }", "@Test\r\n public void testUnion1() {\r\n int actual[] = set1.unionOfSets(set2);\r\n Assert.assertArrayEquals(new int[] { 1, 2, 3, 4, 5 }, actual);\r\n }", "default Stream<T> union(@Nullable String name, Stream<T> other) {\n return union(name, Arrays.asList(other));\n }", "@Test\n public void testUnionOnSchemaByteArrayConversions() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : bytearray, x : bytearray, j : bytearray \" \n + \", b : bytearray); \"\n + \"l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : long, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"u = union onSchema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"u\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,null,2,{(1,'a'),(1,'b')},'abc')\",\n \"(1L,'abc',2,{(1,'a'),(1,'b')},null)\",\n \"(5L,null,3,{(2,'a'),(2,'b')},'def')\",\n \"(5L,'def',3,{(2,'a'),(2,'b')},null)\", \n });\n //update expectedRes to use bytearray instead of chararray in 2nd field\n for(Tuple t : expectedRes){\n if(t.get(1) != null){\n t.set(1, new DataByteArray(t.get(1).toString()));\n }\n }\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "protected abstract NativeSQLStatement createNativeGeomUnionStatement(Geometry geom);", "public void union(int p, int q) {\n int i = root(p);\n int j = root(q);\n \n if( i == j) {\n return;\n }\n \n id[i] = j;\n count--;\n }", "public static MyLinkedList getUnion(MyLinkedList list1, MyLinkedList list2)\n {\n HashSet<Integer> set = new HashSet<>();\n\n Node temp = list1.getStart();\n while(temp != null)\n {\n set.add(temp.key);\n temp = temp.next;\n }\n\n temp = list2.getStart();\n while(temp != null)\n {\n set.add(temp.key);\n temp = temp.next;\n }\n\n MyLinkedList union = new MyLinkedList();\n for(int key : set)\n {\n union.addNode(new Node(key));\n }\n\n return union;\n }", "public NodeUnion<? extends IdentifierListNode> getUnionForTargets();", "public Shingle union(final Shingle other) {\n List<Double> union = new ArrayList<Double>(this.size() + other.size());\n for (Double f : data) {\n union.add(f);\n }\n for (Double f : other.getData()) {\n union.add(f);\n }\n Shingle shingle = new Shingle(union);\n shingle.unique();\n return shingle;\n }", "public void union(int p, int q) {\n int pRoot = getRoot(p);\n int qRoot = getRoot(q);\n nodes[pRoot] = qRoot;\n }", "public void union(Node a, Node b) {\n Node set1 = find(a);\n Node set2 = find(b);\n\n if (set1 != set2) {\n // Limits the worst case runtime of a find to O(log N)\n if (set1.getSize() < set2.getSize()) {\n set2.setParent(set1);\n set1.setSize(set1.getSize() + set2.getSize());\n }\n else {\n set1.setParent(set2);\n set2.setSize(set1.getSize() + set2.getSize());\n }\n }\n }", "@Test\n public void testUnionOnSchemaInputUdfs() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : chararray);\"\n + \"f1 = foreach l1 generate i, CONCAT(j,j) as cj, \" +\n \t\t\"org.apache.pig.test.TestUnionOnSchema\\\\$UDFTupleNullSchema(i,j) as uo;\"\n + \"u = union onschema f1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n\n Schema sch = pig.dumpSchema(\"u\");\n String expectedSch = \"{i: int,cj: chararray,uo: (),j: chararray}\";\n Assert.assertTrue( expectedSch.equals( sch.toString() ) );\n \n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,null,null,'2')\",\n \"(5,null,null,'3')\",\n \"(1,'22',(1,'2'),null)\",\n \"(5,'33',(5,'3'),null)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "public static FlavorSet union(FlavorSet a, FlavorSet b) {\n if (a.isEmpty()) {\n return b;\n } else if (b.isEmpty()) {\n return a;\n } else {\n return new FlavorSet(\n Stream.concat(a.flavors.stream(), b.flavors.stream())\n .collect(ImmutableSortedSet.toImmutableSortedSet(FLAVOR_ORDERING)));\n }\n }", "void union(int a, int b) {\n\t\tif (a==9 && b==4){\r\n\t\tSystem.out.println(\"DEBUGGING 9 AND 4\");\r\n\t\tSystem.out.println(\"size of A: \"+ sizeOf(a));\r\n\t\tSystem.out.println(\"size of B: \"+ sizeOf(b));\r\n\t\t}\r\n\t\tint rootB = getRoot(b); // N array access\r\n\t\tint rootA = getRoot(a); // N array access\r\n\t\tif (rootA==rootB)return;\r\n\r\n\t\tif (sizeOf(rootA)<sizeOf(rootB)){\r\n\t\t\tidNode[rootA] = rootB; // 1 array access\r\n\t\t}\r\n\t\telse{\r\n\t\t\tidNode[rootB] = rootA; // 1 array access\r\n\t\t}\r\n\t}", "@Test\n public void testUnionOnSchemaUdfTypeEvolution() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \" l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"f1 = foreach l1 generate i, MAX(b.c1) as mx;\"\n + \"f2 = foreach l2 generate i, COUNT(b.c1) as mx;\"\n\n ; \n String query = query_prefix + \"u = union onschema f1, f2;\";\n Util.registerMultiLineQuery(pig, query);\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n // verify schema for reverse order of relations as well\n query = query_prefix + \"u = union onschema f2, f1;\";\n Util.registerMultiLineQuery(pig, query);\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,1L)\",\n \"(5,2L)\",\n \"(1,2L)\",\n \"(5,2L)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "public void unionOf(IntegerSet set1, IntegerSet set2) {\n get = new int[0];\n for (int i : set1.get)\n insertElement(i);\n for (int i : set2.get)\n insertElement(i);\n }", "public void union(int p, int q)\n {\n int i = root(p);\n int j = root(q);\n if ( i == j ) return;\n \n if ( sz[i] < sz[j] ) { \n // i is no longer a root, so we don't need to update the size\n id[i] = j; sz[j] += sz[i];\n }\n else {\n id[j] = i; sz[i] += sz[j]; \n } \n }", "public CreateUnionResponse createUnion(CreateUnionRequest request) throws GPUdbException {\n CreateUnionResponse actualResponse_ = new CreateUnionResponse();\n submitRequest(\"/create/union\", request, actualResponse_, false);\n return actualResponse_;\n }", "public SetSet setUnion(SetSet second){\n\t\tSetSet result = new SetSet(contents);\n\t\tfor(int i=0;i<second.size();i++){\n\t\t\tresult.add(second.get(i));\n\t\t}\n\t\treturn result;\n\t}", "UnionSecuenciaLuz createUnionSecuenciaLuz();", "@Test\n public void testUnionOnSchemaUdfTypeEvolution2() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \" l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"f1 = foreach l1 generate i, MAX(b.c1) as mx;\"\n + \"f11 = foreach f1 generate i, mx;\"\n + \"f2 = foreach l2 generate i, COUNT(b.c1) as mx;\"\n + \"f22 = foreach f2 generate i, mx;\"\n\n ; \n String query = query_prefix + \"u = union onschema f11, f22;\";\n Util.registerMultiLineQuery(pig, query);\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n // verify schema for reverse order of relations as well\n query = query_prefix + \"u = union onschema f22, f11;\";\n Util.registerMultiLineQuery(pig, query);\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,1L)\",\n \"(5,2L)\",\n \"(1,2L)\",\n \"(5,2L)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "@Override\r\n protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq) {\r\n String msg = \"InlineView must not need UNION method: \" + bq + \" : \" + uq;\r\n throw new IllegalConditionBeanOperationException(msg);\r\n }", "protected boolean union(int id1, int id2) \n\t{\n\t\t// Find the parents of both nodes.\n\t\tint root1 = find(id1);\n\t\tint root2 = find(id2);\n\t\t\n\t\t// No union needed.\n\t\tif (root1 == root2)\n\t\t{\n\t\t //Return that the two values were already in the same tree\n\t\t return false;\n\t\t}\n\t\t\n\t\t//Combine the trees with these two roots\n\t\tparents[root1] = root2;\n\t\t\n\t\t// We successfully did a union.\n\t\treturn true;\n\t}", "public void union(BlastGraph<HitVertex, ValueEdge> graphToUnion) {\n\t\tfor (HitVertex hv : graphToUnion.getVertices()) {\n\t\t\tthis.addVertex(hv);\n\t\t}\n\n\t\tfor (ValueEdge ve : graphToUnion.getEdges()) {\n\t\t\tthis.addEdge(ve, graphToUnion.getEndpoints(ve));\n\t\t}\n\t}", "@Test\n public void testUnionOnSchemaInnerSchema() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \"\n + \" (i : long, c : chararray, j : int \"\n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \"\n + \" (i : long, c : chararray, j : int \"\n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"u = union onschema l1, l2; \"\n // The addition in the inner foreach will fail if the inner schema's uids\n // are all set to -1, since the code that finds the inner load's schema will\n // match the last item in b's schema, which is a chararray\n + \"p = foreach u { x = foreach b GENERATE c1 + 5 as c3; GENERATE i, c, x; }\";\n\n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"p\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"p\");\n\n List<Tuple> expectedRes =\n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,'abc',{(6),(6)})\",\n \"(5L,'def',{(7),(7)})\",\n \"(1L,'abc',{(6),(6)})\",\n \"(5L,'def',{(7),(7)})\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "public ISet<E> union(ISet<E> otherSet) {\n\t\tif (otherSet == null)\n\t\t\tthrow new IllegalArgumentException(\"The given set is null.\");\n\t\tISet<E> result = this.difference(otherSet);\n\t\tresult.addAll(this.intersection(otherSet));\n\t\tresult.addAll(otherSet.difference(this));\n\t\treturn result;\n\t}", "public final AstValidator.union_clause_return union_clause() throws RecognitionException {\n AstValidator.union_clause_return retval = new AstValidator.union_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree UNION342=null;\n CommonTree ONSCHEMA343=null;\n AstValidator.rel_list_return rel_list344 =null;\n\n\n CommonTree UNION342_tree=null;\n CommonTree ONSCHEMA343_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:14: ( ^( UNION ( ONSCHEMA )? rel_list ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:16: ^( UNION ( ONSCHEMA )? rel_list )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n UNION342=(CommonTree)match(input,UNION,FOLLOW_UNION_in_union_clause2873); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n UNION342_tree = (CommonTree)adaptor.dupNode(UNION342);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(UNION342_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:25: ( ONSCHEMA )?\n int alt99=2;\n int LA99_0 = input.LA(1);\n\n if ( (LA99_0==ONSCHEMA) ) {\n alt99=1;\n }\n switch (alt99) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:25: ONSCHEMA\n {\n _last = (CommonTree)input.LT(1);\n ONSCHEMA343=(CommonTree)match(input,ONSCHEMA,FOLLOW_ONSCHEMA_in_union_clause2875); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n ONSCHEMA343_tree = (CommonTree)adaptor.dupNode(ONSCHEMA343);\n\n\n adaptor.addChild(root_1, ONSCHEMA343_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_rel_list_in_union_clause2878);\n rel_list344=rel_list();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, rel_list344.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public void union(int p, int q) {\n\t\tint rootP = find(p);\n\t\tint rootQ = find(q);\n\t\tif (rootQ == rootP)\n\t\t\treturn;\n\t\tid[rootQ] = rootP;\n\t\tcount--;\n\t}", "private NFA union(NFA nfa1, NFA nfa2) {\n NFA result = new NFA();\n\n String startState = String.valueOf(stateInc++);\n result.addStartState(startState);\n result.addNFAStates(nfa1.getStates());\n result.addNFAStates(nfa2.getStates());\n result.addTransition(startState, 'e', nfa1.getStartState().getName());\n result.addTransition(startState, 'e', nfa2.getStartState().getName());\n result.addAbc(nfa1.getABC());\n result.addAbc(nfa2.getABC());\n\n return result;\n\n }", "@Test\n public void testUnionOnSchemaIncompatibleTypes() throws Exception {\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\";\n\n checkSchemaEx(query, \"Cannot cast from chararray to bytearray\");\n\n //without \"onschema\"\n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union l1, l2;\";\n\n checkSchemaEx(query, \"Cannot cast from chararray to bytearray\");\n\n\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : map[ ], y : chararray);\"\n + \"u = union onschema l1, l2;\"\n ; \n checkSchemaEx(query, \"Cannot cast from long to bytearray\");\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : map[ ], y : chararray);\"\n + \"u = union l1, l2;\"\n ;\n checkSchemaEx(query, \"Cannot cast from long to bytearray\");\n\n // bag column with different internal column types\n query =\n \" l1 = load '\" + INP_FILE_2NUMS \n + \"' as (x : long, b : bag { t : tuple (c1 : int, c2 : chararray)} );\"\n \n + \"l2 = load '\" + INP_FILE_2NUMS \n + \"' as (x : long, b : bag { t : tuple (c1 : long, c2 : chararray)} );\"\n + \"u = union onschema l1, l2;\"\n ; \n Schema sch = new Schema();\n sch.add(new FieldSchema(\"x\", DataType.LONG));\n Schema bagInnerSchema = new Schema();\n bagInnerSchema.add(new FieldSchema(null, new Schema(), DataType.TUPLE));\n sch.add(new FieldSchema(\"b\", bagInnerSchema, DataType.BAG));\n checkSchemaEquals(query, sch);\n \n // tuple column with different internal column types\n query =\n \" l1 = load '\" + INP_FILE_2NUMS \n + \"' as (t : tuple (c1 : int, c2 : chararray) );\"\n \n + \"l2 = load '\" + INP_FILE_2NUMS \n + \"' as (t : tuple (c1 : long, c2 : chararray) );\"\n + \"u = union onschema l1, l2;\"\n ; \n sch = new Schema();\n sch.add(new FieldSchema(\"t\", new Schema(), DataType.TUPLE));\n checkSchemaEquals(query, sch);\n }", "public void union(String first, String second) {\n\t\t\n\t\tString firstRepresentative = find(first);\n\t\tString secondRepresentative = find(second);\n\t\t\n\t\tSet<String> firstSet = null;\n\t\tSet<String> secondSet = null;\n\t\t\n\t\t//look for the sets containing the first and second elements \n\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\tfirstSet = map.get(firstRepresentative);\n\t\t\t}\n\t\t\tif(map.containsKey(secondRepresentative)) {\n\t\t\t\tsecondSet = map.get(secondRepresentative);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(firstSet != null && secondSet != null) {\n\t\t\t\n\t\t\t//merge the two sets\n\t\t\tfirstSet.addAll(secondSet);\n\t\t\t\n\t\t\t//select a representative and delete the set already merged \n\t\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\t\tmap.put(firstRepresentative, firstSet);\n\t\t\t\t}\n\t\t\t\telse if(map.containsKey(secondRepresentative)) {\n\t\t\t\t\tmap.remove(secondRepresentative);\n\t\t\t\t\tdisjointSet.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "@Test\n public void testUnionOnSchemaScopedColumnNameBothInp1() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query = \n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int); \" \n + \"g1 = group l1 by i; \"\n + \"f1 = foreach g1 generate group as gkey, flatten(l1); \"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, x : chararray); \" \n + \"g2 = group l2 by i; \"\n + \"f2 = foreach g2 generate group as gkey, flatten(l2); \"\n + \"u = union onschema f1, f2; \" ; \n Util.registerMultiLineQuery(pig, query);\n \n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"gkey: int, l1::i: int, l1::j: int, l2::i: int, l2::x: chararray\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,1,2,null,null)\",\n \"(5,5,3,null,null)\",\n \"(1,null,null,1,'2')\",\n \"(5,null,null,5,'3')\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n MemberRoleCQ bq = (MemberRoleCQ)bqs;\n MemberRoleCQ uq = (MemberRoleCQ)uqs;\n if (bq.hasConditionQueryMember()) {\n uq.queryMember().reflectRelationOnUnionQuery(bq.queryMember(), uq.queryMember());\n }\n if (bq.hasConditionQueryRole()) {\n uq.queryRole().reflectRelationOnUnionQuery(bq.queryRole(), uq.queryRole());\n }\n }", "public ArrayList<Predmet> union(ArrayList<ArrayList<Predmet>> listU){\n\t\tSet<Predmet> set = new HashSet<Predmet>();\n\t\t\n\t\tfor(ArrayList<Predmet> p : listU)\n\t\t\tset.addAll(p);\n\t\t\n\t\treturn new ArrayList<Predmet>(set);\n\t}", "public static boolean union(int a, int b, int p[], int r[]){\n int pa=find(a,p,r);\r\n int pb=find(b,p,r);\r\n if(pa==pb)\r\n return true;\r\n if(pa!=pb)\r\n {\r\n if(r[pa]<r[pb])\r\n {\r\n p[pa]=pb;\r\n }\r\n else if(r[pa]>r[pb])\r\n {\r\n p[pb]=pa;\r\n }\r\n else\r\n {\r\n p[pa]=pb;\r\n r[pb]++;\r\n }\r\n }\r\n return false;\r\n }" ]
[ "0.7140841", "0.6779809", "0.6779809", "0.6779809", "0.67228836", "0.66018426", "0.64391595", "0.6425165", "0.63613176", "0.6357563", "0.62138647", "0.6157212", "0.6149635", "0.61066777", "0.61047894", "0.61013365", "0.60985506", "0.60628116", "0.6046059", "0.6017997", "0.601615", "0.600903", "0.6007571", "0.5999085", "0.59733063", "0.59721196", "0.5959442", "0.59586984", "0.5946818", "0.59399813", "0.593365", "0.5921558", "0.5911605", "0.5897287", "0.5884467", "0.5863198", "0.586079", "0.5860293", "0.581121", "0.5798995", "0.57896084", "0.57833195", "0.5781597", "0.5772711", "0.5771323", "0.57702374", "0.5756274", "0.5745556", "0.57374597", "0.5716838", "0.57103884", "0.5707612", "0.57057405", "0.57041126", "0.56951326", "0.56915593", "0.56913024", "0.5670514", "0.5640017", "0.5636321", "0.56153065", "0.5585756", "0.5583034", "0.5567373", "0.5552116", "0.5543904", "0.5526596", "0.55221254", "0.5507085", "0.55026144", "0.5496917", "0.5494927", "0.548892", "0.5462852", "0.54593366", "0.54566747", "0.5454908", "0.5430367", "0.5426435", "0.54226834", "0.54077345", "0.5400011", "0.5399832", "0.5398856", "0.53774893", "0.5376942", "0.5369353", "0.53595716", "0.5349426", "0.5347827", "0.5340334", "0.53246635", "0.53175986", "0.53171194", "0.5315955", "0.53134465", "0.5304605", "0.5300305", "0.52976865", "0.52960217" ]
0.56924355
55
=================================================================================== Foreign Query ============= Get the conditionquery for relation table. WHITE_STILETTO_ALIAS by my STILETTO_ALIAS_ID, named 'whiteStilettoAlias'.
public WhiteStilettoAliasCQ queryWhiteStilettoAlias() { return xdfgetConditionQueryWhiteStilettoAlias(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n \tpublic void whereClauseIndirectPointingRelation() {\n \t\tnode23.addJoin(new PointingRelation(node42, NAME));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'p'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\")\n \t\t);\n \t}", "@Test\n \tpublic void whereClauseDirectPointingRelation() {\n \t\tnode23.addJoin(new PointingRelation(node42, NAME, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'p'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \n \t\t);\n \t}", "@Test\n \tpublic void whereClauseForNodeIndirectDominance() {\n \t\tnode23.addJoin(new Dominance(node42));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\")\n \t\t);\n \t}", "public String getCondition(int nodeStatus) {\n\n String condition = null;\n /* if relation node then need to check only the conditions that are associated with only one relation */\n if (nodeStatus == RELATION_NODE_STATUS) {\n for (Map.Entry<String, LinkedList<String>> entry : optimizedWhere.entrySet())\n //If relation node then condition will be associated with only one node.\n if (entry.getValue().size() == 1)\n if (associatedRelations.get(0).equalsIgnoreCase(entry.getValue().get(0))) {\n condition = entry.getKey();\n optimizedWhere.remove(entry.getKey());\n return condition;\n }\n }\n //if it's a cartesian node then for evert condition with 2 relations associated-> check if there is a match in the associatedRelations list\n else if (nodeStatus == CARTESIAN_NODE_STATUS)\n for(Map.Entry<String, LinkedList<String>> entry: optimizedWhere.entrySet())\n\n //If two relations are associated then only then do the check if both relations are elements of the list if yes then return condition\n if (entry.getValue() != null && entry.getValue().size() == 2)\n for (int i = 0; i < associatedRelations.size(); i++) {\n //if we have a match with the association list we get the index of the second element in the entry list\n if (entry.getValue() != null && entry.getValue().contains(associatedRelations.get(i))) {\n\n int indexOfCurrent = entry.getValue().indexOf(associatedRelations.get(i));\n int otherIndex;\n if (indexOfCurrent == 1) otherIndex = 0;\n else otherIndex = 1;\n /*check if the second element of the entry list is a relation included in the associatedRelation list if yes then there is a condition\n * if there is already a condition in that node then add AND Also set the entry value to null so that it won't be checked again*/ //-> cannot delete because get exception !!\n\n if (associatedRelations.contains(entry.getValue().get(otherIndex))) {\n if(condition == null) condition = entry.getKey();\n else\n condition = condition + \" AND \" + entry.getKey();\n entry.setValue(null);\n }\n }\n }\n return condition;\n }", "@Test\n \tpublic void whereClauseForNodeDirectDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \t\t);\n \t}", "@Test\n \tpublic void whereClauseDirectDominanceNamed() {\n \t\tnode23.addJoin(new Dominance(node42, NAME, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \t\t);\n \t}", "@Override\n\tprotected String getWhereConditionBaseOnIdRecord()\n\t{\n\t\tStringBuilder whereCondition = new StringBuilder(\"GAZOID='\");\n\t\twhereCondition.append(getMyDataModel().getOptionId());\n\t\twhereCondition.append(\"'and GAZFLD='\");\n\t\twhereCondition.append(getMyDataModel().getFieldId());\n\t\twhereCondition.append(\"'and GAZPVN='\");\n\t\twhereCondition.append(getMyDataModel().getPvId());\n\t\twhereCondition.append(\"'and GAZTYP='\");\n\t\twhereCondition.append(getMyDataModel().getType());\n\t\twhereCondition.append(\"'\");\n\t\treturn whereCondition.toString();\n\t}", "public HashMap<String,LinkedList<String>> splitWhere() {\n\n LinkedList<String> where = new LinkedList<>(whereClause);\n LinkedList<String> referencingRelations;\n LinkedList<MyRelation> relations;\n String temp;\n optimizedWhere = new HashMap<>();\n\n String whereString = new String(myHelper.getWhereFields(where));\n String[] whereParts = whereString.split(\"(?i)and\");\n\n //Iterates through all the parts divided by \"AND\"\n for (int i=0; i<whereParts.length; i++) {\n\n referencingRelations = new LinkedList<>();\n String symbol = myHelper.getSymbol(whereParts[i]);\n\n if(symbol != null) {\n String[] equationParts = whereParts[i].split(symbol);\n String condition = null;\n\n //For every side of the \"=\" sing.\n for(int j=0; j<equationParts.length; j++) {\n //Removes white spaces if any.\n equationParts[j] = equationParts[j].replaceAll(\"\\\\s\",\"\");\n\n //if there is a referencing table stores the table and and the field used is temporarily stored.\n if(equationParts[j].contains(\".\")) {\n referencingRelations.addLast(equationParts[j].substring(0, equationParts[j].indexOf(\".\")));\n temp = equationParts[j].substring(equationParts[j].indexOf(\".\")+1);\n\n }else {\n //if no \".\" p simeni en ksero se pio relation kamni reference enna to psaxo p to schema !!\n relations = schema.getRelations();\n String name = myHelper.getRelationNameOnField(equationParts[j],relations,newTablesFromCanonical);\n\n //if name is a field name add the table name to the referencing\n if(name != null) {\n referencingRelations.addLast(name);\n temp = equationParts[j];\n }\n else\n temp = equationParts[j].substring(equationParts[j].indexOf(\".\")+1);\n }\n if(j!= equationParts.length-1)\n condition = temp + symbol;\n else condition = condition + temp;\n }\n optimizedWhere.put(condition,referencingRelations);\n }\n }\n return optimizedWhere;\n }", "@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}", "@Test\n \tpublic void whereClauseForNodeExactDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 10));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\"),\n \t\t\t\tjoin(\"=\", \"_rank23.level\", \"_rank42.level\", -10)\n \t\t);\n \t}", "public String asWhereClause() {\r\n LinkedList<String> whereClause = new LinkedList<>();\r\n \r\n if (noInduk != null && !noInduk.isEmpty())\r\n whereClause.add(noIndukColName + \" LIKE '%\" + noInduk + \"%'\");\r\n \r\n if (currentLevel != null)\r\n whereClause.add(currentLevelColName + \" LIKE '%\" + currentLevel.asWhereClause() + \"%'\");\r\n \r\n if (biodata != null){\r\n String wc = biodata.asWhereClause();\r\n if(wc != null && !wc.isEmpty())\r\n whereClause.add(wc);\r\n }\r\n \r\n if (tanggalMasuk != null)\r\n whereClause.add(tanggalMasukColName + \" LIKE '%\" + tanggalMasuk.asWhereClause(true) + \"%'\");\r\n \r\n if (tanggalLulus != null)\r\n whereClause.add(tanggalLulusColName + \" LIKE '%\" + tanggalLulus.asWhereClause(true) + \"%'\");\r\n if (gelombang != null)\r\n whereClause.add(gelombangColName + \" = '\" + gelombang + \"'\");\r\n if (statusPendaftaran != null)\r\n whereClause.add(statusPendaftaranColName + \" = '\" + statusPendaftaran + \"'\");\r\n if (lastUpdateDate != null)\r\n whereClause.add(lastUpdateDateColName + \" LIKE '%\" + lastUpdateDate.asWhereClause(true) + \"%'\");\r\n return whereClause.isEmpty()? \"\" : StringUtils.join(whereClause, \" AND \");\r\n }", "@Test\n \tpublic void whereClauseForNodeIndirectPrecedence() {\n \t\tnode23.addJoin(new Precedence(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"<\", \"_node23.right_token\", \"_node42.left_token\")\n \t\t);\n \t}", "@Test\n \tpublic void whereClauseForNodeDirectPrecedence() {\n \t\tnode23.addJoin(new Precedence(node42, 1));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"=\", \"_node23.right_token\", \"_node42.left_token\", -1)\n \t\t);\n \t}", "String getWhereClause();", "protected String getSQLWhere()\n \t{\n \t\tStringBuffer sql = new StringBuffer();\n \t\tif (fDocumentNo.getText().length() > 0)\n \t\t\tsql.append(\" AND UPPER(p.DocumentNo) LIKE ?\");\n if (fRoutingNo.getText().length() > 0)\n sql.append(\" AND UPPER(p.RoutingNo) LIKE ?\"); // Marcos Zúñiga\n if (fCheckNo.getText().length() > 0)\n sql.append(\" AND UPPER(p.CheckNo) LIKE ?\"); // Marcos Zúñiga\n if (fA_Name.getText().length() > 0)\n sql.append(\" AND UPPER(p.A_Name) LIKE ?\"); // Marcos Zúñiga\n \t\tif (fDateFrom.getValue() != null || fDateTo.getValue() != null)\n \t\t{\n \t\t\tTimestamp from = (Timestamp)fDateFrom.getValue();\n \t\t\tTimestamp to = (Timestamp)fDateTo.getValue();\n \t\t\tif (from == null && to != null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) <= ?\");\n \t\t\telse if (from != null && to == null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) >= ?\");\n \t\t\telse if (from != null && to != null)\n \t\t\t\tsql.append(\" AND TRUNC(p.DateTrx) BETWEEN ? AND ?\");\n \t\t}\n \t\t//\n \t\tif (fAmtFrom.getValue() != null || fAmtTo.getValue() != null)\n \t\t{\n \t\t\tBigDecimal from = (BigDecimal)fAmtFrom.getValue();\n \t\t\tBigDecimal to = (BigDecimal)fAmtTo.getValue();\n \t\t\tif (from == null && to != null)\n \t\t\t\tsql.append(\" AND p.PayAmt <= ?\");\n \t\t\telse if (from != null && to == null)\n \t\t\t\tsql.append(\" AND p.PayAmt >= ?\");\n \t\t\telse if (from != null && to != null)\n \t\t\t\tsql.append(\" AND p.PayAmt BETWEEN ? AND ?\");\n \t\t}\n \t\tsql.append(\" AND p.IsReceipt=?\");\n \n \t\t// sql.append(\" AND p.IsReconciled='N'\");\n \n \t\tlog.fine(sql.toString());\n \t\treturn sql.toString();\n \t}", "public String getReferenceCondition()\n\t\t\tthrows ReadWriteException\n\t{\n\t\tStringBuffer stbf = new StringBuffer(512) ;\n\t\tboolean existFlg = false ;\n\t\tint s_cond = 0 ; // AND 又は OR条件\n\t\tint st_Parenthesis = 0 ; // ’(’文字数\n\t\tint en_Parenthesis = 0 ; // ’)’文字数\n\t\tint total_stparen = 0 ; // ’(’トータル文字数\n\t\tint total_enparen = 0 ; // ’)’トータル文字数\n\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableValue() != null)\n\t\t\t{\n\t\t\t\ts_cond = ky.getTableCondtion() % 10 ;\n\t\t\t\tst_Parenthesis = ky.getTableCondtion() / 100 ;\n\t\t\t\ten_Parenthesis = (ky.getTableCondtion() / 10) % 10 ;\n\n\t\t\t\ttotal_stparen += st_Parenthesis ;\n\t\t\t\ttotal_enparen += en_Parenthesis ;\n\n\t\t\t\t//#CM708950\n\t\t\t\t// set the '(' character for necessary part. \n\t\t\t\tfor (int lp = 0; lp < st_Parenthesis; lp++)\n\t\t\t\t\tstbf.append(\"(\") ;\n\n\t\t\t\t//#CM708951\n\t\t\t\t// Use the LIKE retrieval when whether the pattern collation is included when the character value is verified, and it exists. \n\t\t\t\tif (ky.getTableValue() instanceof String)\n\t\t\t\t{\n\t\t\t\t\tif (DBFormat.isPatternMatching((String)ky.getTableValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t\tstbf.append(\" LIKE \") ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//#CM708952\n\t\t\t\t\t\t// Replace it with IS NULL. \n\t\t\t\t\t\tif(((String)ky.getTableValue()).trim().equals(\"\") && \n\t\t\t\t\t\t!ky.getTableCompCode().equals(\"IS NOT NULL\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstbf.append(\"IS NULL\") ;\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\tstbf.append(ky.getTableCompCode()) ;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t\tstbf.append(ky.getTableCompCode()) ;\n\t\t\t\t\tstbf.append(\" \") ;\n\t\t\t\t}\n\t\t\t\tif (ky.getTableValue() instanceof String\n\t\t\t\t\t\t&& !((String)ky.getTableValue()).trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tstbf.append(DBFormat.format(((String)ky.getTableValue())).replaceAll(\n\t\t\t\t\t\t\t\"[\" + WmsParam.PATTERNMATCHING + \"]\", \"%\")) ;\n\t\t\t\t}\n\t\t\t\telse if (ky.getTableValue() instanceof Date)\n\t\t\t\t{\n\t\t\t\t\tstbf.append(DBFormat.format((Date)ky.getTableValue())) ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableValue()) ;\n\t\t\t\t}\n\n\t\t\t\t//#CM708953\n\t\t\t\t// set the ')' character for necessary part. \n\t\t\t\tfor (int lp = 0; lp < en_Parenthesis; lp++)\n\t\t\t\t\tstbf.append(\")\") ;\n\n\t\t\t\tif (s_cond == 0)\n\t\t\t\t{\n\t\t\t\t\tstbf.append(\" AND \") ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(\" OR \") ;\n\t\t\t\t}\n\n\t\t\t\tif (existFlg == false)\n\t\t\t\t\texistFlg = true ;\n\t\t\t}\n\t\t}\n\t\t//#CM708954\n\t\t// Return null when data is not set in the key value. \n\t\tif (existFlg == false)\n\t\t\treturn null ;\n\n\t\t//#CM708955\n\t\t// It returns ReadWriteException when Condition () is not corresponding. \n\t\tif (total_stparen != total_enparen)\n\t\t{\n\t\t\tRmiMsgLogClient.write(6006010, LogMessage.F_ERROR, \"SQLSearchKey\", null) ;\n\t\t\tthrow (new ReadWriteException(\"6006002\" + wDelim + \"SQLSearchKey\")) ;\n\t\t}\n\t\t//#CM708956\n\t\t// The last \"AND\" is removed because it is extra. \n\t\tint ep = 0 ;\n\t\tif (s_cond == 0)\n\t\t{\n\t\t\tep = stbf.toString().lastIndexOf(\"AND\") ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tep = stbf.toString().lastIndexOf(\"OR\") ;\n\t\t}\n\t\treturn stbf.toString().substring(0, ep) ;\n\t}", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\n\tprotected String getWhereConditionBaseOnIdRecord()\n\t{\n\t\tStringBuilder whereCondition = new StringBuilder(\"HBLNM='\");\n\t\twhereCondition.append(getMyDataModel().getLanguageCode());\n\t\twhereCondition.append(\"' and HBCFR='\");\n\t\twhereCondition.append(getMyDataModel().getFilePrefix());\n\t\twhereCondition.append(\"' and HBCFL='\");\n\t\twhereCondition.append(getMyDataModel().getFileKey());\n\t\twhereCondition.append(\"' \");\n\t\treturn whereCondition.toString();\n\t}", "java.lang.String getQueryLogicName();", "@Test\n \tpublic void whereClauseForNodeExactPrecedence() {\n \t\tnode23.addJoin(new Precedence(node42, 10));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"=\", \"_node23.right_token\", \"_node42.left_token\", -10));\n \t}", "private String getFieldEqualityQuery() {\n addTableNamesAndAliasesForJoinDefinition();\n\n appendSelectStatement();\n appendFieldEqualityClause();\n\n return builder.toString();\n }", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "@Override\n\tpublic String getSqlWhere() {\n\t\treturn null;\n\t}", "protected void createSubQueryJoinTable() throws ODataApplicationException {\r\n try {\r\n final List<JPAOnConditionItem> left = association\r\n .getJoinTable()\r\n .getJoinColumns(); // Team -->\r\n final List<JPAOnConditionItem> right = association\r\n .getJoinTable()\r\n .getInverseJoinColumns(); // Person -->\r\n createSelectClauseJoin(subQuery, queryRoot, right);\r\n Expression<Boolean> whereCondition = createWhereByAssociation(from, queryJoinTable, left);\r\n whereCondition = cb.and(whereCondition, createWhereByAssociation(queryJoinTable, queryRoot, right));\r\n subQuery.where(applyAdditionalFilter(whereCondition));\r\n } catch (final ODataJPAModelException e) {\r\n throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);\r\n }\r\n\r\n }", "@Test\n \tpublic void whereClauseForNodeInclusion() {\n \t\tnode23.addJoin(new Inclusion(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"<=\", \"_node23.left\", \"_node42.left\"),\n \t\t\t\tjoin(\">=\", \"_node23.right\", \"_node42.right\")\n \t\t);\n \t}", "protected Expression buildBSRJoinQuery() {\n try {\n final InputStream input = ResourceUtil.getResourceAsStream(QUERY_FILE);\n final QueryExpression query = QueryExpressionParser.parse(input);\n return query.toExpression(new ReferenceTable(catalog));\n } catch (final Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Test\n \tpublic void whereClauseForNodeName() {\n \t\tnode23.setName(\"name\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.name\", \"'name'\"));\n \t}", "public NestedClause getXQueryClause();", "public QbWhere where();", "protected void generateFromAndWhere( SQLQueryModel query, List<LogicalTable> usedBusinessTables, LogicalModel model,\n Path path, List<Constraint> conditions, Map<LogicalTable, String> tableAliases,\n Map<Constraint, SqlOpenFormula> constraintFormulaMap, Map<String, Object> parameters,\n boolean genAsPreparedStatement, DatabaseMeta databaseMeta, String locale ) throws PentahoMetadataException {\n\n // Boolean delayConditionOnOuterJoin = null;\n // Object val = null;\n // FROM TABLES\n for ( int i = 0; i < usedBusinessTables.size(); i++ ) {\n LogicalTable businessTable = usedBusinessTables.get( i );\n String schemaName = null;\n if ( businessTable.getProperty( SqlPhysicalTable.TARGET_SCHEMA ) != null ) {\n schemaName = databaseMeta.quoteField( (String) businessTable.getProperty( SqlPhysicalTable.TARGET_SCHEMA ) );\n }\n // ToDo: Allow table-level override of delaying conditions.\n // val = businessTable.getProperty(\"delay_table_outer_join_conditions\");\n // if ( (val != null) && (val instanceof Boolean) ) {\n // delayConditionOnOuterJoin = (Boolean)val;\n // } else {\n // delayConditionOnOuterJoin = null;\n // }\n\n // This code allows subselects to drive the physical model.\n // TODO: make this key off a metadata flag vs. the\n // beginning of the table name.\n\n String tableName = (String) businessTable.getProperty( SqlPhysicalTable.TARGET_TABLE );\n TargetTableType type = (TargetTableType) businessTable.getProperty( SqlPhysicalTable.TARGET_TABLE_TYPE );\n if ( type == TargetTableType.INLINE_SQL ) {\n tableName = \"(\" + tableName + \")\"; //$NON-NLS-1$ //$NON-NLS-2$\n } else {\n tableName = databaseMeta.getQuotedSchemaTableCombination( schemaName, tableName );\n }\n query.addTable( tableName, databaseMeta.quoteField( tableAliases.get( businessTable ) ) );\n }\n\n // JOIN CONDITIONS\n if ( path != null ) {\n for ( int i = 0; i < path.size(); i++ ) {\n LogicalRelationship relation = path.getRelationship( i );\n String joinFormula =\n getJoin( model, relation, tableAliases, parameters, genAsPreparedStatement, databaseMeta, locale );\n String joinOrderKey = relation.getJoinOrderKey();\n JoinType joinType;\n switch ( RelationshipType.getJoinType( relation.getRelationshipType() ) ) {\n case LEFT_OUTER:\n joinType = JoinType.LEFT_OUTER_JOIN;\n break;\n case RIGHT_OUTER:\n joinType = JoinType.RIGHT_OUTER_JOIN;\n break;\n case FULL_OUTER:\n joinType = JoinType.FULL_OUTER_JOIN;\n break;\n default:\n joinType = JoinType.INNER_JOIN;\n break;\n }\n\n String leftTableName =\n databaseMeta.getQuotedSchemaTableCombination( (String) relation.getFromTable().getProperty(\n SqlPhysicalTable.TARGET_SCHEMA ), (String) relation.getFromTable().getProperty(\n SqlPhysicalTable.TARGET_TABLE ) );\n String leftTableAlias = databaseMeta.quoteField( tableAliases.get( relation.getFromTable() ) );\n String rightTableName =\n databaseMeta.getQuotedSchemaTableCombination( (String) relation.getToTable().getProperty(\n SqlPhysicalTable.TARGET_SCHEMA ), (String) relation.getToTable().getProperty(\n SqlPhysicalTable.TARGET_TABLE ) );\n String rightTableAlias = databaseMeta.quoteField( tableAliases.get( relation.getToTable() ) );\n\n boolean legacyJoin = Boolean.TRUE.equals( model.getProperty( LEGACY_JOIN_ORDER ) );\n query.addJoin( leftTableName, leftTableAlias, rightTableName, rightTableAlias, joinType, joinFormula,\n joinOrderKey, legacyJoin );\n // query.addWhereFormula(joinFormula, \"AND\"); //$NON-NLS-1$\n }\n }\n\n // WHERE CONDITIONS\n if ( conditions != null ) {\n boolean first = true;\n for ( Constraint condition : conditions ) {\n SqlOpenFormula formula = constraintFormulaMap.get( condition );\n\n // Configure formula to use table aliases.\n formula.setTableAliases( tableAliases );\n\n // The ones with aggregates in it are for the HAVING clause.\n if ( !formula.hasAggregate() ) {\n\n String sqlFormula = formula.generateSQL( locale );\n String[] usedTables = formula.getLogicalTableIDs();\n query.addWhereFormula( sqlFormula, condition.getCombinationType().toString(), usedTables );\n first = false;\n } else {\n query.addHavingFormula( formula.generateSQL( locale ), condition.getCombinationType().toString() );\n }\n }\n }\n }", "protected String updateWhere() {\n String where = WHERE_CALENDARS_VISIBLE;\r\n if (mHideDeclined || !mShowDetailsInMonth) {\r\n where += \" AND \" + CalendarContract.Instances.SELF_ATTENDEE_STATUS + \"!=\"\r\n + CalendarContract.Attendees.ATTENDEE_STATUS_DECLINED;\r\n }\r\n return where;\r\n }", "Condition(Column col1, String relation, Column col2) {\n // YOUR CODE HERE\n }", "String getJournalsCentralGraphQuery();", "@Override\r\n public StringBuilder getWhereStatement(BuildingContext context, StringBuilder targetAlias, List<Object> params) {\n AbstractMsSQLDatabaseDialect dialect = (AbstractMsSQLDatabaseDialect)context.getDialect(); \r\n String schemaName;\r\n try{\r\n schemaName = dialect.getSchemaName();\r\n }catch(Exception e){\r\n throw new RuntimeException(\"Failed to get schema name from MSSQL Dialect\", e);\r\n }\r\n \r\n StringBuilder statement = new StringBuilder((schemaName.length() != 0 ? schemaName+\".\" : \"\"))\r\n .append(\"PREAD\")\r\n .append(\"(\")\r\n .append(QueryUtils.asPrefix(targetAlias)).append(dialect.convertColumnName(Constants.FIELD_ID))\r\n .append(\",\")\r\n .append(QueryUtils.asPrefix(targetAlias)).append(dialect.convertColumnName(Constants.TABLE_NODE__SECURITY_ID))\r\n .append(\",?,?,?,?)>0\");\r\n\r\n \r\n Collection<String> groups = context.getSession().getGroupIDs();\r\n Collection<String> contexts = context.getSession().getContextIDs();\r\n StringBuffer groupNames = new StringBuffer();\r\n int i = 0;\r\n for(String group:groups){\r\n if(i++>0) {\r\n groupNames.append(',');\r\n }\r\n \r\n groupNames.append(dialect.convertStringToSQL(group));\r\n }\r\n \r\n StringBuffer contextNames = new StringBuffer();\r\n i = 0;\r\n for(String c:contexts){\r\n if(i++>0)\r\n contextNames.append(',');\r\n \r\n contextNames.append(dialect.convertStringToSQL(c));\r\n }\r\n \r\n \r\n params.add(dialect.convertStringToSQL(context.getSession().getUserID()));\r\n params.add(groupNames.toString());\r\n params.add(contextNames.toString());\r\n params.add(context.isAllowBrowse());\r\n \r\n return statement;\r\n }", "public static final SourceModel.Expr showForeignBoolean(SourceModel.Expr b) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showForeignBoolean), b});\n\t\t}", "IDbQuery<R> setStraightJoin(boolean straightJoin);", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "String getMetadataWhereClause();", "@Test\n public void testSqlExistsWithForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n }", "@Test\n \tpublic void whereClauseForNodeRangedDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 10, 20));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\"),\n \t\t\t\t\"_rank23.level BETWEEN SYMMETRIC _rank42.level - 10 AND _rank42.level - 20\"\n \n \t\t);\n \t}", "private String getFilteringWhereClause(String tableAlias, boolean withWHERE) {\n StringBuilder expr = new StringBuilder();\n if (filter != null && filter.length()>0 && keywordAllFields != null && keywordAllFields.size()>0) {\n int i = 0;\n expr.append(withWHERE ? \" WHERE \" : \"\");\n for (String column : keywordAllFields) {\n if (i++==0) expr.append(\"concat(\");\n else expr.append(\",'||',\");\n if (tableAlias != null && tableAlias.length()>0) {\n expr.append(\"COALESCE(\");\n expr.append(tableAlias);\n expr.append(\".\");\n }\n expr.append(column);\n expr.append(\", '')\");\n }\n expr.append(\") like '%\");\n expr.append(filter);\n expr.append(\"%'\");\n }\n return expr.toString();\n }", "@Override\r\n\tpublic String getCondition(String[] sql) {\n\t\treturn sql[4];\r\n\t}", "public static String generateConditionJoin(String query_destino,\n\t\t\tString jdbcConexion, String usrConexion, String passConexion) {\n\n\t\tString conditionJoin = \"\";\n\t\tboolean first = true;\n\t\twhile (query_destino.contains(\"COND_\")) {\n\t\t\tint begin = query_destino.indexOf(\"COND_\");\n\t\t\tString aux = query_destino.substring(begin);\n\t\t\tint end = aux.indexOf(' ');\n\t\t\tint end2 = aux.indexOf(',');\n\n\t\t\tString column_name = \"\";\n\t\t\tif (end2 == -1) {\n\t\t\t\tcolumn_name = aux.substring(0, end);\n\t\t\t} else if (end2 > end) {\n\t\t\t\tcolumn_name = aux.substring(0, end);\n\t\t\t} else if (end > end2) {\n\t\t\t\tcolumn_name = aux.substring(0, end2);\n\t\t\t}\n\n\t\t\tif (first) {\n\t\t\t\tconditionJoin = \"a.\" + column_name + \" = b.\" + column_name;\n\t\t\t\tfirst = false;\n\t\t\t} else {\n\t\t\t\tconditionJoin = conditionJoin + \" AND a.\" + column_name\n\t\t\t\t\t\t+ \" = b.\" + column_name;\n\t\t\t}\n\n\t\t\tquery_destino = query_destino.substring(begin + 5);\n\t\t}\n\n\t\treturn conditionJoin;\n\t}", "private String getQuery(Predicate p, HashMap<String, String> keyObjects) {\n\tString query = \"\";\n\tString tableName = p.getName();\n\tfor (int i = 0; i < p.getVars().size(); i++) {\n\t String var = p.getVars().get(i);\n\t String propertyName = var;\n\t boolean isJoin = false;\n\t if (var.endsWith(\"*\")) {\n\t\tvar = var.substring(0, var.length() - 1);\n\t\tpropertyName = var;\n\t } else {\n\t\t// check if this var is in the hashmap\n\t\t// if it is, it is a foreign key, so I have to replace\n\t\t// the object with the one from the map\n\t\tString obj = keyObjects.get(var);\n\t\tif (obj != null) {\n\t\t var = obj;\n\t\t isJoin = true;\n\t\t}\n\t }\n\t objectURI.put(var, \"o_\" + tableName);\n\t if (isJoin)\n\t\tquery += \" ?o_\" + tableName + \" vocab:\" + tableName + \"_\"\n\t\t\t+ propertyName + \" ?\" + var + \" . \\n\";\n\t else\n\t\tquery += \" OPTIONAL { ?o_\" + tableName + \" vocab:\" + tableName\n\t\t\t+ \"_\" + propertyName + \" ?\" + var + \" . } \\n\";\n\t}\n\t// System.out.println(\"PQ=\" + query);\n\treturn query;\n }", "private String getQuery(String attribute, String condition){\n String query= \"Select \" + attribute + \"\\n\";\n query += \"From \" + TABLE + \"\\n\";\n query += \"Where \" +condition + \";\";\n return query;\n }", "public List<Column> getQueryDependColumns() {\n return queryDependendCollumns;\n }", "@Override\n final public String getInputRelation() {\n return \"SELECT * FROM TR1_DB1_PROPHECY_Q5_INNER\";\n }", "@Test\n \tpublic void whereClauseDirectDominanceNamedAndAnnotated() {\n \t\tnode23.addJoin(new Dominance(node42, NAME, 1));\n \t\tnode42.addNodeAnnotation(new Annotation(\"namespace3\", \"name3\", \"value3\", TextMatching.REGEXP_EQUAL));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \t\t);\n \t\tcheckWhereCondition(node42,\n \t\t\t\tjoin(\"=\", \"_annotation42.node_annotation_namespace\", \"'namespace3'\"),\n \t\t\t\tjoin(\"=\", \"_annotation42.node_annotation_name\", \"'name3'\"),\n \t\t\t\tjoin(\"~\", \"_annotation42.node_annotation_value\", \"'^value3$'\")\n \t\t);\n \t}", "String getQueryText() {\n AdqlSyntax syntax = AdqlSyntax.getInstance();\n StringBuffer sbuf = new StringBuffer();\n if ( talias_ != null ) {\n sbuf.append( syntax.quoteIfNecessary( talias_ ) )\n .append( \".\" );\n }\n String cname = cmeta_.getName();\n sbuf.append( quote_ ? syntax.quote( cname )\n : syntax.quoteIfNecessary( cname ) );\n if ( rename_ != null ) {\n sbuf.append( \" AS \" )\n .append( syntax.quoteIfNecessary( rename_ ) );\n }\n return sbuf.toString();\n }", "protected final String getWhereByNotNull(DyncParameterMap map, String tabName, String aliasTable) throws NestedException {\r\n\t\tTable tab = getTable(tabName);\r\n\t\ttab.setAnd(\"true\".equalsIgnoreCase(map.getString(\"cAndAndAnd\")));\r\n\t\tString where = null;\r\n\t\ttab.setParameterMap(map);\r\n\t\twhere = tab.getWhere(aliasTable);\r\n\t\tif (DataUtil.isNull(where)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\treturn new StringBuffer(\" and (\").append(where).append(\")\").toString();\r\n\t}", "private String[] getRelationshipQuery(Predicate p,\n\t HashMap<String, String> keyObjects) throws MediatorException {\n\tString query[] = new String[2];\n\tString tableName = p.getName();\n\tif (p.getVars().size() != 2) {\n\t throw new MediatorException(\n\t\t \"A relationship predicate must have exactly 2 attributes.\");\n\t}\n\tString var1 = p.getVars().get(0);\n\tString var2 = p.getVars().get(1);\n\tString obj = keyObjects.get(var1);\n\tif (obj != null)\n\t var1 = obj;\n\tobj = keyObjects.get(var2);\n\tif (obj != null)\n\t var2 = obj;\n\t// I don't know which way the relationship is, so go both ways\n\tquery[0] = \" ?\" + var2 + \" vocab:\" + dbName + tableName + \" ?\" + var1\n\t\t+ \" . \\n\";\n\tquery[1] = \" ?\" + var1 + \" vocab:\" + dbName + tableName + \" ?\" + var2\n\t\t+ \" . \\n\";\n\n\t// System.out.println(\"PQ=\" + query);\n\treturn query;\n }", "@Override\n\tpublic boolean hasSubquery() {\n\t\treturn false;\n\t}", "@Test\n \tpublic void whereClauseForNodeLeftAlignment() {\n \t\tnode23.addJoin(new LeftAlignment(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"=\", \"_node23.left\", \"_node42.left\")\n \t\t);\n \t}", "public String getWhere()\n {\n // StringBuffer ==> String\n return this.whSelect.toString(); \n }", "public List<Table> getQueryDependTables() {\n return queryDependTables;\n }", "protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }", "public String toString() {\n\t\treturn getRange() + \" \" + getBaseClass() + \" WHERE \" + super.toString();\n\t}", "public ConditionQueryBuilder getSubqueryBuilder()\r\n\t\t{\r\n\t\t\treturn subqueryBuilder;\r\n\t\t}", "boolean hasQueryLogicName();", "private String createSQLStatement(String segmentNode){\n\t\t\n\t\tString SQL2 = \"SELECT * FROM [cq:Page] AS s WHERE ISDESCENDANTNODE([\" + segmentNode + \"])\";\n\t\treturn SQL2;\n\t\t\n\t}", "@Test\n \tpublic void whereClauseForNodeRangedPrecedence() {\n \t\tnode23.addJoin(new Precedence(node42, 10, 20));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\t\"_node23.right_token BETWEEN SYMMETRIC _node42.left_token - 10 AND _node42.left_token - 20\"\n \t\t);\n \t}", "Column referencedColumn();", "String getJournalsLantindexGraphQuery();", "public String getWhereClause() {\n Object ref = whereClause_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n whereClause_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public Query advancedQuery() \n {\n return null;\n }", "public LinkedHashMap<String, LinkedHashSet<String>> getConditionsFromTable() {\n\t\tLinkedHashMap<String, LinkedHashSet<String>> toReturn = new LinkedHashMap<String, LinkedHashSet<String>>();\n\t\tfor (int i = 0; i < modelCondTable.getRowCount(); i++) {\n\t\t\tString key = (String) modelCondTable.getValueAt(i, 0);\n\t\t\tString value = (String) modelCondTable.getValueAt(i, 1);\n\t\t\tLinkedHashSet<String> setValue = new LinkedHashSet<String>(Arrays.asList(value.split(\";\")));\n\n\t\t\ttoReturn.put(key, setValue);\n\t\t}\n\t\treturn toReturn;\n\t}", "boolean hasRelation();", "@Override\n public String getWhereClause() {\n Object ref = whereClause_;\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 whereClause_ = s;\n return s;\n }\n }", "public String getWhereString()\n {\n String outString = \n \"WHERE recip = '\" + recip + \"'\" \n ;\n return outString;\n }", "String getAssignmentFilter(PropertyResolver.Table tableType, String tableAlias, boolean constrainResult, Collection<? extends FxPropertyAssignment> assignments);", "public CriteriaQueryTable(CriteriaQuery q) {\n myCriteriaQuery = q;\n myOriginalRestriction = q.getRestriction();\n \n if (myOriginalRestriction == null) {\n myOriginalRestriction = JPA.em().getCriteriaBuilder().conjunction();\n }\n }", "boolean isSetFurtherRelations();", "public String getQuery()\n {\n /**\n * gets mouse marker information from MGD\n\t * includes interim and official nomenclature only\n */\n String stmt = \"select a.accID, m.symbol, m.name, m.chromosome, \" +\n \"t.name as type, a._Object_key \" +\n \"from ACC_Accession a, MRK_Marker m, MRK_Types t \" +\n \"where m._Organism_key = 1 \" +\n \"and m._Marker_Status_key = 1 \" +\n \"and m._Marker_key = a._Object_key \" +\n \"and a._MGIType_key = 2 \" +\n \"and a._LogicalDB_key = 1 \" +\n \"and a.prefixPart = 'MGI:' \" +\n \"and a.preferred = 1 \" +\n \"and m._Marker_Type_key = t._Marker_Type_key\";\n return stmt;\n }", "@Override\n\tpublic String getQueryDeExiste(Onibus entidade) {\n\t\treturn null;\n\t}", "ContextRelation getContextRelation();", "private void generateQuery() {\n\t\tString edgeType = \"\";\n\n\t\tif (isUnionTraversal || isTraversal || isWhereTraversal) {\n\t\t\tString previousNode = prevsNode;\n\t\t\tif (isUnionTraversal) {\n\t\t\t\tpreviousNode = unionMap.get(unionKey);\n\t\t\t\tisUnionTraversal = false;\n\t\t\t}\n\n\t\t\tEdgeRuleQuery edgeRuleQuery = new EdgeRuleQuery.Builder(previousNode, currentNode).build();\n\t\t\tEdgeRule edgeRule = null;\n\n\t\t\ttry {\n\t\t\t\tedgeRule = edgeRules.getRule(edgeRuleQuery);\n\t\t\t} catch (EdgeRuleNotFoundException | AmbiguousRuleChoiceException e) {\n\t\t\t}\n\n\t\t\tif (edgeRule == null) {\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t} else if (\"none\".equalsIgnoreCase(edgeRule.getContains())){\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t}else {\n\t\t\t\tedgeType = \"EdgeType.TREE\";\n\t\t\t}\n\n\t\t\tquery += \".createEdgeTraversal(\" + edgeType + \", '\" + previousNode + \"','\" + currentNode + \"')\";\n\n\t\t}\n\n\t\telse\n\t\t\tquery += \".getVerticesByProperty('aai-node-type', '\" + currentNode + \"')\";\n\t}", "public Relation select(Condition c) throws RelationException;", "@Override\n\tpublic String getWherePart() {\n\t\t\n\t\treturn super.getWherePart();\n\t}", "@Test\n \tpublic void whereClauseForNodeRightAlignment() {\n \t\tnode23.addJoin(new RightAlignment(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"=\", \"_node23.right\", \"_node42.right\")\n \t\t);\n \t}", "JoinCondition createJoinCondition();", "public static ResultSet getForeignTuple(ForeignKey foreignKey) throws SQLException, ClassNotFoundException {\n Connection connection = OracleConnector.getConnection();\n Statement statement = connection.createStatement();\n\n String subquery = \"\";\n for(int i = 0; i < foreignKey.getForeignFields().size(); i++) {\n subquery += foreignKey.getForeignFields().get(i) + \" = \" + foreignKey.getValues().get(i);\n\n if(i < foreignKey.getForeignFields().size() - 1)\n subquery += \" AND \";\n }\n\n String query = \"SELECT * FROM \" + foreignKey.getForeignTable() + \" WHERE \" + subquery;\n\n return statement.executeQuery(query);\n }", "public Collection<String> getPredicates() {\n HashSet<String> fullURISet = new HashSet<>();\n StmtIterator si = model.listStatements();\n while (si.hasNext()) {\n fullURISet.add(si.nextStatement().getPredicate().toString());\n }\n return fullURISet;\n }", "private String _buildWhereCondition(Vector conditions){\n String strConditions = \"\";\n if(conditions != null){\n strConditions = clsPopulateFunctions.joinVector(conditions, \" AND \");\n }\n return strConditions;\n }", "java.lang.String getCondition();", "public com.sforce.soap.partner.SoqlWhereCondition getWhereCondition() {\r\n return whereCondition;\r\n }", "@Override\n @PlainSQL\n public PaymentP2007_03 where(@Stringly.SQL String condition, Object... binds) {\n return where(DSL.condition(condition, binds));\n }", "Table getReferencedTable();", "protected abstract SQLQuery getFavoriteUpdateSQLQuery();", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "@Override\n\tpublic String getJoinTable() {\n\t\treturn null;\n\t}", "public void buildQuery() {\n\t\tif (constraints.propertyNodes.isEmpty()) {\n\t\t\tconstraints.propertyNodes.add(new AssertStmt(new IntLiteral(1)));\n\t\t}\n\t\t\n\t\tStringBuilder query = new StringBuilder();\n\t\tquery.append(\"(set-logic QF_BV)\\n\");\n\t\t\n\t\tquery.append(\"(define-fun tobv32 ((p Bool)) (_ BitVec 32) (ite p (_ bv1 32) (_ bv0 32)))\\n\");\n\t\tquery.append(\"(define-fun tobool ((p (_ BitVec 32))) Bool (not (= p (_ bv0 32))))\\n\");\n\t\t// Defined more functions above (for convenience), as needed.\n\t\t\n\t\tfor (String varName : constraints.variableNames) {\n\t\t\tquery.append(\"(declare-fun \" + varName + \" () (_ BitVec 32))\\n\");\n\t\t}\n\t\tfor (int i = 0; i < constraints.propertyNodes.size(); ++i) {\n\t\t\tquery.append(\"(declare-fun \" + propName(i) + \" () Bool)\\n\");\n\t\t}\n\t\tfor (AssignStmt stmt : constraints.transitionNodes) {\n\t\t\tquery.append(\"(assert (= \" + stmt.getLhs().getName() + \" \" +\n\t\t\t\t\texprConverter.visit(stmt.getRhs()) + \"))\\n\");\n\t\t}\n\t\tfor (int i = 0; i < constraints.propertyNodes.size(); ++i) {\n\t\t\tAssertStmt stmt = constraints.propertyNodes.get(i);\n\t\t\tif (stmt.isHoudini())\n\t\t\t\thoudiniConditions.add(i);\n\t\t\tif (stmt.isUnwinding())\n\t\t\t\tunwindingConditions.add(propName(i));\n\t\t\t\n \t\t\tString assertionQuery = \"(not (tobool \" + exprConverter.visit(stmt.getCondition()) + \"))\";\n\t\t\tquery.append(\"(assert (= \" + propName(i) + \" \" + assertionQuery + \"))\\n\");\n\t\t}\n\t\tquery.append(\"(assert (or\" + getAllProps() + \"))\\n\");\n\t\t\n\t\tquery.append(\"\\n(check-sat)\\n\");\n\t\t// append all unwinding conditions\n\t\tquery.append(\"(get-value (\" + getAllProps() + \" ))\\n\");\n\t\t\n\t\tqueryString = query.toString();\n\t}", "public boolean dependsOn(ReferenceTable t2) {\r\n\t\tString[] t2Dependants = t2.dependants;\r\n\t\tif (t2Dependants != null) {\r\n\t\t\tfor(String dependant : t2Dependants) {\r\n\t\t\t\tif (dependant.equals(tableName)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\treturn false;\r\n\t}", "public List<ForeignKey> getForeignKeysIn();", "private String getCloneSetLinkTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET_LINK(\");\n \t\tbuilder.append(\"CLONE_SET_LINK_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"AFTER_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CHANGED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"ADDED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"DELETED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"CO_CHANGED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINKS TEXT NOT NULL\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public boolean containsRelations();", "private void table(String where_condition){\n \n String query = \"SELECT reports.id,patients.patient_name,reports.report,doctors.doctor_name,reports.admitted FROM reports INNER JOIN patients on reports.patient_id = patients.id INNER JOIN doctors on reports.doctor_id = doctors.id WHERE (reports.patient_id = \"+global_patient_id+\") \"+where_condition+\" ORDER BY reports.id DESC\" ;\n\n ResultSet rs = null;\n \n try\n {\n rs = database().prepareStatement(query).executeQuery();\n displayTable.setModel(DbUtils.resultSetToTableModel(rs));\n displayTable.setVisible(true);\n }\n catch(Exception ex)\n { JOptionPane.showMessageDialog(null,ex); }\n}", "public boolean isPureFK() { // derived property\n return !_additionalFK && !_referrerAsOne;\n }", "public ZExpression getWhereExpression()\r\n\t{\r\n\t\treturn where;\r\n\t}", "@Override\r\n\tpublic List getAllOtherList() {\n\t\tString HQL = \"\";\r\n\t\tHQL += \" from XzfyOtherSuggest x\";\r\n\t\tHQL += \" where 1 = 1 \";\t\r\n\t\treturn super.find(HQL);\r\n\t}" ]
[ "0.56150806", "0.5561815", "0.538336", "0.53499913", "0.5329048", "0.5257027", "0.51566344", "0.5101512", "0.5095524", "0.5067326", "0.504375", "0.49983215", "0.49370414", "0.4880608", "0.48613405", "0.48583215", "0.4849626", "0.47659326", "0.4764308", "0.4763429", "0.47601762", "0.47572526", "0.47418752", "0.47396547", "0.46852088", "0.4681367", "0.46773326", "0.46507102", "0.46275356", "0.46241075", "0.46133187", "0.46119618", "0.4611841", "0.45948258", "0.4575565", "0.45635587", "0.45589545", "0.45421195", "0.45323703", "0.452053", "0.45130423", "0.4511346", "0.450933", "0.4504893", "0.4484257", "0.44818267", "0.44810343", "0.44806924", "0.4455211", "0.44502464", "0.44324702", "0.44236827", "0.4418188", "0.44147384", "0.4409604", "0.44037127", "0.44029182", "0.43995756", "0.43967816", "0.43900317", "0.43864697", "0.43761408", "0.43735653", "0.43674296", "0.43608624", "0.435284", "0.43523586", "0.4349013", "0.43394908", "0.43368715", "0.43366745", "0.43360287", "0.431017", "0.43048042", "0.43024927", "0.43008515", "0.43006325", "0.4289236", "0.428656", "0.42797452", "0.42660716", "0.42635006", "0.42543393", "0.42521718", "0.42429584", "0.42378843", "0.4226831", "0.42217466", "0.42213178", "0.42167926", "0.42099833", "0.42082602", "0.42027438", "0.41728744", "0.41712204", "0.4166217", "0.41642857", "0.4156379", "0.41528928", "0.41420397" ]
0.58544266
0
=================================================================================== Very Internal ============= very internal (for suppressing warn about 'Not Use Import')
protected String xCB() { return WhiteStilettoAliasRefCB.class.getName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}", "void reportImport() {\n this.hasImports = true;\n }", "@Test\n public void testNonSpecifiedImports() throws Exception {\n final DefaultConfiguration checkConfig =\n createModuleConfig(CustomImportOrderCheck.class);\n checkConfig.addAttribute(\"thirdPartyPackageRegExp\", \"org.\");\n checkConfig.addAttribute(\"customImportOrderRules\",\n \"STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE###SAME_PACKAGE(3)\");\n checkConfig.addAttribute(\"sortImportsInGroupAlphabetically\", \"true\");\n final String[] expected = {\n \"4: \" + getCheckMessage(MSG_LEX, \"java.awt.Button.ABORT\",\n \"java.io.File.createTempFile\"),\n \"5: \" + getCheckMessage(MSG_LEX, \"java.awt.print.Paper.*\",\n \"java.io.File.createTempFile\"),\n \"10: \" + getCheckMessage(MSG_LEX, \"java.awt.Dialog\", \"java.awt.Frame\"),\n \"15: \" + getCheckMessage(MSG_LEX, \"java.io.File\", \"javax.swing.JTable\"),\n \"16: \" + getCheckMessage(MSG_LEX, \"java.io.IOException\", \"javax.swing.JTable\"),\n \"17: \" + getCheckMessage(MSG_LEX, \"java.io.InputStream\", \"javax.swing.JTable\"),\n \"18: \" + getCheckMessage(MSG_LEX, \"java.io.Reader\", \"javax.swing.JTable\"),\n \"20: \" + getCheckMessage(MSG_ORDER, SAME, THIRD, \"com.puppycrawl.tools.*\"),\n \"22: \" + getCheckMessage(MSG_NONGROUP_IMPORT, \"com.google.common.collect.*\"),\n \"23: \" + getCheckMessage(MSG_LINE_SEPARATOR, \"org.junit.*\"),\n };\n\n verify(checkConfig, getPath(\"InputCustomImportOrderDefault.java\"), expected);\n }", "public static void disableWarning() {\n try {\n Field theUnsafe = Unsafe.class.getDeclaredField(\"theUnsafe\");\n theUnsafe.setAccessible(true);\n Unsafe u = (Unsafe) theUnsafe.get(null);\n\n Class<?> c = Class.forName(\"jdk.internal.module.IllegalAccessLogger\");\n Field logger = c.getDeclaredField(\"logger\");\n u.putObjectVolatile(c, u.staticFieldOffset(logger), null);\n } catch (ClassNotFoundException e) {\n // do nothing\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "static void ignore() {\n }", "public boolean isI_IsImported();", "public static void preventIllegalAccessWarnings()\n {\n // Example \"annoying\" trace:\n // WARNING: An illegal reflective access operation has occurred\n // WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:...)\n // WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil\n // WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations\n // WARNING: All illegal access operations will be denied in a future release\n try\n {\n Class<?> c = Class.forName(\"jdk.internal.module.IllegalAccessLogger\");\n Field f = c.getDeclaredField(\"logger\");\n f.setAccessible(true);\n f.set(null, null);\n }\n catch (Exception e)\n {\n // ignore\n }\n }", "private NettyHttpUtil() {\n\t\t// do nothing.\n\t}", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "public static List<String> checkImports(CompilationUnit cu) {\n\t\tList<String> list = new ArrayList<>();\n\t\tImportCollector ic = new ImportCollector();\n\t\tic.visit(cu, list);\n\t\treturn list;\n\t}", "boolean hasImported();", "boolean hasPlainImport();", "boolean ignoreExternal();", "@Override\n public boolean getAllowImportAliases()\n {\n \treturn allowImportAliases;\n }", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "protected LibReference() {\n\t}", "Import getImport();", "@Override\n public String visit(ImportDeclaration n, Object arg) {\n return null;\n }", "private EclipsePrefUtils() {\n // Exists only to defeat instantiation.\n }", "@Override\n\tprotected void GenerateImportLibrary(String LibName) {\n\n\t}", "public boolean shouldIncludeInGlobalSearch() {\n/* 255 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "private CheckingTools() {\r\n super();\r\n }", "default boolean isDeprecated() {\n return false;\n }", "private PluginsInternal() {}", "protected String getImportStatement() {\n return \"\";\n }", "public boolean isImported();", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean needImport(String importStatement) {\r\n\t\treturn DAOServiceConfigurationManager\r\n\t\t\t\t.getBooleanProperty(CODEGEN_HOLD_ANNOTATIONS_FOR_DAO)\r\n\t\t\t\t|| CodeGenUtils.needImportClass(importStatement);\r\n\t}", "private Utility() {\n throw new IllegalAccessError();\n }", "public static void hideWarnings() {\n\t\tenableWarn = false;\n\t}", "public static void disableJava9IllegalAccessWarning( ClassLoader cl )\n {\n if( JreUtil.isJava8() )\n {\n return;\n }\n\n try\n {\n Class cls = Class.forName( \"jdk.internal.module.IllegalAccessLogger\", false, cl );\n Field logger = cls.getDeclaredField( \"logger\" );\n getUnsafe().putObjectVolatile( cls, getUnsafe().staticFieldOffset( logger ), null );\n }\n catch( Throwable ignore )\n {\n }\n }", "private ClassifierUtils() {\n throw new AssertionError();\n }", "private IgnoreListHelper() {\n\t}", "private SupplierLoaderUtil() {\n\t}", "Import createImport();", "Import createImport();", "@Test\n public void testPackagePrivateAccessForNames_googModule() {\n disableRewriteClosureCode();\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n Compiler.joinPathParts(\"foo\", \"bar.js\"),\n lines(\n \"goog.module('Foo');\",\n \"/** @package */\",\n \"var name = 'foo';\",\n \"exports = name;\")),\n SourceFile.fromCode(\n Compiler.joinPathParts(\"baz\", \"quux.js\"),\n \"goog.module('client'); const name = goog.require('Foo'); name;\")));\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private final void ensureBindingImports()\n {\n if (!bindingImportsAdded)\n {\n for (Iterator<BindingExpression> iter = bindingExpressions.iterator(); iter.hasNext(); )\n {\n BindingExpression expr = iter.next();\n addImport(expr.getDestinationTypeName(), expr.getXmlLineNumber());\n }\n bindingImportsAdded = true;\n }\n }", "public void warningPermit();", "static void allowAccess(ClassMaker cm) {\n var thisModule = CoreUtils.class.getModule();\n var thatModule = cm.classLoader().getUnnamedModule();\n thisModule.addExports(\"org.cojen.dirmi.core\", thatModule);\n }", "public void testImportGone() throws Exception {\n\t\tBundle tba = getContext().installBundle(\n\t\t\t\tgetWebServer() + \"classpath.tb4a.jar\");\n\t\tBundle tbb = getContext().installBundle(\n\t\t\t\tgetWebServer() + \"classpath.tb4b.jar\");\n\t\ttry {\n\t\t\ttba.start();\n\t\t\tassertEquals(Bundle.ACTIVE, tba.getState());\n\t\t\ttbb.start();\n\t\t\tassertEquals(Bundle.ACTIVE, tbb.getState());\n\t\t}\n\t\tfinally {\n\t\t\ttba.uninstall();\n\t\t\ttbb.uninstall();\n\t\t}\n\t}", "@Test\n public void testPackagePrivateAccessForNames_esModule() {\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n Compiler.joinPathParts(\"foo\", \"bar.js\"),\n lines(\n \"/** @package */\", //\n \"var name = 'foo';\",\n \"export {name};\")),\n SourceFile.fromCode(\n Compiler.joinPathParts(\"baz\", \"quux.js\"),\n \"import {name} from '/foo/bar.js'; name;\")));\n }", "private OSUtil()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not permitted.\");\n }", "@Override\n public void checkPackageAccess(final String pkgname) {\n\tif(!pkgname.startsWith(\"sun.\"))\n\t super.checkPackageAccess(pkgname);\n }", "private Constantes() {\r\n\t\t// No way\r\n\t}", "private Util() { }", "public void fixImports(Module module, Collection<SLanguage> addedLanguages) {\n }", "private String imported(String string) {\n string = IMPORT.matcher(string).replaceAll(\"\");\n string = DOT.matcher(string).replaceAll(\"/\");\n string = SEMICOLON.matcher(string).replaceAll(\"\");\n string = \"/\" + string.trim() + \".java\";\n return string;\n }", "public void testDynamicImport() throws Exception {\n\t\tdoTest(\";version=\\\"[1,2)\\\"\", TEST_ALT_IMPORT_SYM_NAME + \"_1.0.0\");\n\t}", "public boolean getIsImport() {\n return getAsBoolean(\"isImport\");\n }", "private Util() {\n }", "private boolean isInternal(String name) {\n return name.startsWith(\"java.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"com.sun.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"oracle.\");\n }", "private XIncluder() {}", "private boolean getIsImported(String productName) {\n\t\treturn productName.contains(AppConstants.IMPORTED_TOKEN);\n\t}", "private void ImportLibrary(){\n for(int i = 0; i < refact.size(); i++){\n if(refact.get(i).contains(\"import\")){\n for(String library : libraries){\n refact.add(i, library + \"\\r\");\n }\n break;\n }\n }\n\n\n }", "private JacobUtils() {}", "Imports createImports();", "private NativeSupport() {\n\t}", "private static boolean ModuleImport_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ModuleImport_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, K_AT);\n r = r && ModuleImportPath(b, l + 1);\n r = r && ModuleImport_4_0_2(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "private ModuleSyncHelper() {\n //Private constructor to avoid instances for this helper.\n }", "boolean getImported();", "private DrillCalciteWrapperUtility() {\n }", "private Constants() {\n\t\tthrow new AssertionError();\n\t}", "static boolean Import(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Import\")) return false;\n if (!nextTokenIs(b, K_IMPORT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = SchemaImport(b, l + 1);\n if (!r) r = ModuleImport(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "public boolean isImportantForAccessibility() {\n/* 1302 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\r\n public void testImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.List\");\r\n try\r\n {\r\n typeParser.addImport(\"java.awt.List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }", "private String importDeclaration()\r\n {\r\n String handle;\r\n\r\n matchKeyword(Keyword.IMPORTSY);\r\n handle = nextToken.string;\r\n matchKeyword(Keyword.IDENTSY);\r\n handle = qualifiedImport(handle);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n\r\n return handle;\r\n }", "@Test\n public void testPackageFileOverviewVisibilityAppliesToNameWithoutExplicitVisibility_googModule() {\n disableRewriteClosureCode();\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n Compiler.joinPathParts(\"foo\", \"bar.js\"),\n lines(\n \"/**\",\n \" * @fileoverview\",\n \" * @package\",\n \" */\",\n \"goog.module('Foo');\",\n \"/** @constructor */\",\n \"var Foo = function() {};\",\n \"exports = Foo;\")),\n SourceFile.fromCode(\n Compiler.joinPathParts(\"baz\", \"quux.js\"),\n \"goog.module('client'); const Foo = goog.require('Foo'); new Foo();\")));\n }", "Lock getProtocolImportLock();", "private static void validateImportString(String importString)\r\n {\r\n String tokens[] = importString.split(\"\\\\.\");\r\n for (int i=0; i<tokens.length; i++)\r\n {\r\n String token = tokens[i];\r\n if (!isValidJavaIdentifier(token) &&\r\n !(i == tokens.length-1 && token.equals(\"*\")))\r\n {\r\n throw new IllegalArgumentException(\r\n \"Invalid import string: \"+importString);\r\n }\r\n }\r\n }", "TopLevelImport createTopLevelImport();", "@Test\n public void testStaticStandardThird() throws Exception {\n final DefaultConfiguration checkConfig =\n createModuleConfig(CustomImportOrderCheck.class);\n checkConfig.addAttribute(\"thirdPartyPackageRegExp\", \"com.|org.\");\n checkConfig.addAttribute(\"customImportOrderRules\",\n \"STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE\");\n checkConfig.addAttribute(\"sortImportsInGroupAlphabetically\", \"true\");\n final String[] expected = {\n \"4: \" + getCheckMessage(MSG_LEX, \"java.awt.Button.ABORT\",\n \"java.io.File.createTempFile\"),\n \"5: \" + getCheckMessage(MSG_LEX, \"java.awt.print.Paper.*\",\n \"java.io.File.createTempFile\"),\n \"10: \" + getCheckMessage(MSG_LEX, \"java.awt.Dialog\", \"java.awt.Frame\"),\n \"15: \" + getCheckMessage(MSG_LEX, \"java.io.File\", \"javax.swing.JTable\"),\n \"16: \" + getCheckMessage(MSG_LEX, \"java.io.IOException\", \"javax.swing.JTable\"),\n \"17: \" + getCheckMessage(MSG_LEX, \"java.io.InputStream\", \"javax.swing.JTable\"),\n \"18: \" + getCheckMessage(MSG_LEX, \"java.io.Reader\", \"javax.swing.JTable\"),\n \"22: \" + getCheckMessage(MSG_LEX, \"com.google.common.collect.*\",\n \"com.puppycrawl.tools.*\"),\n };\n\n verify(checkConfig, getPath(\"InputCustomImportOrderDefault.java\"), expected);\n }", "public static boolean isUseGlint() {\n/* 962 */ return useGlint;\n/* */ }", "@Test\n public void testPackageFileOverviewVisibilityAppliesToNameWithoutExplicitVisibility_esModule() {\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n Compiler.joinPathParts(\"foo\", \"bar.js\"),\n lines(\n \"/**\",\n \" * @fileoverview\",\n \" * @package\",\n \" */\",\n \"/** @constructor */\",\n \"var Foo = function() {};\",\n \"export {Foo};\")),\n SourceFile.fromCode(\n Compiler.joinPathParts(\"baz\", \"quux.js\"),\n \"import {Foo} from '/foo/bar.js'; new Foo();\")));\n }", "public TpImport(){\r\n\t\t\r\n\t}", "private static boolean ModuleImport_4(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ModuleImport_4\")) return false;\n ModuleImport_4_0(b, l + 1);\n return true;\n }", "@Override\n\tpublic Void visit(ClauseImport clause, Void ctx) {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean isWarnEnabled() {\n\t\treturn false;\n\t}", "private OpenAll() {\n throw new RuntimeException(\"Stub!\");\n }", "@Override\n\tpublic void ignorePackage(String packageName) {\n\t\tignorePackages.add(packageName);\n\t}", "private Constants() {\n throw new AssertionError();\n }", "protected void checkImport(String[] paths) {\n\n\t\tfor (YANG_Linkage link : getLinkages()) {\n\t\t\tif (link instanceof YANG_Import) {\n\t\t\t\tYANG_Import imported = (YANG_Import) link;\n\t\t\t\tString importedspecname = imported.getImportedModule();\n\t\t\t\tYANG_Revision revision = imported.getRevision();\n\t\t\t\tYANG_Specification importedspec = null;\n\t\t\t\tif (revision != null) {\n\t\t\t\t\tString impname = importedspecname;\n\t\t\t\t\timportedspecname += \"@\" + revision.getDate();\n\t\t\t\t\timportedspec = getExternal(paths, importedspecname,\n\t\t\t\t\t\t\timpname, imported.getLine(), imported.getCol());\n\t\t\t\t} else\n\t\t\t\t\timportedspec = getExternal(paths, importedspecname,\n\t\t\t\t\t\t\timported.getLine(), imported.getCol());\n\t\t\t\tif (importedspec != null)\n\t\t\t\t\timported.setImportedmodule(importedspec);\n\t\t\t\tif (!(importedspec instanceof YANG_Module))\n\t\t\t\t\tYangErrorManager.addError(getFileName(),\n\t\t\t\t\t\t\timported.getLine(), imported.getCol(),\n\t\t\t\t\t\t\t\"not_module\", importedspecname);\n\t\t\t\telse if (!importeds.contains(importedspec))\n\t\t\t\t\timporteds.add((YANG_Module) importedspec);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void importTable(ImportJobContext context)\n throws IOException, ImportException {\n if (!PostgresqlManager.warningPrinted) {\n LOG.warn(\"It looks like you are importing from postgresql.\");\n LOG.warn(\"This transfer can be faster! Use the --direct\");\n LOG.warn(\"option to exercise a postgresql-specific fast path.\");\n\n PostgresqlManager.warningPrinted = true; // don't display this twice.\n }\n\n // Then run the normal importTable() method.\n super.importTable(context);\n }", "private SysUtils(){}", "public T caseImport(Import object)\n {\n return null;\n }", "public T caseImport(Import object)\n {\n return null;\n }", "private ThreadUtil() {\n throw new UnsupportedOperationException(\"This class is non-instantiable\"); //$NON-NLS-1$\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "private Util() {\n }", "private Util() {\n }", "@Test\r\n public void testImportStringAmbiguity() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n typeParser.addImport(\"java.awt.*\");\r\n try\r\n {\r\n typeParser.parse(\"List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }", "@Override\n public boolean isPackaged() {\n return false;\n }" ]
[ "0.6803319", "0.6571902", "0.59709394", "0.5930311", "0.5858144", "0.5845191", "0.58357126", "0.574673", "0.5737478", "0.57323503", "0.57119983", "0.5681587", "0.5639888", "0.55797464", "0.5567162", "0.55312425", "0.55267406", "0.5513854", "0.55103403", "0.5478195", "0.5477248", "0.54711837", "0.54653925", "0.54644614", "0.54555964", "0.5445788", "0.54439837", "0.54330057", "0.5428559", "0.5426223", "0.54226565", "0.54226565", "0.54090655", "0.53985083", "0.53895104", "0.53819686", "0.53666925", "0.5353513", "0.5333826", "0.5329036", "0.5329036", "0.53158164", "0.528148", "0.528148", "0.528148", "0.528148", "0.5275548", "0.52690953", "0.5259865", "0.5257389", "0.5253732", "0.5242185", "0.52314115", "0.52228063", "0.51967424", "0.5186569", "0.51805854", "0.5171291", "0.51632106", "0.51527715", "0.5151751", "0.51513153", "0.5148345", "0.5147101", "0.5144976", "0.51424277", "0.5129081", "0.5098182", "0.50971395", "0.50862026", "0.5082156", "0.50762635", "0.5073156", "0.5070802", "0.5070196", "0.5064834", "0.50638825", "0.50618464", "0.5059427", "0.5058705", "0.50526994", "0.50524956", "0.50523174", "0.5045077", "0.50239706", "0.5023174", "0.5017857", "0.5006823", "0.49976307", "0.49973202", "0.49933803", "0.49787974", "0.49746135", "0.4970881", "0.4970881", "0.4970488", "0.49669573", "0.49578363", "0.49578363", "0.4956861", "0.4954317" ]
0.0
-1
/ Called before actually generating RDQL. It prepares the data objects
private void setUp() { variables = new Vector(); statements = new Vector(); constraints = new Vector(); variableGenerator = new SimpleVariableGenerator("v_"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void prepare() throws QueryException {\n md = new MemData(data);\n\n final Iterator<Item> d = docs.iterator();\n final Iterator<byte[]> n = names.iterator();\n final Iterator<byte[]> p = paths.iterator();\n\n while(d.hasNext()) {\n md.insert(md.meta.size, -1, docData(d.next(), n.next(), p.next()));\n }\n }", "private void prepare( ) {\n super.prepare( schema.getCount( ) );\n serializer = new FieldSerializer[ fieldCount ];\n for ( int i = 0; i < fieldCount; i++ ) {\n FieldSchema field = schema.getField( i );\n serializer[i] = serializerByType[ field.getType().ordinal() ];\n }\n }", "private ASTQuery() {\r\n dataset = Dataset.create();\r\n }", "@Override\n\tpublic void queryData() {\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 void initData() {\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\t}", "private void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "abstract void initializeNeededData();", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "private void InitData() {\n\t}", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}", "@Override\n\tprotected void prepare() {\n\t\tOrder_ID = getRecord_ID();\n\t\tEventType = getParameterAsString(\"EventType\");\n\t\t\n\t}", "private void initData() {\n\n }", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "public void prepare() {\n\t}", "protected void commonInit() {\r\n dataBinder = new DBTreeDataBinder(this);\r\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }", "private DirectDbQuery() {\n this.query = null;\n this.database = null;\n this.queryLanguage = null;\n this.paramMap = null;\n }", "public void initData() {\n }", "public void initData() {\n }", "protected @Override\r\n abstract void initData();", "private void prepareData() {\n devices.clear();\n\n Set<String> s = Blue.getInstance().devices.keySet();\n Iterator<String> it = s.iterator();\n String address;\n while (it.hasNext()) {\n address = it.next();\n devices.add(new Device(address, Blue.getInstance().devices.get(address)));\n }\n }", "@Override\r\n\tpublic void initData() {\n\t}", "private void preProcessDataModel() {\r\n collectAllAttribtueDefinitions();\r\n\r\n for (AttributeDefinition attribute : dataModel.getAttributeDefinitions()) {\r\n attribute.setAttributeType(UINameToValueMap.get(attribute.getAttributeType()));\r\n }\r\n\r\n if (null != dataModel.getLocalSecondaryIndexes()) {\r\n for (LocalSecondaryIndex index : dataModel.getLocalSecondaryIndexes()) {\r\n index.getProjection().setProjectionType(UINameToValueMap.get(index.getProjection().getProjectionType()));\r\n }\r\n }\r\n\r\n if (null != dataModel.getGlobalSecondaryIndexes()) {\r\n for (GlobalSecondaryIndex index : dataModel.getGlobalSecondaryIndexes()) {\r\n index.getProjection().setProjectionType(UINameToValueMap.get(index.getProjection().getProjectionType()));\r\n }\r\n }\r\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "public void init () throws IOException , GateException {\n conn = getConnection(db); \n Gate.init();\n\n String query = \"SELECT \" + db.idcol + ',' + db.textcol + \" FROM \" + db.table;\n if(db.where != null && !\"\".equals(db.where)){\n query = query + \" WHERE \" + db.where;\n }\n log.debug(\"attempting to prepare query: \"+ query);\n\n // fetch a resultset \n try{\n PreparedStatement stmt = conn.prepareStatement(query);\n rs = stmt.executeQuery();\n } catch(SQLException e){\n log.error(\"Problem running SQL query\", e);\n System.exit(5);\n }\n }", "@Override\n\tpublic void prepare() {\n\t\t\n\t}", "@Before\n\tpublic void initialize() {\n\t\tnullParserSQLGenerator = new SQLStringGenerator(null);\n\t\toneArgParserSQLGenerator = new SQLStringGenerator(new OneArgParser());\n\t}", "public static void initGenerateOfflineTestData(){\n dbInstance = Database.newInstance();\n initPlayer();\n initMatches();\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "private void initData(){\n\n }", "private void createTempDatabase() {\n\t\thandler = new ERXmlDocumentHandler(doc);\n\t\tList<String> filter = initFilter(subjectId);\n\t\tparseEntitys(filter);\n\t}", "@Override\n\tpublic void prepare() {\n\t}", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "protected void prepareData (List stuffToSend, Document objectFormatDoc) {\n super.prepareData (stuffToSend, objectFormatDoc);\n\n // localDidRehydrate - handleNewAssets is not called if we were rehydrated, \n // so we would otherwise report spurious error.\n if (!localDidRehydrate && !allNecessaryAssetsReported())\n reportMissingAssets ();\n }", "private void createTestDataSet() throws Exception {\n LOG.info(\"creating test data set...\"); \n Database db = null;\n try {\n db = this._category.getDatabase();\n db.begin();\n\n LazyEmployee person = new LazyEmployee();\n person.setFirstName(\"First\");\n person.setLastName(\"Person\");\n person.setBirthday(JDO_ORIGINAL_DATE);\n person.setStartDate(JDO_ORIGINAL_DATE);\n\n LazyAddress address1 = new LazyAddress();\n address1.setId(1);\n address1.setStreet(Integer.toString(1) + JDO_ORIGINAL_STRING);\n address1.setCity(\"First City\");\n address1.setState(\"AB\");\n address1.setZip(\"10000\");\n address1.setPerson(person);\n\n LazyAddress address2 = new LazyAddress();\n address2.setId(2);\n address2.setStreet(Integer.toString(2) + JDO_ORIGINAL_STRING);\n address2.setCity(\"Second City\");\n address2.setState(\"BC\");\n address2.setZip(\"22222\");\n address2.setPerson(person);\n\n LazyAddress address3 = new LazyAddress();\n address3.setId(3);\n address3.setStreet(Integer.toString(3) + JDO_ORIGINAL_STRING);\n address3.setCity(\"Third Ave\");\n address3.setState(\"AB\");\n address3.setZip(\"30003\");\n address3.setPerson(person);\n\n ArrayList addresslist = new ArrayList();\n addresslist.add(address1);\n addresslist.add(address2);\n addresslist.add(address3);\n\n person.setAddress(addresslist);\n\n LazyPayRoll pr1 = new LazyPayRoll();\n pr1.setId(1);\n pr1.setHoliday(15);\n pr1.setHourlyRate(25);\n pr1.setEmployee(person);\n person.setPayRoll(pr1);\n\n LazyContractCategory cc = new LazyContractCategory();\n cc.setId(101);\n cc.setName(\"Full-time slave\");\n db.create(cc);\n\n LazyContractCategory cc2 = new LazyContractCategory();\n cc2.setId(102);\n cc2.setName(\"Full-time employee\");\n db.create(cc2);\n \n ArrayList category = new ArrayList();\n category.add(cc);\n category.add(cc2);\n\n LazyContract con = new LazyContract();\n con.setPolicyNo(1001);\n con.setComment(\"80 hours a week, no pay hoilday, \"\n + \"no sick leave, arrive office at 7:30am everyday\");\n con.setContractNo(78);\n con.setEmployee(person);\n con.setCategory(category);\n person.setContract(con);\n \n db.create(person);\n \n db.commit();\n db.close();\n } catch (Exception e) {\n LOG.error(\"createTestDataSet: exception caught\", e);\n throw e;\n }\n }", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "private void constructorPostProcessing()\n {\n prepareNextRequest();\n fetchNextBatch();\n advanceObjectSummary();\n }", "public void pre() {\n\t\t//handlePreReset(); //replaced with handlePostReset \n\t\tsendKeepAlive();\n\t\tcurrentQuery = new Query();\n\t\tfastForward = false;\n\n\t\t// System.out.println(\"New query starts now.\");\n\t}", "void populateData();", "@Override\n\tprotected void runData(Query query) throws SQLException {\n\t\tStringBuilder q = new StringBuilder();\n\t\tArrayList<Integer> destinationList = new ArrayList<Integer>();\n\t\tquery.inc(2);\n\t\twhile (!isData(query.part()) || !isComment(query.part()) || !isCode(query.part())) {\n\t\t\tq.append(query.part());\n\t\t\tq.append(\" \");\n\t\t\tquery.inc();\n\t\t}\n\t\tArrayList<Integer> originList = getLinesFromData(q.toString());\n\t\tparseSecondCondition(query, originList, destinationList);\n\t}", "private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }", "protected void prepare()\n\t{\n\t\tlog.info(\"\");\n\t\tm_ctx = Env.getCtx();\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"C_BankStatementLoader_ID\"))\n\t\t\t\tm_C_BankStmtLoader_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse if (name.equals(\"FileName\"))\n\t\t\t\tfileName = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tm_AD_Client_ID = Env.getAD_Client_ID(m_ctx);\n\t\tlog.info(\"AD_Client_ID=\" + m_AD_Client_ID);\n\t\tm_AD_Org_ID = Env.getAD_Org_ID(m_ctx);\n\t\tlog.info(\"AD_Org_ID=\" + m_AD_Org_ID);\n\t\tlog.info(\"C_BankStatementLoader_ID=\" + m_C_BankStmtLoader_ID);\n\t}", "private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }", "@Override\n protected void initData()\n {\n super.initData();\n\n entityProps = getFormSession().getAssemblingMessageEntityProperties();\n\n refreshDataTable(entityProps);\n }", "private ProcessedDynamicData( ) {\r\n super();\r\n }", "protected abstract void initialize(List<Sample> samples, QueryGenerator queryGenerator);", "public DataSet(){\r\n\t\tdocs = Lists.newArrayList();\r\n//\t\t_docs = Lists.newArrayList();\r\n\t\t\r\n\t\tnewId2trnId = HashBiMap.create();\r\n\t\t\r\n\t\tM = 0;\r\n\t\tV = 0;\r\n\t}", "private void initData() {\n requestServerToGetInformation();\n }", "private RowData() {\n initFields();\n }", "protected void prepareEntityToNodeMap()\r\n\t{\n\t}", "@Override\n\tpublic void initParameters() {\n\t\ttransferDbData = new TransferDbData();\n\t}", "@Override\n protected void initResultTable() {\n }", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "void fillDatabase() {\n Type.type( \"FOOD\" );\n Type.type( \"HOT\" );\n Type.type( \"SNACK\" );\n }", "public static void populateData() {\n\n }", "private void initDataLoader() {\n\t}", "private static void dataFiltering() {\n\t\tDataGenerationMngr dtgen = new DataGenerationMngr();\n\t\tdtgen.genenrateData();\n\n\t\t// Perform Java and Gradle code diff in between commit and save the diff\n\t\t// information in database\n\n\t}", "private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "private void prepareData() {\n eventList = databaseHandler.getLatestDistinctEvents(prefs.getString(KEY_SORT_FIELD, \"name\"),\n prefs.getBoolean(KEY_SORT_ORDER_ASCENDING, true));\n\n // Send list to adapter\n eventLogAdapter.updateData(eventList);\n }", "public QueryBuilder()\n {\n\tlabel = null;\n\tqueryCondition = null;\n\tselectionLimiter = null;\n\tselectionSorter = null;\n\n\tvariablesMap = new HashMap<String, Expression>();\n\tselectionLabelsReferencedByStats = new HashSet<String>();\n }", "@Override\n public void init() {\n this.shapes = new DatabaseShape();\n }", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\n\t\tojTreeNode_prepare();\n\t\tmenu_prepare();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void prepareQuery() throws InterruptedException, FileNotFoundException, IOException{\n\t\tint querySetSize=2;\n\t\tHashMap<Integer, Integer> totQ=(HashMap<Integer, Integer>) General.readObject(\"O:/ImageRetrieval/Herve1.5K/Herve_querys_L_to_L.hashMap\");\n\t\t\n\t\tString subQSetFolder=\"O:/ImageRetrieval/Herve1.5K/HerveQuerys_LtoL_perSubSet\"+querySetSize+\"/\";\n\t\tGeneral.makeORdelectFolder(subQSetFolder);\n\t\tRandom rand=new Random();\n\t\tArrayList<HashMap<Integer, Integer>> Qsets =General.randSplitHashMap(rand, totQ, 0, querySetSize);\n\t\tint totQnum=0;\n\t\tfor (int i = 0; i < Qsets.size(); i++) {\n\t\t\tGeneral.writeObject(subQSetFolder+\"Q\"+i+\".hashMap\", Qsets.get(i));\n\t\t\tSystem.out.println(i+\", \"+Qsets.get(i).size());\n\t\t\ttotQnum+=Qsets.get(i).size();\n\t\t}\n\t\tGeneral.Assert(totQnum==totQ.size(), \"err, totQnum:\"+totQnum+\", should ==\"+totQ.size());\n\t\tSystem.out.println(\"taget querySetSize:\"+querySetSize+\", totQnum:\"+totQnum+\", should ==\"+totQ.size());\n\t}", "@Override\n public void prepareHtmlDataList() {\n makeGCDataInfoOutputData();\n makeLaunchDataInfoOutputData();\n }", "public void prepareDeleteObject() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareDeleteObject();\n }", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null)\n\t\t\t\t;\n\t\t\telse if (name.equals(\"SRI_Authorization_ID\"))\n\t\t\t\tp_SRI_Authorization_ID = para[i].getParameterAsInt();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\t\n\t\tm_AD_Client_ID = getAD_Client_ID();\n\t\t\n\t\tif (p_SRI_Authorization_ID == 0)\n\t\t\tp_SRI_Authorization_ID = getRecord_ID();\n\n\t}", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "@Override\n protected void load() {\n //recordId can be null when in batchMode\n if (this.recordId != null && this.properties.isEmpty()) {\n this.sqlgGraph.tx().readWrite();\n if (this.sqlgGraph.getSqlDialect().supportsBatchMode() && this.sqlgGraph.tx().getBatchManager().isStreaming()) {\n throw new IllegalStateException(\"streaming is in progress, first flush or commit before querying.\");\n }\n\n //Generate the columns to prevent 'ERROR: cached plan must not change result type\" error'\n //This happens when the schema changes after the statement is prepared.\n @SuppressWarnings(\"OptionalGetWithoutIsPresent\")\n EdgeLabel edgeLabel = this.sqlgGraph.getTopology().getSchema(this.schema).orElseThrow(() -> new IllegalStateException(String.format(\"Schema %s not found\", this.schema))).getEdgeLabel(this.table).orElseThrow(() -> new IllegalStateException(String.format(\"EdgeLabel %s not found\", this.table)));\n StringBuilder sql = new StringBuilder(\"SELECT\\n\\t\");\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(\"ID\"));\n appendProperties(edgeLabel, sql);\n List<VertexLabel> outForeignKeys = new ArrayList<>();\n for (VertexLabel vertexLabel : edgeLabel.getOutVertexLabels()) {\n outForeignKeys.add(vertexLabel);\n sql.append(\", \");\n if (vertexLabel.hasIDPrimaryKey()) {\n String foreignKey = vertexLabel.getSchema().getName() + \".\" + vertexLabel.getName() + Topology.OUT_VERTEX_COLUMN_END;\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(foreignKey));\n } else {\n int countIdentifier = 1;\n for (String identifier : vertexLabel.getIdentifiers()) {\n PropertyColumn propertyColumn = vertexLabel.getProperty(identifier).orElseThrow(\n () -> new IllegalStateException(String.format(\"identifier %s column must be a property\", identifier))\n );\n PropertyType propertyType = propertyColumn.getPropertyType();\n String[] propertyTypeToSqlDefinition = this.sqlgGraph.getSqlDialect().propertyTypeToSqlDefinition(propertyType);\n int count = 1;\n for (String ignored : propertyTypeToSqlDefinition) {\n if (count > 1) {\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + propertyType.getPostFixes()[count - 2] + Topology.OUT_VERTEX_COLUMN_END));\n } else {\n //The first column existVertexLabel no postfix\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + Topology.OUT_VERTEX_COLUMN_END));\n }\n if (count++ < propertyTypeToSqlDefinition.length) {\n sql.append(\", \");\n }\n }\n if (countIdentifier++ < vertexLabel.getIdentifiers().size()) {\n sql.append(\", \");\n }\n }\n }\n }\n List<VertexLabel> inForeignKeys = new ArrayList<>();\n for (VertexLabel vertexLabel : edgeLabel.getInVertexLabels()) {\n sql.append(\", \");\n inForeignKeys.add(vertexLabel);\n if (vertexLabel.hasIDPrimaryKey()) {\n String foreignKey = vertexLabel.getSchema().getName() + \".\" + vertexLabel.getName() + Topology.IN_VERTEX_COLUMN_END;\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(foreignKey));\n } else {\n int countIdentifier = 1;\n for (String identifier : vertexLabel.getIdentifiers()) {\n PropertyColumn propertyColumn = vertexLabel.getProperty(identifier).orElseThrow(\n () -> new IllegalStateException(String.format(\"identifier %s column must be a property\", identifier))\n );\n PropertyType propertyType = propertyColumn.getPropertyType();\n String[] propertyTypeToSqlDefinition = this.sqlgGraph.getSqlDialect().propertyTypeToSqlDefinition(propertyType);\n int count = 1;\n for (String ignored : propertyTypeToSqlDefinition) {\n if (count > 1) {\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + propertyType.getPostFixes()[count - 2] + Topology.IN_VERTEX_COLUMN_END));\n } else {\n //The first column existVertexLabel no postfix\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + Topology.IN_VERTEX_COLUMN_END));\n }\n if (count++ < propertyTypeToSqlDefinition.length) {\n sql.append(\", \");\n }\n }\n if (countIdentifier++ < vertexLabel.getIdentifiers().size()) {\n sql.append(\", \");\n }\n }\n }\n }\n sql.append(\"\\nFROM\\n\\t\");\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(this.schema));\n sql.append(\".\");\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(EDGE_PREFIX + this.table));\n sql.append(\" WHERE \");\n //noinspection Duplicates\n if (edgeLabel.hasIDPrimaryKey()) {\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(\"ID\"));\n sql.append(\" = ?\");\n } else {\n int count = 1;\n for (String identifier : edgeLabel.getIdentifiers()) {\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(identifier));\n sql.append(\" = ?\");\n if (count++ < edgeLabel.getIdentifiers().size()) {\n sql.append(\" AND \");\n }\n\n }\n }\n if (this.sqlgGraph.getSqlDialect().needsSemicolon()) {\n sql.append(\";\");\n }\n Connection conn = this.sqlgGraph.tx().getConnection();\n if (logger.isDebugEnabled()) {\n logger.debug(sql.toString());\n }\n try (PreparedStatement preparedStatement = conn.prepareStatement(sql.toString())) {\n if (edgeLabel.hasIDPrimaryKey()) {\n preparedStatement.setLong(1, this.recordId.sequenceId());\n } else {\n int count = 1;\n for (Comparable identifierValue : this.recordId.getIdentifiers()) {\n preparedStatement.setObject(count++, identifierValue);\n }\n }\n ResultSet resultSet = preparedStatement.executeQuery();\n if (resultSet.next()) {\n loadResultSet(resultSet, inForeignKeys, outForeignKeys);\n }\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }\n }", "protected void loadData()\n {\n }", "public void init() {\n\t\tTypedQuery<Personne> query = em.createQuery(\"SELECT p FROM Personne p\", Personne.class);\n\t\tList<Personne> clients = query.getResultList();\n\t\tif (clients.size()==0) {\n\t\t\tSqlUtils.executeFile(\"exemple.sql\", em);\n\t\t}\n\t}", "public void PrepareDataset(TweetPreprocessor preprocessor, String dataset)\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n\t\ttry\n {\n System.out.println(\"Preparing Datasets ...\");\n //PrepareAll(preprocessor,dataset);\n\n\t\t\tSystem.out.println(\"Saving work to Database ..\");\n\t\t\tsaveTextOutput(Dataset + \"data_text.csv\", \"d_text\");\n\t\t\tsaveTextOutput(Dataset + \"data_feature.csv\", \"d_feature\");\n\t\t\tsaveTextOutput(Dataset + \"data_complex.csv\", \"d_complex\");\n\t\t\t//saveLexiconOuput(Dataset + \"data_lexicon.csv\",true);\n\t\t\tSystem.out.println(\"Datasets ready for training .%.\");\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void prepare()\n {\n // First, we assign the payload a new UUID if it does not already have one\n if(getId() == null)\n setId(UUID.randomUUID());\n \n // Set the submission date to now\n setSubmissionDate(new Date());\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "private MetaSparqlRequest createPrepareInsertMT3() {\n\t\t\tString sparqlStr = \"\"+\n\t\t\t\t\t\"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\r\\n\" + \n\t\t\t\t\t\"PREFIX ub: \"+_ontology+\"\\r\\n\" + \n\t\t\t\t\t\"INSERT DATA { GRAPH \"+_graph+\" { \"+\n\t\t\t\t\tbuilderBindInsert\n\t\t\t\t\t+\" } }\";\n\t\t\t\n\t\t\tSparqlObj sparql= new SparqlObj(sparqlStr) ;\n\t\t\tEndPoint endPointHost= new EndPoint(_protocol,_host,_port,\"/update\");\n\t\t\tMetaSparqlRequest msr = new MetaSparqlRequest(new SparqlRequest(sparql,endPointHost));\n\t\t\tmsr.setTripleInsert(createTripleBaseMT3A());\n\t\t\treturn msr;\n\t\t}" ]
[ "0.66743255", "0.6348964", "0.61894935", "0.61223465", "0.6050573", "0.6050573", "0.6050573", "0.6050573", "0.6050573", "0.6050573", "0.6045159", "0.5970773", "0.5897637", "0.5893389", "0.5881273", "0.5881273", "0.5878254", "0.5873893", "0.5873689", "0.5863885", "0.5863885", "0.5860507", "0.58428603", "0.5836775", "0.58312833", "0.58204615", "0.5811864", "0.5798296", "0.57939935", "0.578788", "0.57855177", "0.57808673", "0.57554173", "0.57176965", "0.5700854", "0.56992894", "0.56959736", "0.5691813", "0.5683404", "0.5683404", "0.56662977", "0.56638044", "0.5657416", "0.56477094", "0.56172407", "0.56172407", "0.56172407", "0.5613716", "0.56114054", "0.5589433", "0.55855167", "0.55816376", "0.55816376", "0.5578843", "0.5555586", "0.5548263", "0.5542649", "0.5529161", "0.55215573", "0.5517281", "0.55090314", "0.55051124", "0.5498129", "0.5483386", "0.54647875", "0.54634833", "0.54617757", "0.54607034", "0.5458249", "0.54524004", "0.5449636", "0.5446142", "0.54358554", "0.54333574", "0.5429556", "0.54214495", "0.54204327", "0.5415825", "0.5414226", "0.5410495", "0.54088116", "0.5404784", "0.53950465", "0.5392226", "0.53905773", "0.5389999", "0.53704935", "0.53699994", "0.5369982", "0.536308", "0.5346735", "0.53340566", "0.53334826", "0.5333416", "0.5331412", "0.5329487", "0.53293186", "0.5326235", "0.5325194", "0.532145", "0.5307075" ]
0.0
-1
the service endpoint used for updated this RecyclerView data is passed into the constructor
DeparturesRecyclerViewAdapter(Context context, String endpoint) { this.context = context; this.endpoint = endpoint; this.mInflater = LayoutInflater.from(context); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RestaurantEndpoints {\n @GET(\"/restaurants\")\n Call<ArrayList<GETRestaurantResponse>> getRestaurants(@Query(\"priceeq\") String priceEquals,\n @Query(\"pricelte\") String priceLte,\n @Query(\"pricegte\") String priceGte,\n @Query(\"city\") String city,\n @Query(\"name\") String name,\n @Query(\"address\") String address);\n @GET(\"/restaurant_statistics\")\n Call<GETRestaurantStatisticsResponse> getRestaurantStatistics(@Query(\"name\") String name, @Query(\"address\") String address);\n\n @PUT(\"/restaurants\")\n Call<Void> updateRestaurantOwner(@Body PUTRestaurantRequest putRestaurantRequest);\n\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"http://youfood.ddns.net\")\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n RestaurantEndpoints restaurantEndpoints = retrofit.create(RestaurantEndpoints.class);\n}", "public interface RestService {\n\n //\n //\n // AUTH\n //\n //\n @POST(\"auth\")\n Call<AccessToken> logIn(@Body Credentials credentials);\n\n @POST(\"users\")\n Call<Void> signUp(@Body Credentials credentials);\n\n //\n //\n // Fetch Data\n //\n //\n @GET(\"data\")\n Call<CategoriesWrapper> fetchData();\n\n @POST(\"categories\")\n Call<Category> addCategory(@Body AddCategoryWrapper wrapper);\n\n @POST(\"feeds\")\n Call<Void> subscribeFeed(@Body AddFeedWrapper wrapper);\n\n @DELETE(\"feeds/{id_feed}\")\n Call<Void> unsubscribeFeed(@Path(\"id_feed\") Integer channelId);\n\n //\n //\n // Update Read Items. Mark as read.\n //\n //\n @PUT(\"items\")\n Call<Void> updateReadAllItems(@Body ItemStateWrapper wrapper);\n\n @PUT(\"feeds/{id_feed}/items/\")\n Call<Void> updateReadItemsByChannelId(@Path(\"id_feed\") Integer channelId,\n @Body ItemStateWrapper wrapper);\n\n @PUT(\"items/{id_item}\")\n Call<Void> updateStateItem(@Path(\"id_item\") Integer itemId,\n @Body ItemStateWrapper wrapper);\n}", "@Override\n public void refreshData() {\n\n if (InternetConnection.checkConnection(context)) {\n ApiService apiService = RetroClient.getApiService();\n Call<String> call = apiService.getFactdata();\n Log.e(TAG, \"request ongetData url :\" + call.request().url());\n call.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n Log.e(TAG, \"response : ongetData :\" + response.body());\n parseResponse(response.body());\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n Log.e(TAG, \"onFailure ongetData : \" + t.getMessage());\n }\n });\n } else {\n factDataView.displayMessage(context.getString(R.string.nonetwork), false);\n }\n }", "public interface HealthReserveService {\n @GET(\"hospital/package_hospital_list\")\n Observable<ResultUtilOfHospitalList> getOwnPackageHospitalList();\n\n @GET(\"medical_package/package_list/{hospital}\")\n Observable<ResultUtilOfPackageBean> getHospitalPackage(@Path(\"hospital\") int id);\n\n @FormUrlEncoded\n @POST(\"/medical_order/new_medical_order\")\n Observable<ResultUitlOfReserve> ReserveNow(@Header(\"Cookie\") String cookie, @Field(\"startTime\") Timestamp startTime, @Field(\"endTime\") Timestamp endTime, @Field(\"name\") String name, @Field(\"phoneNumber\") String phoneNumber, @Field(\"medical_package_id\") int id);\n\n @GET(\"medical_package/package_favourable_hospital_list\")\n Observable<ResultUtilOfHospitalList> getDiscountPackageHospitalList();\n\n @GET(\"medical_package/favourable_package_list_by_hospital_id/{hospital_id}\")\n Observable<ResultUtilOfPackageBean> getHospitalDiscountPackage(@Path(\"hospital_id\") int id);\n}", "public interface ApiService {\n //用户中心首页头像名称显示\n @GET(\"app/ucenter/profile/\")\n Observable<MeInfoBean> loadHeadInfo(@Query(\"uid\") int uid);\n //个人资料修改\n @FormUrlEncoded\n @POST(\"app/ucenter/profileSave/\")\n Observable<RequestStatusBean> changeUserInfo(@FieldMap Map<String, String> map);\n\n //修改用户头像\n @Multipart\n @POST(\"app/ajax/uploadAvatarPic/\")\n Observable<UserHeadBean> changeUserHead(@Part(\"uid\") RequestBody uid, @Part MultipartBody.Part file);\n\n //收货地址列表\n @GET(\"app/ucenter/address\")\n Observable<GoodsListBean> loadGoodsAddress(@Query(\"uid\") int uid);\n\n //收货地址保存\n @FormUrlEncoded\n @POST(\"app/ucenter/addressSave\")\n Observable<RequestStatusBean> savaGoodsAddress(@FieldMap Map<String,String> map);\n\n //修改默认地址\n @GET(\"app/ucenter/addressDefault\")\n Observable<RequestStatusBean> setDefaulsAddress(@QueryMap Map<String, String> param);\n\n //获得收藏列表\n @FormUrlEncoded\n @POST(\"app/ucenter/favoriteList/\")\n Observable<CollectListBean> getCollectList(@FieldMap Map<String, String> param);\n\n //添加收藏\n\n @GET(\"app/ucenter/favoriteAdd\")\n Observable<RequestStatusBean> addCollect(@QueryMap Map<String, String> param);\n\n //添加收藏\n @GET(\"app/goods/workshopFav/\")\n Observable<RequestStatusBean> workshopFav(@QueryMap Map<String, String> param);\n\n //取消收藏\n @GET(\"app/ucenter/favoriteDelete\")\n Observable<RequestStatusBean> cacheCollect(@QueryMap Map<String, String> param);\n\n //我的足迹\n @FormUrlEncoded\n @POST(\"app/ucenter/historyList\")\n Observable<FootpringBean> loadFootprint(@FieldMap Map<String,String> map);\n\n //删除足迹\n @FormUrlEncoded\n @POST(\"app/ucenter/historyDelete\")\n Observable<RequestStatusBean> clearFootPrint(@FieldMap Map<String,String> map);\n\n //购物车\n @GET(\"app/ucenter/shopcartList/\")\n Observable<ShopcartListBean> getShoppCartList(@Query(\"uid\") int id);\n\n //加载单个购物车\n @FormUrlEncoded\n @POST(\"app/ucenter/shopcartShow\")\n Observable<SingleShoppCartBean> loadSingleShpCart(@FieldMap Map<String, String> param);\n\n //修改购物车\n @FormUrlEncoded\n @POST(\"app/ucenter/shopcartEdit\")\n Observable<RequestStatusBean> changeShopCart(@FieldMap Map<String, String> param);\n\n //删除购物车商品\n @GET(\"app/ucenter/shopcartDelete\")\n Observable<RequestStatusBean> deleteShoppCart(@QueryMap Map<String, String> param);\n\n //购物车下单确认\n @FormUrlEncoded\n @POST(\"app/order/confirm_shopcart/\")\n Observable<ShopCartOrderSureBean> shopCartOrderSure(@FieldMap Map<String, String> param);\n\n //获得订单列表\n @FormUrlEncoded\n @POST(\"app/order/orderList\")\n Observable<MyOrderBean> getOrderList(@FieldMap Map<String, String> param);\n\n //查询订单\n @FormUrlEncoded\n @POST(\"app/order/orderSelect\")\n Observable<MyOrderBean> queryOrderList(@FieldMap Map<String,String> map);\n\n //获得订单详情\n @FormUrlEncoded\n @POST(\"app/order/orderDetail\")\n Observable<MyOrderBean> getOrderDetails(@FieldMap Map<String,String> map);\n\n //取消订单\n @FormUrlEncoded\n @POST(\"app/order/orderDelete\")\n Observable<RequestStatusBean> cancelOrder(@FieldMap Map<String,String> map);\n\n //确认收货\n @FormUrlEncoded\n @POST(\"app/order/order_receive/\")\n Observable<RequestStatusBean> sureGoods(@FieldMap Map<String,String> map);\n\n //退款申请\n\n //登录\n @FormUrlEncoded\n @POST(\"app/user/dologin/\")\n Observable<RequestStatusBean> Login(@FieldMap Map<String,String> map);\n\n //注册\n @FormUrlEncoded\n @POST(\"app/user/doreg/\")\n Observable<RequestStatusBean> Register(@FieldMap Map<String,String> map);\n\n // 找回密码\n @POST(\"ios/user/getpassword/\")\n Observable<RequestStatusBean> FindPwd(@QueryMap Map<String,String> map);\n\n // 获取验证码\n @GET(\"app/ajax/checkpost/\")\n Observable<RequestStatusBean> getCode(@QueryMap Map<String,String> map);\n\n // 手机快捷登录获取验证码\n @GET(\"app/ajax/logincheck/\")\n Observable<RequestStatusBean> getPhoneLoginCode(@QueryMap Map<String,String> map);\n\n //手机快捷登录\n @FormUrlEncoded\n @POST(\"app/user/quicklogin/\")\n Observable<LoginBean> phoneLogin(@FieldMap Map<String,String> map);\n\n //修改密码\n @FormUrlEncoded\n @POST(\"app/user/changepassword/\")\n Observable<RequestStatusBean> changePwd(@FieldMap Map<String,String> map);\n\n //手机号绑定\n @GET(\"app/ucenter/mobile_save/\")\n Observable<RequestStatusBean> bindPhone(@QueryMap Map<String,String> map);\n\n //获得绑定的手机号码\n @GET(\"app/ucenter/mobile_binding/\")\n Observable<RequestStatusBean> loadBindPhone(@Query(\"uid\") int uid);\n\n //获得微信登录的数据\n @GET()\n Observable<WechatBean> getWeChatLoginData(@Url String url);\n\n //微信登录\n @FormUrlEncoded\n @POST(\"app/user/wxlogin/\")\n Observable<RequestStatusBean> weChatLogin(@FieldMap Map<String,String> map);\n\n //绑定微信号\n @GET(\"app/user/wxreg/\")\n Observable<RequestStatusBean> bindWeChat(@QueryMap Map<String, String> param);\n\n //微信解除绑定\n @GET(\"app/user/wxunbind/\")\n Observable<RequestStatusBean> unBindWeChat(@Query(\"uid\") int uid);\n\n //微信绑定显示\n @GET(\"app/user/wxshow/\")\n Observable<RequestStatusBean> showBindWeChart(@Query(\"uid\") int uid);\n\n //加载微信用户信息\n @GET()\n Observable<WechatInfoBean> getWeChatInfo(@Url String url);\n\n //我的评论\n @GET(\"app/ucenter/commentList/\")\n Observable<MyCommentBean> loadMyComment(@Query(\"uid\") int uid);\n //发布评论\n @FormUrlEncoded\n @POST(\"app/ucenter/commentSave/\")\n Observable<RequestStatusBean> addComment(@FieldMap Map<String, String> param);\n\n //发布追评\n @FormUrlEncoded\n @POST(\"app/ucenter/commentAddSave/\")\n Observable<RequestStatusBean> addAddComment(@FieldMap Map<String, String> param);\n\n //上传评论图片\n @Multipart\n @POST(\"app/ajax/uploadCommentPic/\")\n Observable<CommentPicBean> addCommentPic(@Part MultipartBody.Part file);\n\n //退款列表\n @GET(\"app/order/refundList/\")\n Observable<RefundBean> loadRefundList(@Query(\"uid\") int uid);\n\n //退款详情\n @GET(\"app/order/refundOrder/\")\n Observable<RefundDetailBean> loadRefundDetail(@QueryMap Map<String, String> param);\n\n //撤销退款\n @GET(\"app/order/refundDel/\")\n Observable<RequestStatusBean> refundDel(@QueryMap Map<String, String> param);\n\n //退款物流信息\n @GET(\"app/order/expressviewrefund/\")\n Observable<ResponseBody> loadRefundExpress(@Query(\"refundno\") String refundno);\n\n //物流信息\n @GET(\"app/order/expressView/\")\n Observable<ResponseBody> loadExpress(@Query(\"orderno\") String orderno);\n\n\n //退款申请\n @FormUrlEncoded\n @POST(\"app/order/refundApply/\")\n Observable<RequestStatusBean> refundApply(@FieldMap Map<String, String> param);\n\n //退款图片上传\n @Multipart\n @POST(\"app/ajax/uploadRefundPic/\")\n Observable<CommentPicBean> uploadRefundPic(@Part MultipartBody.Part file);\n\n //提交退货\n @FormUrlEncoded\n @POST(\"app/order/refundExpress/\")\n Observable<RequestStatusBean> refundGood(@FieldMap Map<String, String> param);\n\n //首页今日专场轮播图\n @GET(\"app/dailyTopSlider/\")\n Observable<WeekTopListBean> getDailyTopSlider();\n\n //首页今日专场列表\n @GET(\"app/dailyList/\")\n Observable<ListBean<DailyBean>> getDailyList();\n\n //首页7日轮播图\n @GET(\"app/weekTop/\")\n Observable<WeekTopListBean> getWeekTop();\n //首页7日爆款列表\n @GET(\"app/weekList/\")\n Observable<WeekListBean> getWeekList(@QueryMap Map<String, String> param);\n\n //首页往期专场\n @GET(\"app/pastList/\")\n Observable<ListBean<DailyBean>> getPastList();\n\n //产品分类\n @GET(\"app/sorted/\")\n Observable<SortedListBean> getSorted();\n\n //专题详情列表\n @GET(\"app/goods/specialGoodsList/\")\n Observable<SpecialDetailBean> getSpecialGoodsList(@QueryMap Map<String, String> param);\n\n //商品详情\n @GET(\"app/goods/goodsDetail/\")\n Observable<GoodsDetailBean> getGoodsDetail(@QueryMap Map<String, String> param);\n //商品详情的同类推荐\n @GET(\"app/recommend/\")\n Observable<SimilarRecommenListBean> getSimilarRecommen(@Query(\"tid\") int tid);\n\n //工作室\n @GET(\"app/goods/workshopList/\")\n Observable<StudioBean> getStudio();\n\n //工作室\n @GET(\"app/goods/workshopGoods/\")\n Observable<StudioShopBean> getStudioShop(@QueryMap Map<String, String> param);\n\n //收藏工作室\n @GET(\"app/goods/workshopFav/\")\n Observable<RequestStatusBean> focusWork(@QueryMap Map<String, String> param);\n\n @FormUrlEncoded\n @POST(\"app/order/confirm\")\n Observable<OrderSureBean> orderSure(@FieldMap Map<String, String> param);\n\n //创建订单\n @FormUrlEncoded\n @POST(\"app/order/create\")\n Observable<RequestStatusBean> createOrder(@FieldMap Map<String, String> param);\n\n //创建购物车订单\n @FormUrlEncoded\n @POST(\"app/order/create_shopcart\")\n Observable<RequestStatusBean> createShopCartOrder(@FieldMap Map<String, String> param);\n\n //查询商品列表\n @GET(\"app/goods/goodsSorted\")\n Observable<SpecialDetailBean> goodsSorted(@QueryMap Map<String, String> param);\n\n //收入明细\n @FormUrlEncoded\n @POST(\"app/user/getFinance\")\n Observable<TuiguangItem1Bean> tuiguangItem1(@FieldMap Map<String, String> param);\n //人脉资源\n @FormUrlEncoded\n @POST(\"app/user/getUserSub\")\n Observable<TuiguangItem2Bean> tuiguangItem2(@FieldMap Map<String, String> param);\n}", "public interface apiService {\n\n\n\n String base_url= \"http://192.168.43.154:8081/\";\n\n @GET(\"getprofile\")\n Call<Employee> getProfilehero(@Query(\"racf\") String id,@Query(\"password\") String pass);\n\n @GET(\"getpeopleonleave\")\n Call<Datesss> getdetailsondate(@Query(\"date\") String d);\n\n @GET(\"authentication\")\n Call<Auth> getAuth(@Query(\"racf\") String d,@Query(\"password\") String dd);\n\n @GET(\"getleavedates\")\n Call<leaves> getleavedates(@Query(\"racf\") String d);\n\n @GET(\"getwfhdates\")\n Call<WorkFromHome> getwfhdates(@Query(\"racf\") String dd);\n\n @GET(\"updateno\")\n Call<Auth> updating(@Query(\"racf\") String d,@Query(\"contacts\") String dd,@Query(\"contactnames\") String ddd);\n\n @GET(\"updateworkfromhome\")\n Call<Auth> updatingwfh(@Query(\"racf\") String d,@Query(\"dates\") String dd,@Query(\"reasons\") String ddd);\n\n @GET(\"updateonleave\")\n Call<Auth> updatingleave(@Query(\"racf\") String d,@Query(\"date\") String dd,@Query(\"reason\") String ddd);\n\n\n}", "public interface EntityService {\n String SERVICE_ENDPOINT = \"http://172.25.14.138:3100/\";\n\n @GET(\"tables\")\n Observable<List<Entity>> getEntities();\n\n @POST(\"add\")\n Observable<Entity> addEntity(@Body Entity e);\n\n @DELETE(\"presence/{id}\")\n Observable<Entity> deleteEntity(@Path(\"id\") int entityId);\n\n @POST(\"presence\")\n Observable<Entity> updateEntity(@Body Entity entity);\n\n// @FormUrlEncoded\n// @PUT(\"updateEntity2\")\n// Observable<Entity> updateEntity2(@Field(\"id\") int entityId, @Field(\"field1\") String field1,@Field(\"field2\") String field2,@Field(\"field3\") String field3);\n\n\n\n}", "@Override\n public void onRefresh() {\n updateListings();\n new GetDataTask().execute();\n }", "public interface CircleService {\n\n @FormUrlEncoded\n @POST(\"/circle/list\")\n LiveData<BaseBean<List<CircleBean>>> getCircleData(@Field(\"userid\") long useId, @Field(\"pagesize\") int pageSize, @Field(\"pageno\") int pageNo);\n @FormUrlEncoded\n @POST(\"/circle/add\")\n Flowable<BaseBean<CircleBean>> upCircleData(@Field(\"userid\")long userId,@Field(\"content\") String content,@Field(\"images\") String images);\n}", "public interface HomeListService {\n\n public static final String KEY_LIMIT = \"limit\";\n public static final String KEY_OFFSET = \"offset\";\n\n @POST(\"android_login1\")\n Observable<List<ArticleListBean>> getHomeArticleList(@Body String id);\n\n\n// @GET(\"api/3/news/before/{date}\")\n// Observable<ArticleListEntity> getHomeArticleList(@Path(\"date\") String date);\n\n}", "private void setRecyclerViewData() {\n }", "public WidgetUpdateService() {\n super(\"WidgetUpdateService\");\n }", "public UpdateService() {\n super(\"UpdateService\");\n }", "public interface ApiService {\n\n// @FormUrlEncoded\n// @POST(\"tambah_data.php\")\n// Call<ResponseBody> tambahData(@Field(\"nama\") String nama, @Field(\"jenis\") String jenis, @Field(\"keterangan\") String keterangan);\n//\n// @FormUrlEncoded\n// @POST(\"edit_data.php\")\n// Call<ResponseBody> editData(@Field(\"id_barang\") String id, @Field(\"nama_barang\") String nama, @Field(\"jenis_barang\") String jenis, @Field(\"keterangan_barang\") String keterangan);\n//\n// @FormUrlEncoded\n// @POST(\"hapus_data.php\")\n// Call<ResponseBody> hapusData(@Field(\"id_barang\") String id_barang);\n\n @GET(\"api_notif.php\")\n Call<List<ModelDataNotif>> getAllSewa();\n\n// @GET(\"single_data.php\")\n// Call<List<ModelData>> getSingleData(@Query(\"id_barang\") String id);\n\n}", "public Service_WidgetUpdate() {\n super(\"WidgetUpdateService\");\n }", "public interface LogisticsDataApi {\n\n\n /**\n * 用户类型:-1用户, 0-咨询会员,1-交易会员,2-商家会员\n * 会员认证 状态: 0 -未认证, 1 -已认证\n * 会员锁定 状态: 0 -正常, 1 -锁定, 2 -注销\n * /member/query_type_new?token GET 用户类型\n */\n @GET(\"member/query_type_new\")\n Observable<UserTypeData> getUserType(@Query(\"token\") String token);\n\n /**\n * 发布求购 publish\n *\n * 收货信息 member/get_member_delivery_address?token 取默认地址 / 没有默认取第一条\n *\n * 原料品名 baseData/query_breed?keyword\n * 原料牌号 baseData/query_spec?keyword & code // code 为 breed code\n * 生产厂家 baseData/query_brand?keyword\n *\n * 提交 求购数据 member/publish_buy - post reference: class: MemberPurchaseDTOs\n */\n\n\n // 收货地址\n @GET(\"member/get_member_delivery_address\")\n Observable<PublishData.AddressData> getAddressData(@Query(\"token\") String token);\n\n // breed\n @GET(\"baseData/query_breed\")\n Observable<PublishData> getBreedData(@Query(\"keyword\") String keyword);\n // spec\n @GET(\"baseData/query_spec\")\n Observable<PublishData> getSpecData(@Query(\"keyword\") String keyword,\n @Query(\"code\") String breedCode);\n // brand\n @GET(\"baseData/query_brand\")\n Observable<PublishData.PublishBrandData> getBrandData(@Query(\"keyword\") String keyword);\n\n\n\n // 提交 求购数据 post Content-Type为application/json todo\n @POST(\"member/publish_buy\")\n Observable<VerifyData> postPurchaseData(@Body RequestBody requestBody);\n\n\n /**\n * 发布求购 publish - 收货地址 新增/编辑 get\n @\"/member/save_member_delivery_address\" // 新增收货信息\n @\"/member/update_member_delivery_address\" // 编辑收货信息\n */\n // 新增收货信息\n @GET(\"member/save_member_delivery_address\")\n Observable<VerifyData> getSaveAddressData(\n @Query(\"token\") String token,\n @Query(\"address\") String address,\n @Query(\"contactName\") String contactName,\n @Query(\"mobile\") String mobile,\n @Query(\"isDefault\") String isDefault,\n @Query(\"provinceCode\") String provinceCode,\n @Query(\"provinceName\") String provinceName,\n @Query(\"cityCode\") String cityCode,\n @Query(\"cityName\") String cityName,\n @Query(\"districtCode\") String districtCode,\n @Query(\"districtName\") String districtName\n );\n\n // 修改收货信息 (memberDeliveryAddressId 新增地址没有此参数)\n @GET(\"member/update_member_delivery_address\")\n Observable<VerifyData> getUpdateAddressData(\n @Query(\"token\") String token,\n @Query(\"address\") String address,\n @Query(\"contactName\") String contactName,\n @Query(\"mobile\") String mobile,\n @Query(\"isDefault\") int isDefault,\n @Query(\"provinceCode\") String provinceCode,\n @Query(\"provinceName\") String provinceName,\n @Query(\"cityCode\") String cityCode,\n @Query(\"cityName\") String cityName,\n @Query(\"districtCode\") String districtCode,\n @Query(\"districtName\") String districtName,\n @Query(\"memberDeliveryAddressId\") String memberDeliveryAddressId\n );\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n /**\n * purchase\n * member/purchase_pool?token 求购池数据\n * member/my_purchase_list?token 我的求购\n * shop/my_quote_list?token 我的报价\n */\n @GET(\"member/purchase_pool\")\n Observable<PurchaseData> getPurchasePoolData(@Query(\"token\") String token,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n\n @GET(\"member/my_purchase_list\")\n Observable<PurchaseData> getMyPurchaseData(@Query(\"token\") String token,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n @GET(\"shop/my_quote_list\")\n Observable<PurchaseData> getMyQuoteData(@Query(\"token\") String token,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n /**\n * member/purchase_quote_list?token&memberPurchaseId 求购报价详情\n * shop/my_quote_detail?quoteId&token 报价详情\n */\n\n @GET(\"member/purchase_quote_list\")\n Observable<PurchaseQuoteData> getMyPurchaseDetailData(@Query(\"token\") String token,\n @Query(\"memberPurchaseId\") String memberPurchaseId);\n\n @GET(\"shop/my_quote_detail\")\n Observable<QuoteDetailData> getMyQuoteDetailData(@Query(\"token\") String token,\n @Query(\"quoteId\") String quoteId);\n\n\n /**\n * member/member_review_quote ?token&sellMemberQuoteId& reviewNote 买家复议\n * shop/sell_review_quote ? token& quoteId& price 卖家复议\n */\n\n @GET(\"member/member_review_quote\")\n Observable<VerifyData> getPurchaseReviewData(@Query(\"token\") String token,\n @Query(\"sellMemberQuoteId\") String sellMemberQuoteId,\n @Query(\"reviewNote\") String reviewNote);\n\n @GET(\"shop/sell_review_quote\")\n Observable<VerifyData> getQuoteReviewData(@Query(\"token\") String token,\n @Query(\"quoteId\") String quoteId,\n @Query(\"price\") String price);\n\n\n /** 商家报价\n * baseData/query_like_warehouse?companyShortName 模糊搜索仓库\n * baseData/query_warehouse?companyShortName 精准搜索仓库 1.创建新仓库校验 2.选择历史\n * shop/sell_price 报价 - 提交报价数据 post\n */\n\n @GET(\"baseData/query_like_warehouse\")\n Observable<WarehouseData> getFuzzyWarehouseData(@Query(\"companyShortName\") String companyShortName);\n\n @GET(\"baseData/query_warehouse\")\n Observable<WarehouseData.WarehouseCheckData> getWarehouseData(@Query(\"companyShortName\") String companyShortName);\n\n\n // 提交报价数据 post todo\n @FormUrlEncoded\n @POST(\"shop/sell_price\")\n Observable<VerifyData> postQuoteData(\n @Field(\"token\") String token,\n @Field(\"memberPurchaseId\") long memberPurchaseId,\n @Field(\"price\") double price,\n @Field(\"isSupplierDistribution\") int isSupplierDistribution, // 0 - no ; 1 - yes;\n @Field(\"deliveryDate\") String deliveryDate,\n @Field(\"warehouse\") String warehouse // warehouse json\n );\n\n\n\n\n\n\n /**\n * logistics\n * /app/logistics/from_address 出发地\n * /app/logistics/to_address?provFrom&cityFrom&distinctFrom 目的地\n * /app/logistics/query_price?provFrom&cityFrom&distinctFrom&provTo&cityTo&distinctTo&amount 价格\n * @return\n */\n\n // 出发地\n @GET(\"logistics/from_address\")\n Observable<LogisticsCityData> getFromData();\n\n // 目的地\n @GET(\"logistics/to_address\")\n Observable<LogisticsCityData> getDestinationData(@Query(\"provFrom\") String provFrom,\n @Query(\"cityFrom\") String cityFrom,\n @Query(\"distinctFrom\") String distinctFrom\n );\n\n // 价格\n @GET(\"logistics/query_price\")\n Observable<LogisticsResultData> getPriceData(@Query(\"provFrom\") String provFrom,\n @Query(\"cityFrom\") String cityFrom,\n @Query(\"distinctFrom\") String distinctFrom,\n @Query(\"provTo\") String provTo,\n @Query(\"cityTo\") String cityTo,\n @Query(\"distinctTo\") String distinctTo,\n @Query(\"amount\") int amount\n );\n\n\n /**\n * 一键下单页面计算:\n 采购单价:求购报价的价格;\n 运费单价:求购报价的运费单价;(非供配情况下,选择自提,重置为0)\n 资金服务费利率:未认证会员为0;\n 账期:使用授信(部分授信,或全部授信)默认为最大账期天数;款到发货,账期为0;\n\n 选择账期后计算-----------------------------------------------------\n\n 1.资金服务费 =(采购单价+运费单价)*数量*资金服务费利率*账期\n\n * 全部授信- 资金服务费 =(采购单价+运费单价)*数量*资金服务费利率*账期\n * 部分授信- 资金服务费 = 授信额度(自填)*资金服务费利率*账期\n\n\n 2.销售总货款 =(采购单价+运费单价)*数量 + 资金服务费\n\n 3.采购总货款 = 采购单价*数量\n\n 4.物流总货款 = 运费单价*数量\n\n 5.销售单价 = 销售总货款/数量\n\n\n 6.使用授信(授信金额)\n 全部授信-使用授信 =(采购单价+运费单价)* 数量 + 资金服务费\n 部分授信-使用授信 = 授信额度(自填);\n 款到发货-使用授信 = 0;\n\n 7.手续费 = 销售总货款*0.3%\n *\n * /member/purchase_check_create_order?token \t\t\t\t 检验能否一键下单\n * /member/query_purchase_create_order_details?token&quoteId 确认订单\n */\n\n // 检验能否一键下单\n @GET(\"member/purchase_check_create_order\")\n Observable<VerifyData> getOrderCheckData(@Query(\"token\") String token);\n\n // 确认订单\n @GET(\"member/query_purchase_create_order_details\")\n Observable<OrderConfirmData> getOrderConfirmData(@Query(\"token\") String token,\n @Query(\"quoteId\") String quoteId);\n\n /**\n * 保证金\n * order/check_deposit?token & receivableWay\n */\n @GET(\"order/check_deposit\")\n Observable<VerifyData> getCheckDepositData(@Query(\"token\") String token,\n @Query(\"receivableWay\") String receivableWay);\n\n /**\n * private Long memberPurchaseId = 0L;\t\t\t\t\t\t// 会员求购单Id\n private Long sellMemberQuoteId = 0L;\t\t\t\t\t // 报价单Id\n\n private Double saleSumQty = 0D;\t\t\t\t\t\t\t// 销售总重量\n private Double saleSumAmt = 0D;\t\t\t\t\t\t\t// 销售总金额\n private Double purchaseSumQty = 0D;\t\t\t\t\t\t// 采购总重量\n private Double purchaseSumAmt = 0D;\t\t\t\t\t\t// 采购总金额\n private Double logisticsSumCost = 0D;\t\t\t\t\t // 物流总货款\n private Double salePrice = 0D;\t\t\t\t\t\t\t // 销售单价\n\n private Integer distributionWay = 0;\t\t\t\t\t// 配送方式 0-供方配送 1-自提 2-平台配送\n private String deliveryDate = \"\";\t\t\t\t\t\t// 交货日期\n private Integer receivableWay = 0;\t\t\t\t\t\t// 结算方式 0-全额授信 1-部分授信 2-款到发货\n private Double creditAmount = 0D;\t\t\t\t\t\t// 授信金额\n private Integer receivableDay = 0;\t\t\t\t\t\t// 货到收款天数- 账期\n\n private String packagSpec = \"\";\t\t\t\t\t\t// 包装规格\n\n private Double memberMoneyRate = 0D;\t\t\t\t\t// 服务费利率\n private\tDouble serviceAmt = 0D;\t\t\t\t\t\t// 服务费\n */\n /**\n * /order/purchase_save_sale_order // 一键下单 todo\n */\n @FormUrlEncoded\n @POST(\"order/purchase_save_sale_order\")\n Observable<VerifyData> postOrderData(@Field(\"token\") String token,\n @Field(\"memberPurchaseId\") Long memberPurchaseId,\n @Field(\"sellMemberQuoteId\") Long sellMemberQuoteId,\n @Field(\"saleSumQty\") Double saleSumQty,\n @Field(\"saleSumAmt\") Double saleSumAmt,\n @Field(\"purchaseSumQty\") Double purchaseSumQty,\n @Field(\"purchaseSumAmt\") Double purchaseSumAmt,\n @Field(\"logisticsSumCost\") Double logisticsSumCost,\n @Field(\"salePrice\") Double salePrice,\n @Field(\"distributionWay\") int distributionWay,\n @Field(\"deliveryDate\") String deliveryDate,\n @Field(\"receivableWay\") int receivableWay,\n @Field(\"creditAmount\") Double creditAmount,\n @Field(\"receivableDay\") int receivableDay,\n @Field(\"packagSpec\") String packagSpec,\n @Field(\"memberMoneyRate\") Double memberMoneyRate,\n @Field(\"serviceAmt\") Double serviceAmt);\n\n\n\n\n\n /**\n * OrderFragment 订单列表\n * @param token\n * @param subStatus\n * 10-待审核 12-待支付手续费 11-待上传采购合同\n * 20-待收款 30-待付款 40-待发货 50-待确认收货\n * 90-交易失败 100-待开票? 101-待开票审核? 102-交易成功\n */\n @GET(\"order/query_order_list\")\n Observable<OrdersData> getOrderData(@Query(\"token\") String token,\n @Query(\"subStatus\") String subStatus,\n @Query(\"pageNum\") int pageNum,\n @Query(\"pageSize\") int pageSize);\n\n /**\n * 订单详情\n * order/query_order_detail?token&orderId\n */\n @GET(\"order/query_order_detail\")\n Observable<OrderDetailData> getOrderDetailData(@Query(\"token\") String token,\n @Query(\"orderId\") String orderId);\n\n /**\n * 支付手续费\n * order/member_purchase_alipay_create?token&orderSn&goodsAmount 支付宝 todo\n * order/member_purchase_wx_create?token&orderSn&goodsAmount 微信 todo\n * private String operateStatus;\t// 操作状态 null没有; A0-支付手续费; A1-开票申请; A2-申请展期\n */\n\n // 支付宝支付\n @FormUrlEncoded\n @POST(\"order/member_purchase_alipay_create\")\n Observable<OrderData> postAliPayData(@Field(\"token\") String token,\n @Query(\"orderId\") String orderId,\n @Field(\"orderSn\") String orderSn,\n @Field(\"goodsAmount\") String goodsAmount);\n\n\n\n // 微信支付\n @FormUrlEncoded\n @POST(\"order/member_purchase_wx_create\")\n Observable<OrderPayData> postWeChatPayData(@Field(\"token\") String token,\n @Query(\"orderId\") String orderId,\n @Field(\"orderSn\") String orderSn,\n @Field(\"goodsAmount\") String goodsAmount);\n\n /**\n * rder/query_extends_days_detail?orderId&token 展期详情\n * order/save_extends_days 申请展期\n */\n @GET(\"order/query_extends_days_detail\")\n Observable<ExtensionData> getExtensionData(@Query(\"token\") String token,\n @Query(\"orderId\") String orderId);\n\n /**\n * order/save_extends_days 申请展期\n * private String token ;\n private Long orderId = 0L; // 订单Id\n private String contractCode = \"\"; // 关联合同号\n private Double amount = 0D; // 金额\n private Integer days = 0; // 天数\n private String note = \"\"; // 备注\n */\n\n @FormUrlEncoded\n @POST(\"order/save_extends_days\")\n Observable<VerifyData> postExtensionData(@Field(\"token\") String token,\n @Query(\"orderId\") long orderId,\n @Field(\"contractCode\") String contractCode,\n @Field(\"amount\") double amount,\n @Field(\"days\") int days,\n @Field(\"note\") String note);\n\n}", "private void fetchData() {\n if (!isNetworkAvailable()){\n Toast.makeText(this, getString(R.string.no_internet_connection), Toast.LENGTH_SHORT).show();\n swipeRefreshLayout.setRefreshing(false);\n return;\n }\n\n apiInterface = ApiUtils.getApi();\n Call<List<Item>> call = apiInterface.getItems();\n call.enqueue(new Callback<List<Item>>() {\n @Override\n public void onResponse(Call<List<Item>> call, Response<List<Item>> response) {\n if (response.isSuccessful()){\n DatabaseController.getInstance(getApplicationContext()).clearDatabase();\n PicassoTools.clearCache(Picasso.with(getApplicationContext()));\n List<Item> items = response.body();\n for (Item item : items) {\n DatabaseController.getInstance(getApplicationContext()).addItem(item);\n// Log.d(TAG, \"add in list items \" + item.getId().toString());\n }\n updateUI();\n }else {\n Log.d(TAG, response.errorBody().toString());\n Toast.makeText(MainActivity.this, R.string.error, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<List<Item>> call, Throwable t) {\n Log.d(TAG, \"onFailure: \" + t.getMessage());\n swipeRefreshLayout.setRefreshing(false);\n }\n });\n }", "public mService() {\n super(\"fetchImageService\");\n }", "public abstract void observeSpecificData(Service service);", "public interface HttpService {\n//banner/query?type=1\n // public static final String BASE_URL=\"http://112.124.22.238:8081/course_api/\";\n @GET(\"banner/query\")\n Call<List<HeaderBean>> getHeaderData(@Query(\"type\") String type);\n @GET(\"campaign/recommend\")\n Call<List<RecommendBean>> getRecommendData();\n}", "public interface APIService {\n\n @GET(\"api/rates\")\n Observable<List<ProductModel>> getproductdata();\n\n}", "public void updateData(restaurantRes res){\r\n \r\n }", "@Override\n public void onRefresh() {\n getData();\n }", "public static void initService() {\n Retrofit retrofit = new Retrofit.Builder().baseUrl(\"http://166.111.68.66:2042/news/\")\n .addConverterFactory(new Converter.Factory() {\n Gson gson = new Gson();\n\n @Override\n public Converter<ResponseBody, ?> responseBodyConverter(final Type type, final Annotation[] annotations, Retrofit retrofit) {\n return new Converter<ResponseBody, Object>() {\n @Override\n public Object convert(ResponseBody value) throws IOException {\n try {\n return gson.getAdapter(TypeToken.get(type)).fromJson(value.charStream());\n } finally {\n value.close();\n }\n }\n };\n }\n }).build();\n newsdetailHttpService = retrofit.create(GetNewsDetailService.NewsDetailHttpService.class);\n }", "public interface ServiceApi {\n @GET(\"/user/login\")\n Observable<DlBean> dL(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/user/reg\")\n Observable<ZcBean> zC(@Query(\"mobile\") String mobile,@Query(\"password\") String password );\n @GET(\"/ad/getAd\")\n Observable<LbBean> lieb(@Query(\"source\") String source );\n // http://120.27.23.105/product/getProductDetail?pid=1&source=android\n @GET(\"/product/getProductDetail\")\n Observable<XqBean> xQ(@Query(\"source\") String source, @Query(\"pid\") int pid);\n @GET(\"product/getCarts\")\n Observable<MsgBean<List<DataBean>>> getDatas(@Query(\"uid\") String uid, @Query(\"source\") String source);\n @GET(\"product/deleteCart\")\n Observable<MsgBean> deleteData(@Query(\"uid\") String uid, @Query(\"pid\") String pid, @Query(\"source\") String source);\n\n}", "public interface ConnectService {\n\n @GET(\"/api/v1/categories\")\n void getCategories(\n @Query(\"parent_id\") int parentId,\n @Query(\"page\") int page,\n @Query(\"page_size\") int pageSize,\n Callback<Response<ArrayList<Category>>> callback\n );\n\n @GET(\"/api/v1/products\")\n void getProducts(\n @Query(\"category_id\") int categoryId,\n @Query(\"page\") int page,\n @Query(\"page_size\") int pageSize,\n Callback<Response<ArrayList<Product>>> callback\n );\n\n @GET(\"/api/v1/product\")\n void getProduct(\n @Query(\"product_id\") int productId,\n Callback<Response<Product>> callback\n );\n\n @POST(\"/api/v1/system/feedback\")\n void sendFeedback(\n @Query(\"content\") String content,\n @Query(\"contact\") String contact,\n Callback<Response> callback\n );\n\n @POST(\"/api/v1/system/contribute\")\n void contribute(\n @Query(\"title\") String title,\n @Query(\"contact\") String contact,\n Callback<Response> callback\n );\n}", "public interface ApiService {\n\n\n public static final String BASE_URL = \"http://112.124.22.238:8081/course_api/cniaoplay/\";\n\n// @GET(\"featured\")\n// public Call<PageBean<AppInfo>> getApps(@Query(\"p\") String jsonParam);\n\n @GET(\"featured\")\n public Observable<BaseBean<PageBean<AppInfo>>> getApps(@Query(\"p\") String jsonParam);\n\n}", "public interface PromotionEndpoints {\n\n @GET(\"/promotions\")\n Call<ArrayList<GETPromotionResponse>> getPromotionsForRestaurant(\n @Query(\"restaurant_name\") String name, @Query(\"restaurant_address\") String address);\n\n @POST(\"/promotions\")\n Call<Void> createPromotion(@Body POSTPromotionRequest createPromotionRequest);\n\n @DELETE(\"/promotions\")\n Call<Void> deletePromotion(@Query(\"restaurant_name\") String name,\n @Query(\"restaurant_address\") String address,\n @Query(\"date\") String date,\n @Query(\"description\") String description);\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"http://youfood.ddns.net\")\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n PromotionEndpoints promotionEndpoints = retrofit.create(PromotionEndpoints.class);\n}", "public interface SetlistService {\n String BASE_API_URL = \"http://api.setlist.fm/rest/0.1/\";\n String NOT_FOUND_MESSAGE = \"Not Found\";\n\n @GET(\"search/setlists\")\n Call<Setlists> searchSetlists(@Query(\"artistName\") String artist,\n @Query(\"cityName\") String city,\n @Query(\"venueName\") String venue,\n @Query(\"date\") String date,\n @Query(\"year\") String year,\n @Query(\"tour\") String tour,\n @Query(\"p\") int pageNo);\n\n @GET(\"search/artists\")\n Call<Artists> searchArtist(@Query(\"artistName\") String artist, @Query(\"p\") int pageNo);\n\n @GET\n Call<Setlists> getSetlistsByArtist(@Url String url, @Query(\"p\") int pageNo);\n}", "public interface SettingService {\n @FormUrlEncoded\n @POST(\"saveFeedback\")\n Call<HttpResult> feedback(@Field(\"feedback\") String feedback);\n\n @POST(\"saveUsuallyPlace\")\n Call<HttpResult<UsualPlace>> saveUsualPlace(@Query(\"provinceId\") String pId, @Query(\"cityId\") String cId, @Query(\"countyId\") String dId);\n\n @GET(\"usuallyPlace\")\n Call<HttpResult<UsualPlaceData>> listUsuallyPlace();\n\n @POST(\"delUsuallyPlace\")\n Call<HttpResult> delUsuallyPlace(@Query(\"usuallyPlaceId\") String pid);\n\n @GET(\"carousel\")\n Call<HttpResult<Carousel>> getCarousel();\n\n @GET(\"saveTrack\")\n Call<HttpResult> saveLocation(@Query(\"lat\") double lat, @Query(\"lon\") double lon, @Query(\"position\") String position);\n\n @GET(\"msgList\")\n Call<HttpResult<MsgList>> getMsg();\n\n @GET(\"getVersion\")\n Call<HttpResult<Version>> getVersion(@Query(\"platform\") int platform,@Query(\"apptype\") int type);\n\n}", "public interface IMainView extends IView{\n\n\n void refreshRecyclerData(List<Data> newData);\n}", "public interface Server {\n\n @GET\n Call<CalonModel> getCalon(@Url String url);\n\n}", "public interface HttpService {\n\n @POST(\"/demo/store/getStoreById/40\")\n Observable<BaseBean<ArticleInfo>> getCarousel();\n\n}", "public interface ApiService {\n @GET(\"AppServices/AppWebService.asmx/Catagory\")\n Call<Example> getAllCategory();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/PhotoGallary\")\n Call<Example> getAllPhoto(@Field(\"CatagoryId\") String image_id);\n\n\n @GET(\"AppServices/AppWebService.asmx/Notice\")\n Call<Example> GetNotice();\n\n\n @GET(\"AppServices/AppWebService.asmx/GetStandard\")\n Call<Example> GetStandard();\n\n @GET(\"AppServices/AppWebService.asmx/GetSection\")\n Call<Example> GetSection();\n\n @GET(\"AppServices/AppWebService.asmx/News\")\n Call<Example> GetNews();\n\n @GET(\"AppServices/AppWebService.asmx/Assignment\")\n Call<Example> GetAssignment();\n\n @GET(\"AppServices/AppWebService.asmx/Event\")\n Call<Example> GetEvent();\n\n @GET(\"AppServices/AppWebService.asmx/Slider\")\n Call<Example> GetSlider();\n\n @GET(\"AppServices/AppWebService.asmx/Staff\")\n Call<Example> GetStaff();\n\n\n @GET(\"AppServices/AppWebService.asmx/Calander\")\n Call<Example> GetCalander();\n\n @GET(\"AppServices/AppWebService.asmx/Video\")\n Call<Example> GetVideo();\n\n @GET(\"AppServices/AppWebService.asmx/ToDayEvent\")\n Call<Example> GetTodayEvent();\n\n\n @GET(\"AppServices/AppWebService.asmx/ToDayNews\")\n Call<Example> Getodaynews();\n\n @GET(\"AppServices/AppWebService.asmx/RankerStudent\")\n Call<Example> GetSchoolRanker();\n\n\n @GET(\"AppServices/AppWebService.asmx/Medium\")\n Call<Example> GetMedium();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/Standard_Div\")\n Call<Example> GetStandard(@Field(\"MediumId\") String stdid);\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/HomeWork\")\n Call<Example> GetHWork(@Field(\"StdId\") String Stdname);\n\n\n @GET(\"AppServices/AppWebService.asmx/Calander\")\n Call<Example> getcalnder();\n\n @FormUrlEncoded\n @POST(\"AppServices/AppWebService.asmx/TimeTable\")\n Call<Example> GetTimeTable(@Field(\"StdId\")String stdid);\n}", "public interface ReservationService {\n\n @POST(\"reservations/add\")\n Call<Void> addReservations(@Body Reservation reservation);\n\n @GET(\"reservations/{id}.json\")\n Call<Reservation> getReservation(@Path(\"id\") int id) ;\n\n @PUT(\"reservations/{id}.json\")\n Call<Void> editReservations(@Path(\"id\") int id,@Body Reservation reservation);\n\n\n}", "public interface LibraryService {\n\n /*\n\n 1.Search--Keyword\n 2.Get List\n A.Order by created time\n B.Refresh and load next page\n 3.Get specific one\n\n */\n\n @GET(\"classes/Library\")\n Observable<BaseResponse<Library>> getLibrary(@QueryMap Map<String, String> parametersMap);\n\n /*\n curl -X PUT \\\n -H \"X-LC-Id: OOhkF87ffBYBHmvph465ApmV-gzGzoHsz\" \\\n -H \"X-LC-Key: OkaU2qxpo1fbHPtc9o7yQVgM\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"upvotes\":{\"__op\":\"Increment\",\"amount\":1}}' \\\n https://api.leancloud.cn/1.1/classes/Post/558e20cbe4b060308e3eb36c\n */\n @PUT(\"classes/Library/{objId}\")\n Observable<ResponseBody> increaseCount(@Path(\"objId\") String objId, @Body CountIncrement countIncrement);\n\n \n}", "private void getData()\n {\n\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(WebAPIService.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n\n WebAPIService api = retrofit.create(WebAPIService.class);\n\n final Call<List<FoodItem>> call = api.getFoodData();\n\n call.enqueue(new Callback<List<FoodItem>>() {\n @Override\n public void onResponse(Call<List<FoodItem>> call, Response<List<FoodItem>> response) {\n\n foodList.clear();\n mainFoodList.clear();\n\n foodList.addAll(response.body());\n mainFoodList.addAll(response.body());\n\n foodListAdapter.notifyDataSetChanged();\n progressBar.setVisibility(View.GONE);\n swipeRefreshLayout.setRefreshing(false);\n }\n\n @Override\n public void onFailure(Call<List<FoodItem>> call, Throwable t) {\n Log.d(\"Retrofit err\" , t.getMessage());\n }\n });\n }", "@Override\n public void onRefresh() {\n refreshData();\n }", "public static void connectToServer(String baseUrl) {\n\n Retrofit retrofit = new Retrofit.Builder().baseUrl(baseUrl).addConverterFactory(GsonConverterFactory.create()).build();\n UPKService service = retrofit.create(UPKService.class);\n Call<UPKResponse> call = service.getData(\"1ITPdXilVjBOLG_rxaSxeWbK-esHrY8AX3pGvixAzDXo\", \"3\", \"\");\n call.enqueue(new Callback<UPKResponse>() {\n @Override\n public void onResponse(Call<UPKResponse> call, Response<UPKResponse> response) {\n /*\n HAKEEM: added an arraylist data field that will get populated here\n */\n Log.d(\"Success\", \"in there\");\n Log.d(\"YOOO\", \"POJO\" + response.body());\n UPKResponse upkResponse = response.body();\n mUPKList = upkResponse.getRows();\n// uPKReceyclerView.setLayoutManager(new LinearLayoutManager(MapsActivity_Hakeem.getView().getContext()));\n// UPKMapAdapter adapter = new UPKMapAdapter(mUPKList);\n// uPKReceyclerView.setAdapter(adapter);\n Log.d(\"Adapter\", \"adapter attached\");\n\n data = response.body().getRows();\n System.out.println(data);\n System.out.println(\"UPK DATA STREAM\");\n// childCareAdapter = new ChildCareAdapter(response.body());\n// childCareRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n// childCareRecyclerView.setAdapter(adapter);\n }\n\n @Override\n public void onFailure(Call<UPKResponse> call, Throwable t) {\n Log.d(TAG, \"Failed to connect\");\n }\n });\n }", "public interface RedPacketService {\n\n /**\n * @param userId 用户id\n * @param redPacketId 红包Id\n * @param pageNum\n * @param pageSize\n * @return\n */\n\n @FormUrlEncoded\n @POST(\"api/finance/redpacket/v1/selectRedpacketInfo\")\n Observable<ResponseNBean<RedPacketDetailEntity>> redPacketDetail(@Field(\"userId\") String userId, @Field(\"redPacketId\") String redPacketId,\n @Field(\"pageNum\") int pageNum, @Field(\"pageSize\") int pageSize);\n\n /**\n * 确认发红包接口\n *\n * @param userId\n * @param redPacketId\n * @param pwd\n * @return\n */\n @FormUrlEncoded\n @POST(\"api/finance/redpacket/v1/sendRedPackets\")\n Observable<PayReusltBean> sendRedPacket(@Field(\"userId\") String userId, @Field(\"redPacketId\") String redPacketId, @Field(\"password\") String pwd);\n\n\n /**\n * 发送单个或群随机红包\n *\n * @param userId\n * @param type\n * @param money\n * @param friendAccid\n * @param size\n * @param leaveMessage\n * @param payType\n * @return\n */\n @FormUrlEncoded\n @POST(\"api/finance/redpacket/v1/sendRedPacketsInit\")\n Observable<ResponseBean<RedPacketDetailEntity>> sendRedPacket(@Field(\"userId\") String userId, @Field(\"type\") String type,\n @Field(\"money\") String money, @Field(\"friendAccid\") String friendAccid, @Field(\"size\") int size, @Field(\"leaveMessage\") String leaveMessage, @Field(\"payType\") String payType);\n\n @POST(\"api/finance/redpacket/v1/sendRedPacketsInit\")\n Observable<ResponseNBean<RedInit>> sendRedPacket(@Query(\"userId\") String userId, @Query(\"type\") String type,\n @Query(\"money\") String money, @Query(\"friendAccid\") String friendAccid, @Query(\"size\") int size, @Query(\"leaveMessage\") String leaveMessage, @Query(\"payType\") String payType,\n @Query(\"unitPrice\") String unitPrice);\n\n\n /**\n * 转账接口\n *\n * @param amount\n * @param payPass\n * @param meAccId\n * @param otherAccId\n * @param leaveMessage\n * @return\n */\n @FormUrlEncoded\n @POST(\"api/finance/transfer/v1/transferMoney\")\n Observable<ResponseNBean<String>> transfer(@Field(\"amount\") String amount, @Field(\"payPass\") String payPass,\n @Field(\"meAccId\") String meAccId, @Field(\"otherAccId\") String otherAccId, @Field(\"leaveMessage\") String leaveMessage);\n\n\n}", "public interface ArticleApi {\n\n\n //获取所有文章\n @GET(value = \"article/list/{random}\")\n Observable<List<PushArticleDataBean>> getArticleList(@Path(\"random\") int random);\n\n //获取单篇文章\n @GET(value = \"article/single/{article_id}\")\n Observable<PushArticleDataBean> getArticle(@Path(\"article_id\") int article_id);\n\n //搜索文章\n @POST(value = \"article/search\")\n Call<ArrayList<PushArticleDataBean>> search(@Query(\"searchData\") String searchData);\n\n}", "public void loadServiceDetails(String mainService) {\n mProgress.setVisibility(View.VISIBLE);\n String centerId = mCentreId;\n CentralApis.getInstance().getBookingAPIS().loadMyService(centerId, mainService, PrefsWrapper.with(getActivity()).getString(JullayConstants.KEY_USER_TOKEN, \"\")).enqueue(new retrofit2.Callback<MyServiceResponse>() {\n @Override\n public void onResponse(Call<MyServiceResponse> call, Response<MyServiceResponse> response) {\n if (response.isSuccessful()) {\n mProgress.setVisibility(View.GONE);\n serviceResponses.clear();\n servicesData.clear();\n if (response.body().getData().size() == 0 || response.body().getData().isEmpty()) {\n Toast.makeText(getContext(), \"There is no data..\", Toast.LENGTH_LONG).show();\n } else {\n serviceResponses.addAll(response.body().getData());\n servicesData.addAll(response.body().getData());\n servicesAdapter.notifyDataSetChanged();\n BookingSingleton.getInstance().setServiceResponses(serviceResponses);\n\n if (servIDs.size() != 0) {\n for (int i = 0; i < serviceResponses.size(); i++) {\n if (servIDs.contains(serviceResponses.get(i).getId())) {\n //if this exists -- then mar it as selected\n serviceResponses.get(i).setSelected(true);\n\n }\n }\n\n }\n }\n } else {\n mProgress.setVisibility(View.GONE);\n try {\n JSONObject jObjError = new JSONObject(response.errorBody().string());\n if (jObjError.getString(\"message\").contains(\"Unauthorized\")) {\n CommonUtility.autoLogin(getActivity());\n } else {\n CommonUtility.showErrorAlert(getActivity(), jObjError.getString(\"message\"));\n }\n } catch (Exception e) {\n CommonUtility.showErrorAlert(getContext(), e.getMessage());\n\n }\n }\n }\n\n @Override\n public void onFailure(Call<MyServiceResponse> call, Throwable t) {\n mProgress.setVisibility(View.GONE);\n CommonUtility.showErrorAlert(getContext(), getString(R.string.network_error_text));\n }\n });\n }", "public APIClient() {\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n // Build base url\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .addCallAdapterFactory(RxJava3CallAdapterFactory.create())\n .build();\n }", "public interface Service {\n @GET(Constants.URL_GET_USER)\n Call<JsonObject> getDataUser();\n\n}", "public interface ApiService {\n\n @GET(HttpConstant.GET_URL)\n Observable<HttpResBaseBean<List<UrlBean>>> getURL();\n\n @FormUrlEncoded\n @POST(HttpConstant.USER_LOGIN)\n Observable<HttpResBaseBean<LoginResBean>> userLogin(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.GET_CODE)\n Observable<HttpResBaseBean<String>> getVCode(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.GET_ROOM_PIC)\n Observable<HttpResBaseBean<RoomStatusBean>> getRoomStatus(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.CHECK_IN)\n Observable<HttpResBaseBean<String>> commitCheckInMsg(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.GET_CUST_LIST)\n Observable<HttpResBaseBean<CustomerBean>> getCustomerList(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.GET_FACE)\n Observable<HttpResBaseBean<ComparedFaceBean>> getGetFace(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.CHEC_KOUT)\n Observable<HttpResBaseBean<String>> checkOut(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.GET_ROOM_INFO)\n Observable<HttpResBaseBean<RoomDetialBean>> getRoomDetial(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.USER_LOG_OFF)\n Observable<HttpResBaseBean<String>> getExit(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.GET_STORE_LIST)\n Observable<HttpResBaseBean<HotelBean>> getHotelList(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.GET_NATION_LIST)\n Observable<HttpResBaseBean<List<NationBean>>> getNationList(@FieldMap Map<String, String> a);\n\n @FormUrlEncoded\n @POST(HttpConstant.USE_CENTER)\n Observable<HttpResBaseBean<PersonBean>> getPersonInfo(@FieldMap Map<String, String> a);\n\n\n}", "public interface BaseRequstBody {\n\n @GET(\"/product/getCarts\")\n Observable<HomeBean> requstAllData();\n\n\n @POST(\"product/updateCarts/\")\n @FormUrlEncoded\n Observable<HomeBean> UpDataData(@FieldMap HashMap<String,String> parms);\n\n\n}", "public CastRemote(){\n final Retrofit retrofit = new Retrofit.Builder()\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .baseUrl(Constants.BASE_URL)\n .client(createClient())\n .build();\n service = retrofit.create(CastService.class);\n }", "public interface TKService {\n\n @POST(\"/user/jar/v1/login\")\n Call<Login> loginUser(@Body LoginCredentials data);\n\n @GET(\"/employee/jar/v1/{compID}\")\n Call<Employee> getAllEmployees(@Path(\"compID\") int id);\n\n /*@FormUrlEncoded\n @POST(\"/employee/jar/v1/sync/dtr/{compID}\")\n Call<BasicResponse> sendDTR(\n @Path(\"compID\") int id,\n @Field(\"start_date\") String sd,\n @Field(\"end_date\") String ed,\n @Field(\"branch_id\") int bid,\n @Field(\"company_id\") int cid,\n @Field(\"user_id\") int uid,\n @Field(\"dtr\") DTRSyncList list);*/\n\n @POST(\"/employee/jar/v1/sync/dtr/{compID}\")\n Call<BasicResponse> submitDTR(@Path(\"compID\") int id, @Body DTRSync data);\n\n @FormUrlEncoded\n @POST(\"/employee/jar/v1/sync/dtr/{compID}\")\n Call<BasicResponse> sendDTR(\n @Path(\"compID\") int id,\n @Field(\"branch_id\") int bid,\n @Field(\"user_id\") int uid,\n @Field(\"start_date\") String date,\n @Field(\"emp_id\") String barcode,\n @Field(\"time_in\") String timeIn,\n @Field(\"time_out\") String timeOut,\n @Field(\"lunch_in\") String lunchIn,\n @Field(\"lunch_out\") String lunchOut,\n @Field(\"img_url\") String imgUrl);\n}", "public interface TravelApiService {\n @GET(\"api/users/{userCode}/travels\")\n Call<List<Travel>> getTravel(@Path(value = \"userCode\") String userCode);\n\n @POST(\"api/users/{userCode}/travels\")\n Call<PostTravelGsonResponce> postTravel(@Path(value = \"userCode\") String userCode, @Field(\"travel_date\") String travelDate, @Field(\"latitude\") Double latitude, @Field(\"longitude\") Double longitude, @Field(\"area_name\") String areaName, @Field(\"contry_name\") String countryName, @Field(\"token\") String token);\n}", "void getData() {\n api = retrofitClient.getClient().create(API.class);\n //Defining the method\n api.getBuys().enqueue(new Callback<Data>() {\n @Override\n public void onResponse(Call<Data> call, Response<Data> response) {\n if (response.isSuccessful()) {\n Data data = response.body();\n buyList = data.getData();\n adapterView = new Adapter_sp(getActivity(), buyList);\n rv.setAdapter(adapterView);\n }\n }\n\n @Override\n public void onFailure(Call<Data> call, Throwable t) {\n Log.d(\"loi\",t.toString());\n\n }\n });\n\n\n }", "public interface TravelsService {\n\n /**\n * Get data list.\n *\n * @param query default \"\"\n * @param page default 1\n * @return\n * @throws Exception\n */\n @GET(App.SUFFIX_URL_TRAVELS)\n Call<TravelsMapObject> getData(@Query(\"query\") String query, @Query(\"page\") Integer page) throws Exception;\n\n}", "public void refreshDatas(GsonNews requestNews){\n if (newsItems != null){\n Log.e(\"xx\", \"suaxinshuju\");\n// newsItems.setAdapter(newsAdapter);\n newsAdapter.setItems(requestNews.getData());\n// newsAdapter.notifyDataSetChanged();\n }\n }", "@Override\n protected void onDataChanged() {\n }", "public interface RokyInfoService {\n\n @FormUrlEncoded\n @POST(\"SpiritServiceApp/v1/send/singleEbike\")\n Call<ResponseBody> singleEbike(@Field(\"ueSn\") String ueSn, @Field(\"data\") String data);\n\n @GET(\"SpiritServiceApp/v1/devices\")\n Call<DevicesMsg> devices(@Query(\"ue_sn_array\") String ueSnArray);\n\n\n @GET(\"SpiritServiceApp/stock/ccus\")\n Call<DevicesMsg> ccus(@Query(\"maxId\") String maxId);\n\n}", "public interface LifeService {\n\n String URL = \"http://www.life.borombo.com/\";\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(LifeService.URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n LifeService service = retrofit.create(LifeService.class);\n\n @GET(\"/wp-json/wp/v2/posts\")\n Call<List<Post>> listPosts();\n\n @GET(\"/wp-json/wp/v2/users/{user}\")\n Call<User> getAuthor(@Path(\"user\") int user);\n\n @GET(\"/wp-json/wp/v2/media/{media}\")\n Call<Media> getMedia(@Path(\"media\") int media);\n\n @GET(\"/wp-json/wp/v2/categories/{categorie}\")\n Call<Categorie> getCategorie(@Path(\"categorie\") int categorie);\n\n @GET(\"/wp-json/wp/v2/tags/{tag}\")\n Call<Tag> getTag(@Path(\"tag\") int tag);\n}", "public interface DataService {\n @GET(\"getdata.php\")\n Call<List<Hocsinh>> Getdata();\n\n @FormUrlEncoded\n @POST(\"insertdata.php\")\n Call<String> Insertdata(@Field(\"tenhocsinh\") String ten\n ,@Field(\"namsinh\") String namsinh\n ,@Field(\"diachi\") String diachi);\n\n @FormUrlEncoded\n @POST(\"delete.php\")\n Call<String> Deletedata(@Field(\"id\") String id);\n\n @FormUrlEncoded\n @POST(\"update.php\")\n Call<String> Update(@Field(\"ten\") String ten\n ,@Field(\"diachi\") String diachi\n ,@Field(\"namsinh\") String namsinh\n ,@Field(\"id\") String id);\n}", "public ShopListService(@NonNull final Activity activity) {\n requestQueue = Volley.newRequestQueue(activity.getApplicationContext());\n }", "public interface TodoListRestService {\n\n @GET(\"api/todo/lists\")\n Single<List<TodoListHeader>> getAllListDetails(@Query(\"context\") String context);\n\n @GET(\"api/todo/lists/{key}\")\n Single<TodoListDetails> getListDetails(@Path(\"key\") String key, @Query(\"context\") String context);\n\n @GET(\"api/todo/instances\")\n Single<List<TodoListInstanceHeaderDto>> getAllInstances(@Query(\"context\") String context);\n\n @GET(\"api/todo/instances/{id}\")\n Single<TodoListInstanceDto> getInstance(@Path(\"id\") UUID id);\n\n @PUT(\"api/todo/instances\")\n Single<UUID> startInstance(@Query(\"key\") String listKey, @Query(\"context\") String contextDomain, @Query(\"device\") DeviceId device, @Body Object context);\n\n @PUT(\"api/todo/instances/{id}/{step}/{state}\")\n Single<Integer> confirmStep(@Path(\"id\") UUID id, @Path(\"step\") int step, @Path(\"state\") boolean state, @Query(\"device\") DeviceId device);\n\n @DELETE(\"api/todo/instances/{id}\")\n Single<Boolean> closeInstance(@Path(\"id\") UUID id, @Query(\"device\") DeviceId device);\n}", "public interface Service {\n\n //String BASE_URL=\"https://newsapi.org/\";\n\n @GET(\"v2/everything?sortBy=popularity&apiKey=39dccf90039941938d17156338e5b9f8\")\n Call<Result> getNews(@Query(\"q\")String query, @Query(\"from\")String from, @Query(\"page\")int page,@Query(\"sources\")String orderBy);\n\n}", "public UpdateMarkerService() {\n super(\"UpdateMarkerService\");\n }", "public interface ApiService {\n\n @GET(\"products.json\")\n Call<Product> loadProduct();\n\n}", "public interface RetroiftService {\n @GET(\"catalog\")\n Call<CgBaseEntity> getCategories(@Query(\"key\") String key);\n\n @FormUrlEncoded\n @POST(\"query\")\n Call<BookBaseEntity> getBookList(@Field(\"catalog_id\") String id, @Field(\"pn\") String\n pn, @Field(\"rn\") String rn, @Field(\"key\") String key);\n\n}", "@Override\r\n\t\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\t\tlistonResponse(arg0);\r\n\t\t\t\t\t\trefreshView.onRefreshComplete();\r\n\t\t\t\t\t}", "public interface NewsWebService {\n\n\n @GET(\"v1/banner/2\")\n Call<ResponseBody> getBanner();\n\n @POST(\"v1/news/all\")\n Call<ResponseBody> getNews(@Body RequestBody body);\n\n @GET(\"v1/news/{newsId}\")\n Call<ResponseBody> getNewsDetail(@Path(\"newsId\") Long newsId);\n\n}", "public interface ApiServer {\n//\n @GET(\"umIPmfS6c83237d9c70c7c9510c9b0f97171a308d13b611?uri=homepage\")\n Observable<HomeBean> getHome();\n @POST\n Observable<Login> getDengLu(@Url String name, @QueryMap Map<String, String> paw);\n @GET(\"product/getCatagory\")\n Observable<Sort_lift> lift();\n @GET\n Observable<Sort_right> right(@Url String s);\n @GET\n Observable<Commodity_pagingBean> xia(@Url String s);\n @GET\n Observable<detailsBean> spxq(@Url String ss);\n @GET\n Observable<AddcartBean> add(@Url String s);\n @GET\n Observable<QurryBean> qurry(@Url String s);\n @GET\n Observable<AddcartBean> delete(@Url String s);\n @GET\n Observable<AddcartBean> addDd(@Url String s);\n @GET\n Observable<OrderBean> Ddlb(@Url String s);\n\n\n\n\n\n\n}", "public interface APIService {\n\n\t@POST(Configs.ApiConfig.VIDEO_LINK)\n\tObservable<BaseResponse> getAllVedioBy(@Body boolean once_no);\n}", "public interface WebService {\n\n\t@Multipart\n\t@POST(\"/api/upload/images\")\n\tpublic void uploadImage(@Part(\"imageType\") TypedFile imgToPost,\n\t\t\tCallback<SignUpEntity> callback);\n\n\t@PUT(\"/api/userrecipes\")\n\tpublic void getAllRecipes(@Header(\"basic userid\") String token,\n\t\t\t@Body UserRecipesObject userRecipesObject,\n\t\t\tCallbackRetrofit<User> callback);\n\n\t\n\t\n\t@PUT(\"/api/UserRecipes\")\n\tpublic void getUserRecipes(@Header(\"Authorization\") String base64encodedValue,\n\t\t\t@Field(\"userId\") int userId, CallbackRetrofit<User> callback);\n\n\t\n\t@GET(\"/api/userrecipes/for/{userId}\")\n\tpublic void getRecipesForMyDrinks(\n\t\t\t@EncodedPath(\"userId\") int userId,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<ArrayList<DiscoverDrinkResponse>> callback);\n\t\n\t\n\t\n\t@POST(\"/api/recipes/{id}/fav\")\n\tpublic void markFavourite(\n\t\t\t@EncodedPath(\"id\") int id,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<FavoriteObject> callback);\n\t\n\t\n\t\n\t@GET(\"/api/userrecipes\")\n\tpublic void searchRecipies(@Query(\"recipeId\") int recipeId,\n\t\t\t@Query(\"count\") int count, @Query(\"searchText\") String searchText,\n\t\t\tCallbackRetrofit<FavoriteObject> callback);\n\t\n\t\n\t@POST(\"/api/recipes/{id}/like\")\n\tpublic void markLike(\n\t\t\t@EncodedPath(\"id\") int id,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<LikeObject> callback);\n\t\n\t@POST(\"/api/recipes/{id}/unlike\")\n\tpublic void markUnLike(\n\t\t\t@EncodedPath(\"id\") int id,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<LikeObject> callback);\n\t\n\t\n\t\n\t@DELETE(\"/api/userrecipes/{recipeId}\")\n\tpublic void deleteRecipes(\n\t\t\t@EncodedPath(\"recipeId\") int recipeId,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<User> callback);\n\t\n\t\n\t\n\n\t@GET(\"/api/recipes\")\n\tpublic void getRecipesForPremium(@Query(\"recipeId\") int recipeId,\n\t\t\t@Query(\"count\") int count, @Query(\"since\") Double since,\n\t\t\tCallbackRetrofit<ArrayList<DiscoverDrinkResponse>> callback);\n\t\n\t\n\t\n\n\t@POST(\"/api/users/forgotpassword\")\n\tpublic void forgotPassword(\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\t@Body LoginObject userObject,\n\t\t\tCallbackRetrofit<User> callback);\n\t\n\t@POST(\"/api/users/forgotpassword\")\n\tpublic void forgotPassword(\n\t\t\t@Body LoginObject userObject,\n\t\t\tCallbackRetrofit<User> callback);\n\t\n\n\t@POST(\"/api/users/login\")\n\tpublic void loginUser(@Header(\"application\") String header,\n\t\t\t@Body LoginObject userObject, CallbackRetrofit<User> callback);\n\n\t@PUT(\"/api/users/register\")\n\tpublic void registerUser(@Header(\"application\") String header,\n\t\t\t@Body SignUpEntity registerObject, CallbackRetrofit<User> callback);\n\t\n\t\n\t\n\t@POST(\"/api/users/login/fb\")\n\tpublic void loginUserByFacebook(@Header(\"application\") String header,\n\t\t\t@Body Facebook userObject, CallbackRetrofit<User> callback);\n\t\n\n}", "public interface AlbumService {\r\n\r\n /**\r\n * Asynchronously returns detailed information about a given album, including its tracks.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param albumId\r\n * the ID of the album to load\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/albums/{albumId}\")\r\n void getAlbum( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"albumId\") String albumId, //\r\n Callback<AlbumData> callBack);\r\n\r\n /**\r\n * Returns a list of new releases, curated by Rhapsody. This list can be personalized for the user by passing the\r\n * <code>userId</code>. The personalization is made by Rhapsody based upon recent listening history.\r\n *\r\n * <p>\r\n * <i>Hint:</i> The <code>userId</code> is the {@link AccountData#id}.\r\n * </p>\r\n *\r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param userId\r\n * the user ID to get personalized new releases, if <code>null</code>no personalization is made\r\n * @param limit\r\n * the number of releases which are loaded, if <code>null</code> the servers default value is used\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/albums/new\")\r\n void getNewReleases( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Query(\"guid\") String userId, //\r\n @Query(\"limit\") Integer limit, //\r\n Callback<Collection<AlbumData>> callBack);\r\n\r\n /**\r\n * Synchronously returns detailed information about a given album, including its tracks.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param albumId\r\n * the ID of the album to load\r\n * @return the {@link AlbumData}\r\n */\r\n @GET(\"/v1/albums/{albumId}\")\r\n AlbumData getAlbum( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"albumId\") String albumId);\r\n}", "private void refreshRecyclerView() {\n adapter = new AppWrapperAdapter(appList,\n new AppWrapperAdapter.FeedInteractionListener() {\n @Override\n public void onAppClicked(AppWrapper app, int index) {\n // TODO\n }\n });\n recyclerView.setAdapter(adapter);\n }", "public interface GenreService {\r\n\r\n /**\r\n * Returns a hierarchical map of all genres and subgenres.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres\")\r\n void getGenres( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n Callback<Collection<GenreData>> callBack);\r\n\r\n /**\r\n * Returns a list of all new releases by genre.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param genreId\r\n * the ID of the genre to load new releases\r\n * @param limit\r\n * the number of releases which are loaded, if <code>null</code> the servers default value is used\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres/{genreId}/albums/new\")\r\n void getNewReleases( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"genreId\") String genreId, //\r\n @Query(\"limit\") Integer limit, //\r\n Callback<Collection<AlbumData>> callBack);\r\n}", "private Api() {\n // Implement a method to build your retrofit\n buildRetrofit(BASE_URL);\n }", "public interface GrabTicketQueryService {\n\n\n /**\n * 抢票查询\n * @param method\n * @param train_date\n * @param from_station\n * @param to_station\n * @return\n */\n JSONObject grabTicketQuery(String uid, String partnerid, String method, String from_station, String to_station, String from_station_name, String to_station_name, String train_date, String purpose_codes);\n// JSONObject grabTicketQuery(String partnerid, String method, String from_station, String to_station, String train_date, String purpose_codes);\n}", "public interface RestService {\n\n @POST(\"/ComenziRestaurant/task3\")\n public void sendComanda(@Body Comanda comanda, Callback<Integer> callback);\n\n @GET(\"/ComenziRestaurant/task1\")\n public void getProduse(Callback<Collection<Produs>> callback);\n\n @GET(\"/ComenziRestaurant/task2\")\n public void getMese(Callback<Collection<Masa>> callback);\n\n\n\n\n}", "public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}", "public interface UpdateQuestionService {\n public static final String BASE_URL= \"https://private-anon-74261c4c7e-blissrecruitmentapi.apiary-mock.com/\";\n @PUT(\"questions/{id}\")\n Call<Question> updateQuestion(@Path(\"id\") int bookId, @Body Question question);\n\n}", "@Override\n public void onDataChanged() {\n\n }", "public interface DeliveryService {\n\n /**\n * Get List of deliveries\n * @param limit\n * @param offset\n * @return\n */\n @GET(\"deliveries\")\n Call<List<Delivery>> getDeliveries(@Query(\"limit\") int limit, @Query(\"offset\") int offset);\n}", "public interface OrderStatusChangeApi {\n\n @FormUrlEncoded\n @POST(Urls.SUB_URL_ADMIN_CHANGE_STATUS)\n Call<ChangeStatusData> requestOrderStatusChange(@Field(\"access_token\") String access_token, @Field(\"order_id\") String order_id\n , @Field(\"cancel\") boolean type);\n\n @GET(Urls.SUB_URL_ADMIN_CHANGE_TOTAL)\n Call<ChangeTotalData> requestOrderChangeTotal(@Query(\"access_token\") String access_token, @Query(\"order_id\") String order_id\n , @Query(\"total_new\") String new_total);\n\n}", "public interface ServiceEpisodeListNo {\n\n @GET(ConstantServices.SER_NAME_EDPISODE_LIST)\n Call<List<Episode>> respN(@Query(ConstantServices.SPECIALS) String specials);\n}", "public interface GetRecommendService {\n @FormUrlEncoded\n @POST(Urls.GET_RECOMMEND)\n Observable<BaseApiModel<RecommendListBean>> getOrderInfo(@FieldMap Map<String,String> requestMap);\n}", "public interface ApiService {\n\n @GET(\"/api/v1/rates/daily/\")\n Call<List<ExchangeRate>> getTodayExchangeRates();\n\n}", "public interface UdonShopApi {\n @GET(\"/RestSearchAPI/20150630/\")\n public Observable<UdonShopEntity> getUdonShops(@Query(\"keyid\") final String keyid,\n @Query(\"format\") final String format,\n @Query(\"category_l\") final String category_l,\n @Query(\"category_s\") final String category_s,\n @Query(\"input_coordinates_mode\") final String input_coordinates_mode,\n @Query(\"latitude\") final String latitude,\n @Query(\"longitude\") final String longitude,\n @Query(\"range\") final String range,\n @Query(\"hit_per_page\") final String hit_per_page);\n\n}", "public interface IHomeItemDataListener {\n// http://api.mglife.me/v2/home/0?offset=0&limit=20\n\n @GET(\"v2/home/{index}?\")\n Call<HomeItemBean> getHomeItemData(@Path(\"index\") String index, @Query(\"offset\") String offset, @Query(\"limit\") String limit);\n}", "public interface ApiService {\n String interfaceVersion = \"\";//接口版本号\n\n /**\n * post请求\n * 服务端json格式数据请求\n * 处理普通接口网络请求\n *\n * @param interfaceName 接口名称\n * @param maps 请求体参数键值对\n * @return Rx Ovserable\n * @author fjg\n */\n @FormUrlEncoded\n @POST(\"{interface}\")\n Observable<NetResponse> post(\n @Path(value = \"interface\", encoded = true) String interfaceName,\n @FieldMap Map<String, String> maps);\n\n /**\n * get请求\n * 服务端json格式数据请求\n * 处理普通接口网络请求\n *\n * @param interfaceName 接口名称\n * @param maps 请求体参数键值对\n * @return Rx Ovserable\n * @author fjg\n */\n @GET(\"{interface}\")\n Observable<NetResponse> get(\n @Path(value = \"interface\", encoded = true) String interfaceName,\n @QueryMap Map<String, String> maps);\n}", "public interface RssService {\n\n @GET(\"/{id}\")\n Rss feed(@Path(\"id\") String id);\n\n\n}", "public interface RetrofitService{\n\n @GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();\n\n @GET(\"api/data/Android/10/1\")\n Observable<ArrayList<MeizhiModel>> getAndroidDate();\n}", "public interface FundService {\n\n String BASE_URL = \"http://fund.eastmoney.com/f10/\";\n\n @GET(\"F10DataApi.aspx\")\n Observable<GetFundResponse> api(@Query(\"type\") String type, @Query(\"code\") String code, @Query(\"page\") int page, @Query(\"per\") int per);\n}", "public void updateData() {}", "public interface RestService {\n\n @GET\n Call<String> get(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @FormUrlEncoded\n @POST\n Call<String> post(@Url String url, @FieldMap Map<String, Object> params);\n\n// @Multipart\n// @PUT\n// Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @PUT\n Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> delete(@Url String url, @HeaderMap Map<String, String> headers, @QueryMap Map<String, Object> params);\n\n @Streaming\n @GET\n Call<ResponseBody> download(@Url String url, @QueryMap Map<String, Object> params);\n\n @Multipart\n @POST\n Call<String> upload(@Url String url, @Part MultipartBody.Part file);\n\n// @GET\n// Call<SongSearchEntity> getSongSearchList(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<User> signIn(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<User> profile(@Url String url, @HeaderMap Map<String, String> headers);\n\n// @Multipart\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Part(\"id\") RequestBody id, @Part(\"key\") RequestBody key, @Part(\"value\") RequestBody value);\n//\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @GET\n Call<SongListEntity> musicbillList(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<SongListDetailEntity> musicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> createMusicbill(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> deleteMusicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> addMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> updateMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @DELETE\n Call<String> deleteMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<SongSearchEntity> getMusic(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<LyricEntity> getLyric(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<String> getSinger(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<ZhiliaoEntity> getVerify(@Url String url, @HeaderMap Map<String, String> headers);\n}", "public void refresh(View view) {\n Intent intent = new Intent(this, RSSService.class);\n intent.putExtra(\"RSS_URL\", url);\n startService(intent);\n\n }", "@Override\n protected void loadData() {\n setUpLoadingViewVisibility(true);\n callImageList = RetrofitGenerator.createService(ApiService.class)\n .getAllPubImage();\n callImageList.enqueue(callbackImageList);\n }", "public interface RetrofitTradeService {\n @FormUrlEncoded\n @POST(\"/api/trade/usertrades.json\")\n @ServiceMethod(\"userTrades\")\n Observable<DefResponse<List<PurchaseHistoryModel>>> userTrades(@Field(\"page\") int page);\n\n @FormUrlEncoded\n @POST(\"/api/butlerservice/info.json\")\n @ServiceMethod(\"butlerserviceInfo\")\n Observable<DefResponse<ButlerserviceInfo>> butlerserviceInfo(@Field(\"serviceNo\") String serviceNo);\n\n @FormUrlEncoded\n @POST(\"/api/butlerservice/pay.json\")\n @ServiceMethod(\"butlerservicePay\")\n Observable<DefResponse<PayInfo>> butlerservicePay(@Field(\"serviceNo\") String serviceNo, @Field(\"payType\") int payType, @Field(\"payPassword\") String payPassword);\n}", "public interface DataService {\n\n @GET(\"{type}\")\n Observable<Response<ResponseBody>> getMessageData(@Path(\"type\") String owner\n , @Query(ApiConstant.NUM) int sum\n , @Query(ApiConstant.RAND) int rand\n , @Query(ApiConstant.KEY) String key);\n\n\n}", "@Override\n public void onDataUpdatedCb(Object response_data) {\n \n }", "public interface LooksoftMainApi {\n @GET(\"main\")\n Call<Data> loadData();\n}", "public interface MainService {\n @FormUrlEncoded\n @POST(Constants.Url.LOOKUP_STEAMID)\n Call<ResponseBody> lookupSteamId(@Field(Constants.Key.ID) String id);\n\n @POST(Constants.Url.REQUEST_FETCH)\n Call<BaseResponse> requestFetch(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n @GET(Constants.Url.GET_PROFILE)\n Call<Profile> getProfile(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n @GET(Constants.Url.GET_FRIENDS)\n Call<ArrayList<Profile>> getFriends(@Path(Constants.Key.STEAM_ID_64) String steamId64);\n\n\n\n //Factory\n class Factory {\n public static MainService create() {\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n OkHttpClient client = httpClient\n .connectTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .addInterceptor(interceptor)\n .build();\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(Constants.Url.DOMAIN)\n .addConverterFactory(GsonConverterFactory.create())\n .client(client)\n .build();\n return retrofit.create(MainService.class);\n }\n }\n}", "public ReceiveAlarmService() {\n gson = new GsonBuilder().setPrettyPrinting().create();\n database = new DBConnection();\n }", "public interface APIService {\n\n String baseUrl = \"http://api.zhuishushenqi.com\";\n\n /**\n */\n// @FormUrlEncoded\n// @POST(\"/cats/lv2/statistics/\")\n// Flowable<GetListRsp> login(@Field(\"username\") String username,\n// @Field(\"password\") String password);\n\n /**\n * GetListRsp\n */\n @GET(\"/cats/lv2/statistics/\")\n Observable<GetListRsp> login(@QueryMap Map<String, String> params);\n}", "public interface CommentService {\n\n @Headers({\n \"User-Agent: Mobile-Android\",\n \"Content-Type:application/json\"\n })\n\n @GET(ServiceUtils.COMMENTBYID)\n Call<List<Comment>> getCommentPost(@Path(\"id\") int id);\n\n @GET(ServiceUtils.COMMENTID)\n Call<Comment> getCommentId(@Path(\"id\") int id);\n\n @GET(ServiceUtils.SORTCOMMENT)\n Call<List<Comment>> sortComment();\n\n @GET(ServiceUtils.SORTCOMMENTBYLIKE)\n Call<List<Comment>> sortCommentByLike();\n\n @POST(ServiceUtils.ADDCOMMENT)\n Call<Comment> addComment(@Body Comment comment);\n\n @DELETE(ServiceUtils.DELETECOMMENT)\n Call<Comment> deleteComment(@Path(\"id\") Integer id);\n\n @PUT(ServiceUtils.LIKEDISLIKECOMMENT)\n Call<Comment> likeDislike(@Body Comment comment, @Path(\"id\") int id);\n\n @PUT(ServiceUtils.UPDATECOMMENT)\n Call<Comment> updateComment(@Body Comment comment, @Path(\"id\") int id);\n}", "@Override\n\t\tpublic void onRefresh() {\n\t\t\thttpRefreshMethod();\n\t\t}" ]
[ "0.6443528", "0.6254139", "0.606724", "0.6045872", "0.6039221", "0.59790444", "0.59449935", "0.5923134", "0.59206206", "0.5902319", "0.5890093", "0.58891463", "0.5861927", "0.58282036", "0.58261067", "0.58220303", "0.5805344", "0.57864", "0.57401377", "0.572173", "0.5712958", "0.5704438", "0.56912374", "0.56850886", "0.5684797", "0.5684459", "0.56806505", "0.566321", "0.5661974", "0.5661503", "0.56543094", "0.56514895", "0.5637513", "0.5636288", "0.56356114", "0.56290406", "0.56200266", "0.5616555", "0.5615278", "0.56133246", "0.56001043", "0.55969435", "0.5589684", "0.55896163", "0.5588518", "0.558575", "0.55787414", "0.5578032", "0.55607486", "0.55518633", "0.5546413", "0.5546198", "0.55405897", "0.5537319", "0.5528249", "0.5525388", "0.55236804", "0.5512555", "0.5512193", "0.5501417", "0.5496922", "0.54928535", "0.5491698", "0.5479712", "0.54779387", "0.5477794", "0.54726267", "0.54723567", "0.546537", "0.54544693", "0.5448661", "0.5443564", "0.5435442", "0.5435074", "0.5426036", "0.54226744", "0.54218876", "0.5421292", "0.5417082", "0.5414099", "0.54126334", "0.54122585", "0.5411813", "0.54111433", "0.5408145", "0.5403201", "0.53997517", "0.5398599", "0.5397169", "0.5395028", "0.5392701", "0.539231", "0.5390507", "0.5385683", "0.53837734", "0.5382195", "0.5382192", "0.537964", "0.53777474", "0.53762764" ]
0.55182433
57
inflates the row layout from xml when needed
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { // DeparturesRowBinding binding = DeparturesRowBinding.inflate(mInflater,R.layout.departures_row, parent, false); DeparturesRowBinding binding = DataBindingUtil.inflate(mInflater, R.layout.departures_row, parent, false); return new ViewHolder(binding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void inflateTextLayout(View row, BeadInfo beadInfo) {\n\t\tTextView colorCodeTV = (TextView) row.findViewById(R.id.colorNumber);\n\t\tif (colorCodeTV != null){\n\t\t\tString colorCode = beadInfo.getColorCode();\n\t\t\tif (colorCode != null){\n\t\t\t\tcolorCodeTV.setText(colorCode);\n\t\t\t}\n\t\t}\n\t\tLocation loc = beadInfo.getLocation(); \n\t\tif (loc != null){\n\t\t\tString wing = loc.getWing();\n\t\t\tString locRow = String.valueOf(loc.getRow());\n\t\t\tString locCol = String.valueOf(loc.getCol());\n\t\t\tString quantity = String.valueOf(beadInfo.getQuantity());\n\n\t\t\tTextView wingTV = (TextView) row.findViewById(R.id.beadLocationWing);\n\t\t\tif (wingTV != null){\n\t\t\t\twingTV.setText(wing);\n\t\t\t}\n\t\t\tTextView locRowTV = (TextView) row.findViewById(R.id.beadLocationRow);\n\t\t\tif (locRowTV != null){\n\t\t\t\tlocRowTV.setText(locRow);\n\t\t\t}\n\t\t\tTextView locColTV = (TextView) row.findViewById(R.id.beadLocationColumn);\n\t\t\tif (locColTV != null){\n\t\t\t\tlocColTV.setText(locCol);\n\t\t\t}\n\t\t\tTextView quantityTV = (TextView) row.findViewById(R.id.beadQuantity);\n\t\t\tif (quantityTV != null){\n\t\t\t\tquantityTV.setText(quantity);\n\t\t\t}\n\n\n\n\t\t}\n\n\t\t\n\t}", "public void onFinishInflate() {\n AppMethodBeat.i(103009);\n if (getChildCount() > 0) {\n View childAt = getChildAt(0);\n if (!(childAt instanceof RadarSpecialTableLayout)) {\n childAt = null;\n }\n this.pCL = (RadarSpecialTableLayout) childAt;\n }\n AppMethodBeat.o(103009);\n }", "private void inflateThumbnailLayout(View row, BeadInfo beadInfo) {\n\t\tTextView colorCodeTV = (TextView) row.findViewById(R.id.colorNumber);\n\t\tif (colorCodeTV != null){\n\t\t\tString colorCode = beadInfo.getColorCode();\n\t\t\tif (colorCode != null){\n\t\t\t\tcolorCodeTV.setText(colorCode);\n\t\t\t\timageInserter = new BitmapInserter();\n\t\t\t\timageInserter.setLocation((ImageView) row.findViewById(R.id.beadIconColumn));\n\t\t\t\timageInserter.setStorage(new File(APPFOLDER, IMAGEFOLDER));\n\t\t\t\timageInserter.execute(colorCode);\n\t\t\t}\n\t\t}\n\t}", "private void inflateView() {\n\t\tLog.v(T, \"inflateView\");\n\t\tif (!isInEditMode()) {\n\t\t\tString inflaterService = Context.LAYOUT_INFLATER_SERVICE;\n\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) getContext()\n\t\t\t\t\t.getSystemService(inflaterService);\n\t\t\tlayoutInflater.inflate(R.layout.dms_coordinate, this, true);\n\n\t\t\t// Get child control references\n\t\t\teditDegrees = (EditText) findViewById(R.id.editDegrees);\n\t\t\teditMinutes = (EditText) findViewById(R.id.editMinutes);\n\t\t\teditSeconds = (EditText) findViewById(R.id.editSeconds);\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.custom_row, container, false);\n recyclerView = (RecyclerView) layout.findViewById(R.id.rv);\n adapter = new WebCrawlerRecyclerViewAdapter(getActivity(), getData());\n recyclerView.setAdapter(adapter);\n LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView.setLayoutManager(layoutManager);\n return layout;\n\n }", "protected View inflateRow(ViewHolder holder){\n View row = null;\n switch (type)\n {\n case TYPE_TEXT_USER:\n row = inflater.inflate(textUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_TEXT_FRIEND:\n\n row = inflater.inflate(textFriendRowResId, null);\n\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_IMAGE_USER:\n row = inflater.inflate(imageUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_IMAGE_FRIEND:\n row = inflater.inflate(imageFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n break;\n\n case TYPE_LOCATION_USER:\n row = inflater.inflate(locationUserResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_LOCATION_FRIEND:\n row = inflater.inflate(locationFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n }\n\n return row;\n }", "private void getRows() {\n int count = metroTileView.getChildCount();\n for (int i=0; i<count; i++) {\n LinearLayout layout = (LinearLayout) metroTileView.getChildAt(i);\n rows.add(layout);\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.layout_true_false_row, container, false);\n }", "@Override\n\tpublic View getView(final int position, View row, ViewGroup parent) {\n\t\tif (row == null) {\n\t\t\tLayoutInflater inflater = context.getLayoutInflater();\n\t\t\trow = inflater.inflate(LayoutId, parent, false);\n\t\t}\n\n\t\treturn row;\n\t}", "@Override\n public void initialiseUiRows() {\n }", "protected static XmlElement getRowXml(XmlElement xml)\n {\n XmlElement xmlTemp = xml;\n while (xmlTemp.getElement(TAG_ROW) == null)\n {\n xmlTemp = xmlTemp.getParent();\n if (xmlTemp == null)\n {\n return null;\n }\n }\n return xmlTemp.getElement(TAG_ROW);\n }", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "private View initView(int position, View convertView, ViewGroup parent) {\n View row = convertView;\n if (row == null) {\n LayoutInflater inflater = ((Activity) context).getLayoutInflater();\n row = inflater.inflate(resourceId, parent, false);\n }\n Scenario record = getItem(position);\n if (record != null) {\n TextView scenarioId = (TextView) row.findViewById(R.id.rowScenarioId);\n TextView scenarioName = (TextView) row.findViewById(R.id.rowScenarioName);\n TextView scenarioFileName = (TextView) row.findViewById(R.id.rowScenarioFile);\n TextView scenarioMime = (TextView) row.findViewById(R.id.rowScenarioMime);\n\n if (scenarioId != null) {\n scenarioId.setText(Integer.toString(record.getScenarioId()));\n }\n if (scenarioName != null) {\n scenarioName.setText(record.getScenarioName());\n }\n if (scenarioFileName != null) {\n scenarioFileName.setText(record.getFileName());\n }\n if (scenarioMime != null) {\n scenarioMime.setText(record.getMimeType());\n }\n }\n return row;\n }", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tView view = inflater.inflate(R.layout.list_item_table_row_read, parent, false);\n\t\t\tSet<Entry<String, JsonElement>> set = mTableRows[position].getAsJsonObject().entrySet();\n\t\t\tLinearLayout layoutItem = (LinearLayout) view.findViewById(R.id.layoutItem);\n\t\t\t//Loop through each data item in the row and create a layout with the key and \n\t\t\t//value displayed in TextViews within it\n\t\t\tfor (Entry<String, JsonElement> entry : set) {\n\t\t\t\tLog.i(TAG, entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout rowLayout = new RelativeLayout(mContext);\n\t\t\t\tRelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\t\t\t\t\n\t\t\t\trowLayout.setLayoutParams(params);\t\t\t\t\n\t\t\t\tTextView lblKey = new TextView(mContext);\n\t\t\t\tlblKey.setText(entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams keyParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tkeyParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n\t\t\t\tkeyParams.leftMargin = 20;\n\t\t\t\tlblKey.setLayoutParams(keyParams);\t\t\t\t\n\t\t\t\tTextView lblValue = new TextView(mContext);\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams valueParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tvalueParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\t\t\t\tlblValue.setLayoutParams(valueParams);\n\t\t\t\t//Limit the amount of text we show so the UI isn't dirty\n\t\t\t\tInputFilter[] FilterArray = new InputFilter[1];\n\t\t\t\tFilterArray[0] = new InputFilter.LengthFilter(25);\n\t\t\t\tlblValue.setFilters(FilterArray);\n\t\t\t\tlblValue.setText(entry.getValue().getAsString());\n\t\t\t\tlblValue.setGravity(Gravity.RIGHT);\n\t\t\t\trowLayout.addView(lblKey);\n\t\t\t\trowLayout.addView(lblValue);\n\t\t\t\tlayoutItem.addView(rowLayout);\n\t\t\t}\t\t\t\n\t\t\treturn view;\n\t\t}", "@Override\n\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\tView row = (View) inflater.inflate(R.layout.list_row, arg2, false);\n\t\treturn row;\n\t}", "public void fillTheLayout() {\n for (int i = 0; i < ROW_COUNT; i++) {\n //these are horizontal linear layouts that will be part of the vertical linear layout, shown in XML\n LinearLayout sublinearLayout = new LinearLayout(this);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 1;\n\n sublinearLayout.setLayoutParams(layoutParams);\n //center align the contents\n sublinearLayout.setGravity(Gravity.CENTER);\n sublinearLayout.setPadding(PADDING, PADDING, PADDING, PADDING);\n\n for (int j = 0; j < COLUMN_COUNT; j++) {\n\n// Add the gifImageViews to the linear layout created above\n GifImageView gifImageView = new GifImageView(this);\n LinearLayout.LayoutParams imageViewlayoutParam = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n imageViewlayoutParam.weight = 1;\n\n gifImageView.setLayoutParams(imageViewlayoutParam);\n //this padding helps in showing the white boundaries\n gifImageView.setPadding(PADDING, PADDING, PADDING, PADDING);\n //Similar to storing in row-major form, used that logic to set id's\n gifImageView.setId(i * COLUMN_COUNT + j);\n //main activity implements the onClick\n gifImageView.setOnClickListener(this);\n Block block = new Block(gifImageView);\n block.display();\n arrayList.add(block);\n sublinearLayout.addView(gifImageView);\n\n }\n linearLayout.addView(sublinearLayout);\n }\n //change grid's color, after initialising the layout\n changeColor();\n }", "private void setUpLayout() {\n myLinearLayout=(LinearLayout)rootView.findViewById(R.id.container_wartaMingguan);\n\n // Add LayoutParams\n params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n params.setMargins(0, 10, 0, 0);\n\n // Param untuk deskripsi\n paramsDeskripsi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n paramsDeskripsi.setMargins(0, 0, 0, 0);\n\n tableParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);\n rowTableParams = new TableLayout.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n\n // Untuk tag \"warta\"\n LinearLayout rowLayout = new LinearLayout(getActivity());\n rowLayout.setOrientation(LinearLayout.HORIZONTAL);\n\n // Membuat linear layout vertical untuk menampung kata-kata\n LinearLayout colLayout = new LinearLayout(getActivity());\n colLayout.setOrientation(LinearLayout.VERTICAL);\n colLayout.setPadding(0, 5, 0, 0);\n }", "@Override\n public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n if (viewType == TYPE_ITEM) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_row,parent,false); //Inflating the layout\n\n ViewHolder vhItem = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhItem; // Returning the created object\n\n //inflate your layout and pass it to view holder\n\n } else if (viewType == TYPE_HEADER) {\n\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.header,parent,false); //Inflating the layout\n\n ViewHolder vhHeader = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhHeader; //returning the object created\n\n\n }\n return null;\n\n }", "public RowListaCustomAdapter ( Context c, ArrayList<Row>data){\n Log.v(TAG, \"Construir Adaptador\");\n this.data = data;\n inflater = LayoutInflater.from(c);\n\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n\n //'this' refers to the LinearLayout, cause we are currently in LinearLayout\n\n //access the day UI element\n mTextDate = (TextView) this.findViewById(R.id.tv_day);\n\n //access the month UI element\n mTextMonth = (TextView) this.findViewById(R.id.tv_month);\n\n //access the year UI element\n mTextYear = (TextView) this.findViewById(R.id.tv_year);\n\n //setOnTouchListener on the UI elements\n\n mTextDate.setOnTouchListener(this);\n mTextMonth.setOnTouchListener(this);\n mTextYear.setOnTouchListener(this);\n\n //get the current date from the Calendar\n int date = mCalendar.get(Calendar.DATE);\n\n //get current month\n int month = mCalendar.get(Calendar.MONTH);\n\n //get current year\n int year = mCalendar.get(Calendar.YEAR);\n\n //pass the date, month and year to update method which will update the UI\n update(date, month, year, 0, 0, 0);\n\n\n }", "com.google.monitoring.dashboard.v1.RowLayout getRowLayout();", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "public final void onFinishInflate() {\n super.onFinishInflate();\n TextView textView = (TextView) findViewById(C0126R.C0129id.title);\n this.f110062a = textView;\n C1280ps.m19893a(textView, \"excludeViewFromChangeBounds\");\n this.f110062a.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n TextView textView2 = (TextView) findViewById(C0126R.C0129id.subtitle);\n this.f110063b = textView2;\n textView2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout = (LinearLayout) findViewById(C0126R.C0129id.collapsed_image_container);\n this.f110064c = linearLayout;\n linearLayout.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout2 = (LinearLayout) findViewById(C0126R.C0129id.expanded_image_container);\n this.f110065d = linearLayout2;\n linearLayout2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n this.f110066e = (ImageView) findViewById(C0126R.C0129id.expand_collapse_icon);\n ImageWithCaptionView imageWithCaptionView = (ImageWithCaptionView) findViewById(C0126R.C0129id.tooltip_view);\n this.f110068g = imageWithCaptionView;\n imageWithCaptionView.setDefaultImageResId(bkfr.m105543a(getContext(), (int) ErrorInfo.TYPE_SDU_MEMORY_FULL, -1));\n this.f110068g.setOnClickListener(this);\n }", "protected abstract ReadCell<DataType> createItemCell(LayoutInflater inflater, View convertView, ViewGroup parent);", "private void inflateRV(String latlng) {\n GridLayoutManager layoutManager = new GridLayoutManager(this, 2);\n //StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL);\n rvRestaurant.setHasFixedSize(true);\n rvRestaurant.setLayoutManager(layoutManager);\n\n (new AsyncTaskGetJSON(HomeActivity.this, rvRestaurant)).execute(latlng);\n\n }", "@Override\n protected void onFinishInflate() {\n mRootView = getChildAt(0);\n super.onFinishInflate();\n }", "@Override\n public View getView(int position, View ConvertView, ViewGroup parent){ ///position starts from zero,one and goes on, parent would be the layout we want to display all elements\n View row=ConvertView; //to optimize we inflate the item only first else we recycle the view using converterView\n if(row==null) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n //**View of which we want to convert to java view object\n row = inflater.inflate(R.layout.single_row, parent, false);\n }\n //*****From row view we can access the view items and populate it data\n ImageView imageView = (ImageView)row.findViewById(R.id.imageView);\n TextView myDiscription=(TextView)row.findViewById(R.id.myDescription);\n TextView myTitle=(TextView)row.findViewById(R.id.mytitle);\n\n imageView.setImageResource(images[position]); //postion will incremented automaticlly as views will populate\n myDiscription.setText(description[position]);\n myTitle.setText(titles[position]);\n\n return row;\n }", "private View createDarkCell(){\n return LayoutInflater.from(this.context).inflate(R.layout.back, this.tableRoot, false);\n }", "private void prepareViews() {\n mTextViewHeader = (TextView) mHeaderView.findViewById(R.id.tv_text_header_enhanced_listview);\n mTextViewFooter = (TextView) mFooterView.findViewById(R.id.tv_text_footer_enhanced_listview);\n mTextViewTime = (TextView) mHeaderView.findViewById(R.id.tv_time_update_header);\n\n mArrowHeader = mHeaderView.findViewById(R.id.arrow_header);\n mArrowFooter = mFooterView.findViewById(R.id.arrow_footer);\n\n mPbHeader = mHeaderView.findViewById(R.id.pb_header_enhanced_listview);\n mPbFooter = mFooterView.findViewById(R.id.pb_footer_enhanced_listview);\n\n }", "public ViewGroup getRowLayout(View rowView) {\r\n LinearLayout rowLayout = mLayout.getContainerRowLayout();\r\n rowLayout.addView(rowView);\r\n return rowLayout;\r\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }", "private View getCustomView(int position, View convertView, ViewGroup parent) {\n\n /********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/\n View row = inflater.inflate(R.layout.spinner_item_white, parent, false);\n\n TextView tv_item_name = (TextView) row.findViewById(R.id.tv_item_name);\n// ImageView iv_spinner_icon = (ImageView) row.findViewById(R.id.iv_spinner_icon);\n\n tv_item_name.setText(arrayList.get(position));\n// iv_spinner_icon.setImageResource(arrayIcons.getResourceId(position, -1));\n return row;\n }", "@Override\n public CustomViewHolder onCreateViewHolder(ViewGroup parent, int type)\n {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_view, null, false);\n return new CustomViewHolder(view);\n }", "private void castLayoutElements() {\n linlaHeaderProgress = (LinearLayout) view.findViewById(R.id.linlaHeaderProgress);\n listPrinters = (RecyclerView) view.findViewById(R.id.listPrinters);\n linlaEmpty = (LinearLayout) view.findViewById(R.id.linlaEmpty);\n \n /* CONFIGURE THE RECYCLERVIEW */\n listPrinters.setHasFixedSize(true);\n LinearLayoutManager llm = new LinearLayoutManager(getActivity());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n listPrinters.setLayoutManager(llm);\n }", "@Override\n public void init(LayoutInflater inflater, ViewGroup parent) {\n mView = inflater.inflate(R.layout.project_task_layout, parent, false);\n mTaskList = (ExpandableListView) mView.findViewById(R.id.task_list);\n// mTaskList.setHasFixedSize(true);\n// final LinearLayoutManager mLayoutManager = new LinearLayoutManager(inflater.getContext());\n// mTaskList.setLayoutManager(mLayoutManager);\n mProjectName = (TextView) mView.findViewById(R.id.project_name);\n\n final LinearLayout linearLayout = (LinearLayout) mView.findViewById(R.id.collapse_layout);\n\n mProjectName.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(linearLayout.getVisibility() == View.VISIBLE)\n collapse(linearLayout);\n else\n expand(linearLayout);\n\n }\n });\n\n mTaskList.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {\n @Override\n public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {\n // We call collapseGroupWithAnimation(int) and\n // expandGroupWithAnimation(int) to animate group\n // expansion/collapse.\n if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n return parent.expandGroup(groupPosition, true);\n }else\n\n return true;\n }\n });\n\n\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n View view;\n\n view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_service_text, parent, false);\n\n mview=view;\n return new ViewHolder(view); // Inflater means reading a layout XML\n }", "@Override\n public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { //RECETA\n // create a new view\n LayoutInflater inflater = LayoutInflater.from (parent.getContext());\n View v = inflater.inflate(R.layout.row_layout, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "private void initView() {\n // set layout for recycle view\n //hasFixedSize true if adapter changes cannot affect the size of the RecyclerView\n recyclerView.setHasFixedSize(true);\n // this layout can be vertical or horizontal by change the second param\n // of LinearLayoutManager, and display up to down by set the third param false\n LinearLayoutManager layoutManager = new LinearLayoutManager(this,\n LinearLayoutManager.VERTICAL, false);\n\n recyclerView.setLayoutManager(layoutManager);\n importData();\n // set adapter for recycle view\n recyclerView.setAdapter(alarmAdapter);\n }", "private void initView(){\n\n btnBack = (ImageView)findViewById(R.id.btnBack);\n btnQuit = (ImageView)findViewById(R.id.btnQuit);\n btnQuit.setVisibility(View.GONE);\n\n title = (TextView)this.findViewById(R.id.title);\n title.setText(R.string.assetInquire);\n barCode = (EditText)findViewById(R.id.barCode);\n\n loadAssetData = (ListView)findViewById(R.id.loadAssetData);\n\n hs_ledger_hslist = (HorizontalScrollView)findViewById(R.id.hs_ledger_hslist);\n initListViewHead(R.id.tv_list_table_tvhead1, false, rowName[0]);\n initListViewHead(R.id.tv_list_table_tvhead2, false, rowName[1]);\n initListViewHead(R.id.tv_list_table_tvhead3, false, rowName[2]);\n initListViewHead(R.id.tv_list_table_tvhead4, false, rowName[3]);\n initListViewHead(R.id.tv_list_table_tvhead5, false, rowName[4]);\n\n lvx = (ListViewEx)findViewById(R.id.lv_table_lvLedgerList);\n\n lvx.inital(R.layout.list_table_inquire, row, new int[]{\n R.id.tv_list_table_tvhead1,\n R.id.tv_list_table_tvhead2,\n R.id.tv_list_table_tvhead3,\n R.id.tv_list_table_tvhead4,\n R.id.tv_list_table_tvhead5\n });\n\n if (barCodeStr!=null&&!barCodeStr.trim().equals(\"\")){\n barCode.setText(barCodeStr);\n selBarCode();\n }\n }", "public FXMLTuple inflate()\n {\n FXMLLoader loader = new FXMLLoader(resource);\n try {\n return new FXMLTuple(loader.load(), loader.getController());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public void inflate(){\n\t\tInflateTextContent();\n\t\tif(tempData.get(\"Media_Type\").equals(\"1\")){\n\t\t\tgenerateMediaView();\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"2\")){\n\t\t\tprocessURL(2);\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"3\")){\n\t\t\tprocessURL(3);\n\t\t}\t\n\t}", "@Override \n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.article_reader_layout, container, false);\n textView = (TextView)view.findViewById(R.id.text) ;\n return view;\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}", "private void rowIterator(LinearLayout row, Bitmap image) {\n\n for (int position = 0; position < row.getChildCount(); position++) {\n\n ImageView placeHolder = (ImageView) row.getChildAt(position);\n\n if ( isPlaceHolderImage(placeHolder)) {\n placeHolder.setId(imagemid);\n //place_holder.setImageBitmap(Bitmap.createScaledBitmap(image,160,110,true));\n placeHolder.setImageBitmap(image);\n return;\n }\n }\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mTextAndBackground = (ViewGroup) findViewById(C0622R.C0625id.text_and_background);\n ColorDrawable colorDrawable = (ColorDrawable) this.mTextAndBackground.getBackground();\n this.mBackgroundColor = colorDrawable.getColor();\n this.mTextAndBackground.setBackground(new RippleDrawable(ColorStateList.valueOf(Themes.getAttrColor(getContext(), 16843820)), colorDrawable, null));\n this.mTitleView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.title);\n this.mTextView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.text);\n }", "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "boolean hasRowLayout();", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }", "public void loadIngredients(){\n llingerdientDetails.removeAllViews();\n for(int i = 0; i < llDishes.getChildCount();i++) {\n\n ((LinearLayout) llDishes.getChildAt(i).findViewById(R.id.llborderColor)).setBackgroundColor(Color.parseColor(\"#00800000\"));\n\n }\n //llborderColor_ingredients.setBackgroundColor(Color.parseColor(\"#800000\"));\n for(Dish dish: dinnerModel.getDishes()){\n\n for (Ingredient ing : dish.getIngredients()) {\n\n View ingtredientsItemView = layoutInflater.inflate(R.layout.ingredients_item_view,null);\n TextView txtingredientName = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientName);\n TextView txtingredientUnit = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientUnit);\n TextView txtingredientqty = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientqty);\n txtingredientName.setText(ing.getName());\n txtingredientqty.setText(Double.toString(Double.parseDouble(ing.getQuantity()) * dinnerModel.getNumberOfGuests()));\n txtingredientUnit.setText(ing.getUnit());\n llingerdientDetails.addView(ingtredientsItemView);\n }\n }\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mTvMain = (TextView) findViewById(R.id.tv_main);\n this.mTvSub = (TextView) findViewById(R.id.tv_second);\n this.mIvIcon = (ImageView) findViewById(R.id.iv_icon);\n this.mIvIcon.setVisibility(8);\n this.mTvSub.setMovementMethod(ScrollingMovementMethod.getInstance());\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot)\n //Inflate a new view hierarchy from the specified XML node\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "public RowAdapter(Activity a, ArrayList pc_no_array, ArrayList lab_no_array,ArrayList status_array,ArrayList date_array,ArrayList desc_array) {\n activity = a;\n this.pc_no_array = pc_no_array;\n this.lab_no_array = lab_no_array;\n RowAdapter.status_array = status_array;\n this.date_array = date_array;\n this.desc_array = desc_array;\n inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n }", "@Override\n public View newView (Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.fragment_city_list_row, parent, false);\n }", "protected void inflate() {\n matrix.walkInOptimizedOrder(inflateVisitor);\n }", "public View getCustomView(int position, View convertView, ViewGroup parent) {\n \n /********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/\n \t\n View row = inflater.inflate(R.layout.spinner_rows, parent, false);\n \n /***** Get each Model object from Arraylist ********/\n tempValues = null;\n tempValues = (Province) data.get(position);\n \n TextView label = (TextView)row.findViewById(R.id.customprovince);\n //TextView sub = (TextView)row.findViewById(R.id.sub);\n /* if(position==0){\n // Default selected Spinner item\n label.setText(\"Please select company\");\n }\n else\n { // Set values for spinner each row\n label.setText(tempValues.getProvince_name());\n } */ \n label.setText(tempValues.getProvince_name());\n return row;\n }", "@Override\n protected int getNormalLayoutResId() {\n return itemCommonBinder.layout;\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n bringChildToFront(this.menuButton);\n this.buttonsCount = getChildCount();\n createLabels();\n }", "public LinearLayout rootView(){\n buttonIndex = 0;\n buttonPayIndex = 0;\n buttonFunctionIndex = 0;\n\n\n LinearLayout lrl = new LinearLayout(getContext());\n LinearLayout.LayoutParams rlp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n rlp.setMargins(0,5,0,0);\n lrl.setLayoutParams(rlp);\n lrl.setOrientation(LinearLayout.VERTICAL);\n lrl.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n lrl.setWeightSum(rows);\n\n for(int index = 0; index < rows; index++){\n lrl.addView(createLinearLayout());\n }\n return lrl;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n convertView = inflater.inflate(R.layout.fragment_homecircles, container, false);\n init();\n return convertView;\n }", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "public TableLayout loadUserList(ArrayList<User> row, String [] cv, int columnCount){\n TableLayout.LayoutParams tableLayoutParams = new TableLayout.LayoutParams();\n TableLayout tableLayout = new TableLayout(this);\n\n\n // 2) create tableRow params\n TableRow.LayoutParams tableRowParams = new TableRow.LayoutParams();\n tableRowParams.setMargins(5, 5, 5, 5);\n tableRowParams.weight = 1;\n\n int count = 1;\n\n for (int i = 0; i < rowCount; i++)\n {\n // 3) create tableRow\n TableRow tableRow = new TableRow(this);\n\n\n for (int j= 0; j <= columnCount; j++)\n {\n // 4) create textView\n TextView textView = new TextView(this);\n EditText editText = new EditText(this);\n editText.setBackgroundColor(Color.TRANSPARENT);\n editText.setGravity(Gravity.CENTER);\n editText.setEnabled(false);\n\n // textView.setText(String.valueOf(j));\n textView.setBackgroundColor(Color.WHITE);\n textView.setGravity(Gravity.CENTER);\n\n\n\n if (i ==0 && j==0)\n {\n textView.setText(\"No/Info\");\n tableRow.addView(textView, tableRowParams);\n }\n else if(i==0)\n {\n\n textView.setText(cv[j-1]);\n tableRow.addView(textView, tableRowParams);\n }\n else if( j==0)\n {\n\n textView.setText(Integer.toString(count));\n tableRow.addView(textView, tableRowParams);\n count = count +1;\n }\n else\n {\n // \"Tên người dùng\", \"Email\", \"Ngày sinh\",\"Giới tính\", \"Loại tài khoản\",\n ;\n switch (j){\n case 1:\n editText.setText(row.get(i).name);\n tableRow.addView(editText, tableRowParams);\n break;\n case 2:\n editText.setText(row.get(i).email);\n tableRow.addView(editText, tableRowParams);\n break;\n case 3:\n editText.setText(row.get(i).date);\n tableRow.addView(editText, tableRowParams);\n break;\n case 4:\n editText.setText(row.get(i).gender);\n tableRow.addView(editText, tableRowParams);\n break;\n case 5:\n editText.setText(row.get(i).role);\n tableRow.addView(editText, tableRowParams);\n break;\n\n case 6:\n Button btn=new Button(this);\n btn.setId(1);\n btn.setText(\"Ban\");\n btn.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn, tableRowParams);\n break;\n case 7:\n Button btn2=new Button(this);\n btn2.setId(2);\n btn2.setText(\"Change\");\n btn2.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn2, tableRowParams);\n break;\n default:\n break;\n\n }\n\n\n }\n\n }\n\n // 6) add tableRow to tableLayout\n tableLayout.addView(tableRow, tableLayoutParams);\n }\n\n return tableLayout;\n\n\n // --------------------------end of headers ----------------------\n\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.logo = findViewById(C1167R.C1170id.channel_logo);\n this.logoTitle = findViewById(C1167R.C1170id.logo_title);\n this.actionsHint = findViewById(C1167R.C1170id.actions_hint);\n this.sponsoredChannelBackground = findViewById(C1167R.C1170id.sponsored_channel_background);\n this.channelViewMainLinearLayout = findViewById(C1167R.C1170id.main_linear_layout);\n }", "@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n public void init(View v) {\n\n LinearLayout li1 = (LinearLayout) v.findViewById(R.id.table_main);\n\n TableRow tbrow0 = new TableRow(getActivity());\n tbrow0.setPadding(10, 15, 15, 15);\n\n TextView tv0 = new TextView(getActivity());\n tv0.setText(\" Sl.No \");\n tv0.setTextSize(20);\n tv0.setTextColor(Color.BLACK);\n tbrow0.addView(tv0);\n\n TextView tv1 = new TextView(getActivity());\n tv1.setText(\" Name \");\n tv1.setTextSize(20);\n tv1.setTextColor(Color.BLACK);\n tbrow0.addView(tv1);\n\n TextView tv2 = new TextView(getActivity());\n tv2.setText(\" Field \");\n tv2.setTextSize(20);\n tv2.setTextColor(Color.BLACK);\n tbrow0.addView(tv2);\n\n li1.addView(tbrow0);\n\n\n for (int i = 0; i < name.length; i++) {\n TableRow tbrow = new TableRow(getActivity());\n TextView t1v = new TextView(getActivity());\n\n ShapeDrawable shape = new ShapeDrawable(new RectShape());\n shape.getPaint().setColor(Color.RED);\n shape.getPaint().setStyle(Paint.Style.STROKE);\n shape.getPaint().setStrokeWidth(3);\n\n tbrow.setPadding(10, 15, 15, 15);\n // Assign the created border to EditText widget\n // tbrow.setBackground(shape);\n t1v.setText(\"\" + i);\n t1v.setTextColor(Color.BLACK);\n t1v.setGravity(Gravity.CENTER);\n\n tbrow.addView(t1v);\n TextView t2v = new TextView(getActivity());\n t2v.setText(name[i] + i);\n t2v.setTextColor(Color.BLACK);\n t2v.setGravity(Gravity.CENTER);\n tbrow.addView(t2v);\n\n TableRow.LayoutParams lparams = new TableRow.LayoutParams(400, ViewGroup.LayoutParams.WRAP_CONTENT);\n EditText edT_v = new EditText(getActivity());\n edT_v.setLayoutParams(lparams);\n edT_v.setBackground(shape);\n\n edT_v.setTextColor(Color.BLACK);\n edT_v.setGravity(Gravity.CENTER);\n\n\n tbrow.addView(edT_v);\n li1.addView(tbrow);\n }\n\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tif (mObjView == null) {\n\t\t\tmObjView = inflater.inflate(R.layout.jeep_airset, container, false);\n\t\t\tinit();\n\t\t}\n\n\t\treturn mObjView;\n\t}", "@Override\n public rViewHolder onCreateViewHolder(ViewGroup parent, int viewType)\n {\n View view = mInflater.inflate(R.layout.recycler_row, parent, false);\n return new rViewHolder(view);\n }", "@NonNull\n @Override\n public HorizontalViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n View view= LayoutInflater.from(context).inflate(R.layout.row_data,null);\n return new HorizontalViewHolder(view);\n }", "protected void onLoadLayout(View view) {\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Purchase purchase = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n ViewHolder viewHolder; // view lookup cache stored in tag\n\n final View result;\n\n if (convertView == null) {\n\n viewHolder = new ViewHolder();\n LayoutInflater inflater = LayoutInflater.from(getContext());\n convertView = inflater.inflate(R.layout.history_purchase, parent, false);\n viewHolder.purchaseID = (TextView) convertView.findViewById(R.id.purchase_id);\n viewHolder.purchaseDate = (TextView) convertView.findViewById(R.id.purchase_date);\n viewHolder.totalPrice = (TextView) convertView.findViewById(R.id.purchase_price);\n viewHolder.paidPrice = (TextView) convertView.findViewById(R.id.purchase_paid_price);\n viewHolder.purchaseProducts = (LinearLayout) convertView.findViewById(R.id.purchase_prdsucts);\n viewHolder.item = (LinearLayout) convertView.findViewById(R.id.item);\n\n result=convertView;\n\n convertView.setTag(viewHolder);\n } else {\n viewHolder = (ViewHolder) convertView.getTag();\n result=convertView;\n }\n\n viewHolder.purchaseID.setText(purchase.getUuid().toString().substring(0, 6));\n viewHolder.purchaseDate.setText(purchase.getDateString());\n viewHolder.totalPrice.setText(String.format (\"%.2f\", purchase.getTotalPrice()) +\"€\");\n viewHolder.paidPrice.setText(String.format (\"%.2f\", purchase.getPaidPrice()) +\"€\");\n viewHolder.purchaseProducts.removeAllViews();\n\n for(int i = 0; i < purchase.getProducts().size(); i++){\n TextView textView = new TextView(this.mContext);\n textView.setText(purchase.getProducts().get(i).getName() + \" - \" + String.format (\"%.2f\", purchase.getProducts().get(i).getPrice())+\"€\");\n textView.setTextSize((float) 17);\n textView.setTextColor(Color.parseColor(\"#003845\"));\n Typeface font = Typeface.createFromAsset(mContext.getAssets(), \"raleway.ttf\");\n textView.setTypeface(font);\n\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n params.setMargins(0,0,0,10);\n textView.setLayoutParams(params);\n\n viewHolder.purchaseProducts.addView(textView);\n }\n\n //EXTRA FEATURE\n viewHolder.item.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n LinearLayout itemView = (LinearLayout) v;\n TextView objectID = (TextView) itemView.findViewById(R.id.purchase_id);\n\n Toast.makeText(mContext, \"ID: \" + objectID.getText(), Toast.LENGTH_SHORT).show();\n\n Preferences preferences = new Preferences(mContext);\n ArrayList<Purchase> history = new ArrayList<>();\n try {\n history = preferences.getPurchases();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Product> newProducts = new ArrayList<>();\n for(int i=0; i<history.size(); i++){\n String id = history.get(i).getUuid().toString().substring(0, 6);\n if(objectID.getText().equals(id)){\n newProducts = history.get(i).getProducts();\n break;\n }\n }\n\n try {\n ArrayList<Product> basketP = null;\n basketP = preferences.getBasket();\n\n if (basketP.size() + newProducts.size() <= 10) {\n for (int i = 0; i < newProducts.size(); i++) {\n basketP.add(newProducts.get(i));\n }\n\n preferences.saveBasket(basketP);\n Toast.makeText(mContext, \"Products added to your basket with success.\", Toast.LENGTH_SHORT).show();\n }\n else{\n Toast.makeText(mContext, \"You can only have 10 items in basket.\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (JSONException e) {\n Toast.makeText(mContext, \"There was a problem adding products to basket, please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n return convertView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_recetas, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n initRow1();\n setScrollRow2();\n if(typeSprint.equals(getString(R.string.mon1_col2_row1))){\n initRow2(getString(R.string.mon1_col2_row1)\n ,getString(R.string.mon1_col2_row2),getString(R.string.mon1_col2_row3),\n getString(R.string.mon1_col2_row4),\n getString(R.string.mon1_col2_row5),getString(R.string.mon1_col2_row6),\n getString(R.string.mon1_col2_row7),getString(R.string.mon1_col2_row8));\n } else if( typeSprint.equals(getString(R.string.mon1_col3_row1))){\n initRow2(getString(R.string.mon1_col3_row1)\n ,getString(R.string.mon1_col3_row2),getString(R.string.mon1_col3_row3),\n getString(R.string.mon1_col3_row4),\n getString(R.string.mon1_col3_row5),getString(R.string.mon1_col3_row6),\n getString(R.string.mon1_col3_row7),getString(R.string.mon1_col3_row8));\n } else if( typeSprint.equals(getString(R.string.mon1_col4_row1))){\n initRow2(getString(R.string.mon1_col4_row1)\n ,getString(R.string.mon1_col4_row2),getString(R.string.mon1_col4_row3),\n getString(R.string.mon1_col4_row4),\n getString(R.string.mon1_col4_row5),getString(R.string.mon1_col4_row6),\n getString(R.string.mon1_col4_row7),getString(R.string.mon1_col4_row8));\n }\n else if( typeSprint.equals(getString(R.string.mon1_col5_row1))){\n initRow2(getString(R.string.mon1_col5_row1)\n ,getString(R.string.mon1_col5_row2),getString(R.string.mon1_col5_row3),\n getString(R.string.mon1_col5_row4),\n getString(R.string.mon1_col5_row5),getString(R.string.mon1_col5_row6),\n getString(R.string.mon1_col5_row7),getString(R.string.mon1_col5_row8));\n } else if( typeSprint.equals(getString(R.string.tue1_col2_row1))){\n initRow2(getString(R.string.tue1_col2_row1)\n ,getString(R.string.tue1_col2_row2),getString(R.string.tue1_col2_row3),\n getString(R.string.tue1_col2_row4),\n getString(R.string.tue1_col2_row5),getString(R.string.tue1_col2_row6),\n getString(R.string.tue1_col2_row7),getString(R.string.tue1_col2_row8));\n } else if( typeSprint.equals(getString(R.string.mon2_col2_row1))){\n initRow2(getString(R.string.mon2_col2_row1)\n ,getString(R.string.mon2_col2_row2),getString(R.string.mon2_col2_row3),\n getString(R.string.mon2_col2_row4),\n getString(R.string.mon2_col2_row5),getString(R.string.mon2_col2_row6),\n getString(R.string.mon2_col2_row7),getString(R.string.mon2_col2_row8));\n } else if( typeSprint.equals(getString(R.string.thu2_col2_row1))){\n initRow2(getString(R.string.thu2_col2_row1)\n ,getString(R.string.thu2_col2_row2),getString(R.string.thu2_col2_row3),\n getString(R.string.thu2_col2_row4),\n getString(R.string.thu2_col2_row5),getString(R.string.thu2_col2_row6),\n getString(R.string.thu2_col2_row7),getString(R.string.thu2_col2_row8));\n }\n else if( typeSprint.equals(getString(R.string.fri2_col3_row1))){\n initRow2(getString(R.string.fri2_col3_row1)\n ,getString(R.string.fri2_col3_row2),getString(R.string.fri2_col3_row3),\n getString(R.string.fri2_col3_row4),\n getString(R.string.fri2_col3_row5),getString(R.string.fri2_col3_row6),\n getString(R.string.fri2_col3_row7),getString(R.string.fri2_col3_row8));\n }if( typeSprint.equals(getString(R.string.fri2_col2_row1))){\n initRow2(getString(R.string.fri2_col2_row1)\n ,getString(R.string.fri2_col2_row2),getString(R.string.fri2_col2_row3),\n getString(R.string.fri2_col2_row4),\n getString(R.string.fri2_col2_row5),getString(R.string.fri2_col2_row6),\n getString(R.string.fri2_col2_row7),getString(R.string.fri2_col2_row8));\n }\n\n\n }", "@Override\n\tpublic TiUIView createView(Activity activity)\n\t{\n\t\tif (placeholder) {\n\n\t\t\t// Placeholder for header or footer, do not create view.\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new RowView(this);\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_number_full,container,false);\n itemView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "private View inflateSectionView(RecyclerView parent) {\n trace();\n return LayoutInflater.from(parent.getContext())\n .inflate(R.layout.app_list_section, parent, false);\n }", "private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}", "static public View inflateLayout(int Presid,View PlayoutView) //~1410I~\r\n { //~1410I~\r\n if (Dump.Y) Dump.println(\"AView:inflateLayout2 res=\"+Integer.toHexString(Presid)+\",view=\"+PlayoutView.toString());//~@@@@R~\r\n \tAG.setCurrentView(Presid,PlayoutView); //~1410I~\r\n return PlayoutView; //~1410I~\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.notepad_main, container, false);\r\n\t\tbody=(LineEditText) v.findViewById(R.id.body);\r\n\t\tdel=(Button) v.findViewById(R.id.delAll);\r\n\t\tdel.setOnClickListener(this);\r\n\t\treturn v;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView layout3_item = inflater.inflate(R.layout.layout4_lvitem,null);\n\t\treturn layout3_item;\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tView arrangeOrderLayout = inflater.inflate(R.layout.arrange_order, container, false);\n\t\tinitButton(arrangeOrderLayout);\n\t\tinitListView(arrangeOrderLayout);\n\t\treturn arrangeOrderLayout;\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent)\n {\n //position = position of array element\n //this function will pick the first value of array\n //we give it the theme of a single row\n //it implements that theme, makes a row graphic and returns back to OS\n //OS prints it on screen\n //we make an xml file\n //supply data to this function\n //and create the custom list\n //this code runs for every element in the array\n View row=null;\n LayoutInflater li = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //OS uses this service to display graphic\n //We customise the theme and use that service to display our theme\n //only one function to get system services and modiffy it\n //we can either learn all the names of internal services\n //or you press ctrl plus space after context.\n row = li.inflate(R.layout.activity_custom_list,parent,false);\n ImageView iv = (ImageView)row.findViewById(R.id.imageView); //row - pehli line ka variable\n //xml se row bana\n\n TextView tv1 = (TextView)row.findViewById(R.id.textView1);\n TextView tv2 = (TextView)row.findViewById(R.id.textView2);\n tv1.setText(nameArray[position]);\n tv2.setText(infoArray[position]);\n\n if(position%2==0)\n iv.setImageResource(android.R.drawable.star_big_on);\n else\n iv.setImageResource(android.R.drawable.star_big_off);\n\n return row;\n\n }", "public void addRow(String itemName, String itemPrice, String username) {\n LinearLayout parentLayout = findViewById(R.id.itemList);\n\n // Create layout for new item\n LinearLayout l = new LinearLayout(this);\n l.setOrientation(LinearLayout.HORIZONTAL);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 100);\n layoutParams.bottomMargin = 10;\n l.setBackgroundResource(R.drawable.customborder);\n l.setLayoutParams(layoutParams);\n\n // Create item_name textview\n TextView name_textview = new TextView(this);\n name_textview.setText(itemName);\n name_textview.setTextSize(24);\n LinearLayout.LayoutParams nameParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n nameParams.weight = 1;\n name_textview.setLayoutParams(nameParams);\n\n // Create price textview\n TextView price_textview = new TextView(this);\n price_textview.setText(\"$\"+itemPrice);\n price_textview.setTextSize(24);\n LinearLayout.LayoutParams priceParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n priceParams.weight = 1;\n price_textview.setLayoutParams(priceParams);\n\n // Create username textview\n TextView username_textview = new TextView(this);\n username_textview.setText(username);\n username_textview.setTextSize(24);\n LinearLayout.LayoutParams usernameParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n usernameParams.weight = 1;\n username_textview.setLayoutParams(usernameParams);\n\n // Add views to layout\n l.addView(name_textview);\n l.addView(price_textview);\n l.addView(username_textview);\n parentLayout.addView(l);\n\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.read_layout,container,false);\n mContext = view.getContext();\n if(readPresenter ==null)\n readPresenter = new ReadPresenter(getContext(),this);\n initUI(view);\n return view;\n\n }", "@Override\n public listAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // create a new view\n LayoutInflater inflater = LayoutInflater.from(parent.getContext());\n View v = inflater.inflate(R.layout.row_layout, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "private void initViews() {\n user_name = (LinearLayout)findViewById(R.id.user_name);\n user_photo = (LinearLayout)findViewById(R.id.user_photo);\n user_sex = (LinearLayout)findViewById(R.id.user_sex);\n user_notes = (LinearLayout)findViewById(R.id.user_notes);\n name = (TextView)findViewById(R.id.name);\n sex = (TextView)findViewById(R.id.sex);\n notes = (TextView)findViewById(R.id.notes);\n email = (TextView)findViewById(R.id.email);\n photo = (ImageView)findViewById(R.id.photo);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_four_in_row, container, false);\n board = new Board(numberOfRows, numberOfColumns);\n viewHolder = new ViewHolder();\n initUi(view);\n buildCells();\n boardView.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n switch (motionEvent.getAction()) {\n case MotionEvent.ACTION_POINTER_UP:\n case MotionEvent.ACTION_UP: {\n int col = colAtX(motionEvent.getX());\n if (col != -1)\n drop(col);\n }\n }\n return true;\n }\n });\n\n viewHolder.redPlayerWinTextView.setText(\"0\");\n viewHolder.yellowPlayerWinTextView.setText(\"0\");\n viewHolder.turnIndicatorImageView.setImageResource(resourceForTurn());\n\n viewHolder.resetButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (snackbar != null){\n snackbar.dismiss();\n }\n reset();\n }\n });\n return view;\n }", "public void setSoundBoardLayout() {\n\n soundBoardList = new SoundBoardListType();\n soundBoardList = db.getAllSoundboards();\n soundBoardNames = new ArrayList();\n\n for (int i = 0; i < soundBoardList.getSoundBoardList().size(); i++) {\n soundBoardNames.add(soundBoardList.getSoundBoardList().get(i).getSoundBoardName());\n }\n\n soundBoardNames.add(\"+\");\n setContentView(R.layout.main_grid);\n GridView gridView = (GridView) findViewById(R.id.soundboardgrid);\n\n soundBoardListAdapter = new ArrayAdapter<String>(this, R.layout.main_sbrowtext, soundBoardNames);\n gridView.setAdapter(soundBoardListAdapter);\n gridView.setOnItemClickListener(openSoundBoardListener);\n gridView.setOnItemLongClickListener(editSoundBoardListener);\n gridView.setBackgroundColor(Color.BLACK);\n gridView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);\n gridView.getSelector().setAlpha(100);\n\n }", "private void initLayouts() {\n mRelativeLayout1WA = findViewById(R.id.history_layout_one_week_ago);\n mRelativeLayout6DA = findViewById(R.id.history_layout_six_days_ago);\n mRelativeLayout5DA = findViewById(R.id.history_layout_five_days_ago);\n mRelativeLayout4DA = findViewById(R.id.history_layout_four_days_ago);\n mRelativeLayout3DA = findViewById(R.id.history_layout_three_days_ago);\n mRelativeLayout2DA = findViewById(R.id.history_layout_two_days_ago);\n mRelativeLayoutY = findViewById(R.id.history_layout_yesterday);\n\n layoutsList.add(mRelativeLayoutY);\n layoutsList.add(mRelativeLayout2DA);\n layoutsList.add(mRelativeLayout3DA);\n layoutsList.add(mRelativeLayout4DA);\n layoutsList.add(mRelativeLayout5DA);\n layoutsList.add(mRelativeLayout6DA);\n layoutsList.add(mRelativeLayout1WA);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.day_layout, container,false);\n setPieMap(v);\n loadDatas();\n simulator();\n return v;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tv = inflater.inflate(R.layout.wisata, container, false);\r\n \r\n\t\t\r\n\t\t\r\n\t\treturn v;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.item_error, container, false);\n ImageButton b = (ImageButton) v.findViewById(R.id.button_reload_feed);\n\n if (mParent != null) {\n b.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n mParent.launchParser();\n }\n });\n }\n\n return v;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@Override\n protected void loadViewLayout() {\n setContentView(R.layout.ui_imgs_graffit);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.todo_row, parent, false);\n }", "@Override\n\tprotected void loadXml() {\n\t\tsetContentView(R.layout.activity_my_message);\n\t}", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n Log.v(TAG, \"onLayout l = \" + l + \"; t = \" + t + \"; r = \" + r + \"; b = \" + b);\n int count = getChildCount();\n int x = l;\n int y = t;\n for(int i = 0; i < count; i++){\n View child = (View)getChildAt(i);\n child.layout(x, y, x + r, y + b);\n x = x + r;\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.activity_click_product_layout, container, false);\n\n ivList=view.findViewById(R.id.iv_list);\n txtProductDescription=view.findViewById(R.id.txt_productDescription);\n txtShowOfeerPrice=view.findViewById(R.id.txt_showOfferPrice);\n txtShowPrice=view.findViewById(R.id.txt_showPrice);\n txtTitleName=view.findViewById(R.id.tv_list_name);\n edtEnterPinCode=view.findViewById(R.id.edt_enterPinCode);\n\n return view;\n }" ]
[ "0.6457729", "0.6256603", "0.62230533", "0.61085653", "0.60459834", "0.6013528", "0.5987287", "0.5977122", "0.59151936", "0.58765846", "0.58528435", "0.58514273", "0.5804053", "0.574945", "0.5723343", "0.56293553", "0.5620209", "0.56039405", "0.55768687", "0.5575568", "0.55520475", "0.554496", "0.55386657", "0.55265766", "0.5520318", "0.5518811", "0.54929304", "0.54395664", "0.54220074", "0.5412485", "0.54119265", "0.5411234", "0.54049253", "0.5403611", "0.5395189", "0.5388921", "0.53734887", "0.5360163", "0.53419024", "0.53331673", "0.5326654", "0.5312106", "0.5299285", "0.5296332", "0.5295502", "0.529467", "0.52941847", "0.5266276", "0.52614635", "0.52500314", "0.52302223", "0.5226826", "0.52111524", "0.5205642", "0.52026886", "0.5200284", "0.5189351", "0.5186935", "0.51867723", "0.51860946", "0.5181662", "0.5167433", "0.51667655", "0.51633674", "0.51628584", "0.51610804", "0.5159325", "0.5145167", "0.51417774", "0.51393974", "0.5124142", "0.51224905", "0.5122124", "0.51217663", "0.5119965", "0.51173043", "0.5111019", "0.5105408", "0.50986105", "0.5088499", "0.50869966", "0.50850296", "0.50848895", "0.5082633", "0.50789785", "0.5078073", "0.5076729", "0.50719786", "0.50685924", "0.5065988", "0.5062228", "0.5057063", "0.5055728", "0.5053044", "0.50520134", "0.50507545", "0.50482357", "0.5043654", "0.504188", "0.5041175", "0.5036106" ]
0.0
-1
binds the data to the TextView in each row
@Override public void onBindViewHolder(ViewHolder holder, int position) { TransitDataModel model = mData[position]; holder.binding.name.setText(model.name); holder.binding.stop.setText(model.stop); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); Date parse = null; try { parse = simpleDateFormat.parse(model.time); } catch (ParseException e) { e.printStackTrace(); } Date now = new Date(); if (parse != null) { SimpleDateFormat timeformat = new SimpleDateFormat("hh:mm a"); holder.binding.timeClock.setText(timeformat.format(parse)); } Boolean delayed = model.delayed; if (delayed) { holder.binding.timeUntil.setText("Delayed"); holder.binding.timeUntil.setTextColor(ContextCompat.getColor(context, R.color.red)); } else if (model.minutesUntil != null) { holder.binding.timeUntil.setTextColor(ContextCompat.getColor(context, R.color.green)); holder.binding.timeUntil.setText(model.minutesUntil + "min"); } else { holder.binding.timeUntil.setTextColor(ContextCompat.getColor(context, R.color.green)); if (parse != null) { long diff = parse.getTime() - now.getTime(); long minutes = diff / 60000; holder.binding.timeUntil.setText(minutes + "min"); } } holder.binding.getRoot().setOnClickListener(view -> { if (model.minutesUntil == null) { Toast.makeText(context, "Cannot track light rail", Toast.LENGTH_LONG).show(); } else { ServiceSingleton.getInstance().start(model, endpoint, context); } }); // holder.myTextView.setText(animal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateTextViews() {\n full_name_tv.setText(contact.getFullName());\n school_tv.setText(contact.getSchool());\n department_tv.setText(getDepartmentString());\n email.setText(contact.getEmail());\n number_tv.setText(contact.getNumber());\n }", "@Override\r\n\t\tpublic void bindView(View v, Context arg1, Cursor arg2) {\n\t\t\t String tv1 = arg2.getString(2);\r\n\t\t\t String tv3 = CommonCode.change_Date_Format(arg2.getString(3), \"yyyy-MM-dd HH:mm:ss\", \"MM-dd-yyyy HH:mm:ss\");\r\n\t\t\t String tv4 = arg2.getString(4);\r\n\t\t\t String tv2 = arg2.getString(1);\r\n\t\t\t String tv6 = arg2.getString(7);\r\n\t\t\t String tv5 = arg2.getString(6);\r\n\t\t\t String tv8 = arg2.getString(8);//randomnumber\r\n\t\t\t String tv7 = arg2.getString(5);\r\n\t\t\t \r\n\t\t\t final TextView text1 = (TextView) v.findViewById(R.id.textView1);\r\n\t\t\t final TextView text2 = (TextView) v.findViewById(R.id.textView2);\r\n\t\t\t final TextView text3 = (TextView) v.findViewById(R.id.textView3);\r\n\t\t\t final TextView text4 = (TextView) v.findViewById(R.id.textView4);\r\n\t\t\t final TextView text5 = (TextView) v.findViewById(R.id.textView5);\r\n\t\t\t final TextView text6 = (TextView) v.findViewById(R.id.textView6);\r\n\t\t\t final TextView text7 = (TextView) v.findViewById(R.id.textView7); \r\n\t\t\t final TextView text8 = (TextView) v.findViewById(R.id.textView8);\r\n\t\t\t \r\n\t\t\t\ttext1.setText(tv1);\r\n\t\t\t\ttext2.setText(tv2);\r\n\t\t\t\ttext3.setText(tv3);\r\n\t\t\t\ttext4.setText(tv4);\r\n\t\t\t\ttext5.setText(tv5);\r\n\t\t\t\ttext6.setText(tv6);\r\n\t\t\t\ttext7.setText(\"\");\r\n\t\t\t\ttext8.setText(\"\");\r\n\t\t}", "public void addData(){\n Typeface mtypeFace = Typeface.createFromAsset(getAssets(),\n \"fonts/Lato-Regular.ttf\");\n if (dummy != 0) {\n dummy--;\n }\n int value = dummy;\n for (int i = value; i < repdataresponselist.size()&&i<(dummy+20); i++)\n\n {\nvalue++;\n /** Create a TableRow dynamically **/\n\n tr = new TableRow(this);\n /*if (i % 2 == 0) {*/\n/*\n } else {\n tr.setBackgroundResource(R.color.grey);\n\n }*/\n ReportsDataResponse reportdataobj=repdataresponselist.get(i);\n ArrayList<String> responsestrarr=new ArrayList<>();\n responsestrarr.add(reportdataobj.getBkRefid());\n\n responsestrarr.add(reportdataobj.getStatus());\n responsestrarr.add(reportdataobj.getSource());\n\n responsestrarr.add(reportdataobj.getBookingtype());\n\n responsestrarr.add(reportdataobj.getBookingdate());\n responsestrarr.add(reportdataobj.getPNR());\n responsestrarr.add(reportdataobj.getName());\n responsestrarr.add(reportdataobj.getAirline());\n responsestrarr.add(reportdataobj.getFrom());\n responsestrarr.add(reportdataobj.getTo());\n responsestrarr.add(reportdataobj.getClasstype());\n responsestrarr.add(reportdataobj.getTriptype());\n responsestrarr.add(reportdataobj.getTotalpax());\n responsestrarr.add(reportdataobj.getTotalfare());\n\n for (int j = 0; j < 14; j++) {\n\ntry {\n\n tr.setLayoutParams(new LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n companyTV = new TextView(this);\n\n\n\n\n companyTV.setText(responsestrarr.get(j));\n\n companyTV.setTextColor(Color.parseColor(\"#000000\"));\n\n companyTV.setTypeface(mtypeFace);\n\n companyTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));\n\n if(j==1)\n {\n\n switch(responsestrarr.get(j)) {\n case \"Confirmed\":\n companyTV.setBackgroundColor(Color.parseColor(\"#fdba52\"));\n\n break;\n case \"Ticketed\":\n companyTV.setBackgroundColor(Color.parseColor(\"#b9eeb9\"));\n\n break;\n case \"Cancelled\":\n companyTV.setBackgroundColor(Color.parseColor(\"#f6bcbc\"));\n\n break;\n case \"Booking Started\":\n companyTV.setBackgroundColor(Color.parseColor(\"#e6c295\"));\n\n break;\n\n }\n }\n\n\n switch (j)\n {\n case 2:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 3:\n companyTV.setPadding(50, 30, 5, 30);\n break;\n case 7:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 8:\n companyTV.setPadding(25, 30, 5, 30);\n break;\n case 12:\n companyTV.setPadding(70, 30, 5, 30);\n break;\n case 13:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n\n /* case 11:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 12:\n companyTV.setPadding(40, 30, 5, 30);\n break;*/\n default:\n companyTV.setPadding(20, 30, 5, 30);\n\n break;\n\n\n\n\n\n\n\n }\n\n\n tr.addView(companyTV); // Adding textView to tablerow.\n\n tl.addView(tr, new TableLayout.LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n}\ncatch (Exception e)\n{\n e.printStackTrace();\n}\n\n\n }\n\n }\n dummy=value;\ntabledata=getHtmlData();\n\n }", "private void addData(){\n\n for (Recipe obj : frecipes)\n {\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n name = new TextView(this);\n name.setText(obj.getName());\n name.setWidth(320);\n name.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);\n name.setPadding(5, 5, 5, 5);\n tr.addView(name); // Adding textView to tablerow.\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n }\n }", "public void populateTerms(){\n\n //clear existing view\n table.removeAllViews();\n\n //get existing Terms from Database\n ArrayList<List> allTerms = getTerms();\n\n //fill TableLayout with existing Terms\n for (List<String> list : allTerms){\n\n TableRow row = new TableRow(TermsActivity.this);\n TextView idCol = new TextView(TermsActivity.this);\n TextView nameCol = new TextView(TermsActivity.this);\n TextView startCol = new TextView(TermsActivity.this);\n TextView spaceCol = new TextView(TermsActivity.this);\n TextView endCol = new TextView(TermsActivity.this);\n Button detailBtn = new Button(TermsActivity.this);\n\n //convert dates\n long start = Long.valueOf(list.get(2));\n long end = Long.valueOf(list.get(3));\n\n idCol.setText(list.get(0));\n idCol.setMinWidth(120);\n final String idNum = idCol.getText().toString();\n nameCol.setText(list.get(1));\n nameCol.setMinWidth(250);\n startCol.setText(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(new Date(start)));\n startCol.setMinWidth(250);\n spaceCol.setMinWidth(45);\n endCol.setText(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(new Date(end)));\n endCol.setMinWidth(250);\n\n detailBtn.setText(\"Details\");\n detailBtn.setPadding(15,0, 0, 0);\n detailBtn.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n\n //put term data into Shared Preferences to send to next activity\n editor.putString(\"term\", idNum);\n editor.commit();\n\n //switch to Details activity\n Intent intent = new Intent(v.getContext(), TermDetailsActivity.class);\n v.getContext().startActivity(intent);\n }\n });\n\n row.addView(idCol);\n row.addView(nameCol);\n row.addView(startCol);\n row.addView(spaceCol);\n row.addView(endCol);\n row.addView(detailBtn);\n table.addView(row);\n }\n }", "private void displayDetails(){\n Intent intent=getIntent();\n message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);\n\n // The ArrayList that holds the row data\n ArrayList<Object> row;\n // ask the database manager to retrieve the row with the given rowID\n row = dbHelper.getRowAsArray(message);\n Log.w(\"rows\", row.toString());\n try{\n // update the form fields to hold the retrieved data\n String sn = (String)row.get(0);\n String fn = (String)row.get(1);\n String cn = (String)row.get(2);\n String em= (String)row.get(3);\n String ad = (String)row.get(4);\n\n SnameTextView.setText(sn);\n FnameTextView.setText(fn);\n cellnumbTextView.setText(cn);\n emailsTextView.setText(em);\n homeATextView.setText(ad);\n }catch (Exception e){\n Log.e(\"Retrieve Error\", e.toString());\n e.printStackTrace();\n }\n\n\n Cursor cursor = dbHelper.fetchCountriesByName(message);\n\n // The desired columns to be bound\n String[] columns = new String[] {\n ContactsDbAdapter.KEY_SURNAME,\n ContactsDbAdapter.KEY_NAME,\n ContactsDbAdapter.KEY_CELLNUM,\n ContactsDbAdapter.KEY_EMAILADDR,\n ContactsDbAdapter.KEY_HOMEADDR\n };\n\n // the XML defined views which the data will be bound to\n int[] to = new int[] {\n R.id.FNdetails_text_view,\n R.id.LNdetails_text_view,\n R.id.cellDetails_text_view,\n R.id.EmailDetails_text_view,\n R.id.homedetails_text_view,\n };\n\n // create the adapter using the cursor pointing to the desired data\n //as well as the layout information\n dataAdapter = new SimpleCursorAdapter(\n this, R.layout.activity_details,\n cursor,\n columns,\n to,\n 0);\n\n\n\n\n }", "private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tView view = inflater.inflate(R.layout.list_item_table_row_read, parent, false);\n\t\t\tSet<Entry<String, JsonElement>> set = mTableRows[position].getAsJsonObject().entrySet();\n\t\t\tLinearLayout layoutItem = (LinearLayout) view.findViewById(R.id.layoutItem);\n\t\t\t//Loop through each data item in the row and create a layout with the key and \n\t\t\t//value displayed in TextViews within it\n\t\t\tfor (Entry<String, JsonElement> entry : set) {\n\t\t\t\tLog.i(TAG, entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout rowLayout = new RelativeLayout(mContext);\n\t\t\t\tRelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\t\t\t\t\n\t\t\t\trowLayout.setLayoutParams(params);\t\t\t\t\n\t\t\t\tTextView lblKey = new TextView(mContext);\n\t\t\t\tlblKey.setText(entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams keyParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tkeyParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n\t\t\t\tkeyParams.leftMargin = 20;\n\t\t\t\tlblKey.setLayoutParams(keyParams);\t\t\t\t\n\t\t\t\tTextView lblValue = new TextView(mContext);\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams valueParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tvalueParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\t\t\t\tlblValue.setLayoutParams(valueParams);\n\t\t\t\t//Limit the amount of text we show so the UI isn't dirty\n\t\t\t\tInputFilter[] FilterArray = new InputFilter[1];\n\t\t\t\tFilterArray[0] = new InputFilter.LengthFilter(25);\n\t\t\t\tlblValue.setFilters(FilterArray);\n\t\t\t\tlblValue.setText(entry.getValue().getAsString());\n\t\t\t\tlblValue.setGravity(Gravity.RIGHT);\n\t\t\t\trowLayout.addView(lblKey);\n\t\t\t\trowLayout.addView(lblValue);\n\t\t\t\tlayoutItem.addView(rowLayout);\n\t\t\t}\t\t\t\n\t\t\treturn view;\n\t\t}", "private void populateResultsUI(){\n\n totalPayTextView.setText(Double.toString(totalPay));\n totalTipTextView.setText(Double.toString(totalTip));\n totalPerPersonTextView.setText(Double.toString(totalPerPerson));\n }", "public void populateListView() {\n Cursor scores = myDb.getAllData();\n\n String[] columns = new String[]{\n myDb.COL_2,\n myDb.COL_3,\n myDb.COL_4,\n myDb.COL_5\n };\n\n int[] boundTo = new int[]{\n R.id.topScore,\n R.id.topCount,\n R.id.bottomScore,\n R.id.bottomCount\n };\n\n simpleCursorAdapter = new SimpleCursorAdapter(this,\n R.layout.history_list,\n scores,\n columns,\n boundTo,\n 0);\n scoreHistory.setAdapter(simpleCursorAdapter);\n\n// topScore.setTypeface(numberFont);\n// topCount.setTypeface(numberFont);\n// bottomScore.setTypeface(numberFont);\n// bottomCount.setTypeface(numberFont);\n\n\n }", "public void fillTextView(){\n\n data += \"Distance: \" + Math.round(distanceValue * 1000) / 1000.0 + \"\\n\";\n data += \"minSpeed: \" + minSpeed +\"\\n\";\n data += \"maxSpeed: \" + maxSpeed +\"\\n\";\n data += \"Avg Speed: \"+ Math.round(averageSpeed * 1000) / 1000.0 +\"\\n\";\n data += \"minAltitude: \"+minAlt +\"\\n\";\n data += \"maxAltitude: \"+maxAlt+\"\\n\";\n data += \"Avg Alt: \"+Math.round(averageAlt * 1000) / 1000.0 +\"\\n\";\n\n textView.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n textView.setText(data);\n\n }", "private void bindGridView(View root) {\n ListView listView = (ListView) root.findViewById(R.id.DBList);\n\n readDBrow();\n final Long[] elements = rowsMap.keySet().toArray(new Long[]{});\n\n Log.d(Utils.getTag(this), \"keyset has \" + elements.length + \" elements\");\n ArrayAdapter adapter = new ArrayAdapter<Long>(savingActivity, R.layout.my_two_line_listitem, elements) {\n @NonNull\n @Override\n public View getView(int position, View convertView, @NonNull ViewGroup parent) {\n\n if (convertView == null)\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.my_two_line_listitem, parent, false);\n\n TextView tvTitle = (TextView) convertView.findViewById(android.R.id.text1);\n if (tvTitle != null) tvTitle.setText(rowsMap.get(getItem(position))[0]);\n\n TextView tvSubTitle = (TextView) convertView.findViewById(android.R.id.text2);\n if (tvSubTitle != null) tvSubTitle.setText(rowsMap.get(getItem(position))[1]);\n\n return convertView;\n }\n };\n\n listView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n showRowOptions((Long) parent.getAdapter().getItem(position));\n }\n });\n }", "@Override\n\t public void bindView(View view, Context context, Cursor cursor) {\n\t //final String text = convertToString(cursor);\n\t //((TextView) view).setText(text);\n\t final int itemColumnIndex = cursor.getColumnIndexOrThrow(ItemsDbAdapter.COL_WORD);\n\t TextView text1 = (TextView) view.findViewById(R.id.text1);\n\t text1.setText(cursor.getString(itemColumnIndex));\n\t }", "private void initData(View view) {\n /*\n * the array of item which need to show in gridview\n * it contains string and a picture\n * */\n ArrayList<HashMap<String, Object>> mList = new ArrayList<HashMap<String, Object>>();\n\n\n /**\n * download info from local database\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n Cursor cursor = contentResolver.query(uri, null, null, null, null);\n if (cursor != null) {\n while (cursor.moveToNext()) {\n HashMap<String, Object> map = new HashMap<String, Object>();\n String bookname = cursor.getString(cursor.getColumnIndex(\"name\"));\n map.put(\"image\", mImgUrl+\"bookimg_\"+bookname+\".png\");\n map.put(\"text\", bookname);\n mList.add(map);\n }\n /**\n * use the new data to show in gridview\n * */\n initGridView(view, mList);\n }\n cursor.close();\n }", "private void setInfo(int row)\n {\n String ID=table.getModel().getValueAt(row, 0).toString();\n String Name=table.getModel().getValueAt(row, 1).toString(); \n idText.setText(ID);\n nameText.setText(Name);\n }", "private void setUpTextViews() {\n // Find views\n TextView userName0 = (TextView) findViewById(R.id.user_name_0);\n TextView userInfo0 = (TextView) findViewById(R.id.user_info_0);\n TextView userName1 = (TextView) findViewById(R.id.user_name_1);\n TextView userInfo1 = (TextView) findViewById(R.id.user_info_1);\n TextView userName2 = (TextView) findViewById(R.id.user_name_2);\n TextView userInfo2 = (TextView) findViewById(R.id.user_info_2);\n\n // Set text\n userName0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(0).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(1).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(2).getString(ParseConstants.KEY_HOMETOWN)));\n }", "public TableLayout loadUserList(ArrayList<User> row, String [] cv, int columnCount){\n TableLayout.LayoutParams tableLayoutParams = new TableLayout.LayoutParams();\n TableLayout tableLayout = new TableLayout(this);\n\n\n // 2) create tableRow params\n TableRow.LayoutParams tableRowParams = new TableRow.LayoutParams();\n tableRowParams.setMargins(5, 5, 5, 5);\n tableRowParams.weight = 1;\n\n int count = 1;\n\n for (int i = 0; i < rowCount; i++)\n {\n // 3) create tableRow\n TableRow tableRow = new TableRow(this);\n\n\n for (int j= 0; j <= columnCount; j++)\n {\n // 4) create textView\n TextView textView = new TextView(this);\n EditText editText = new EditText(this);\n editText.setBackgroundColor(Color.TRANSPARENT);\n editText.setGravity(Gravity.CENTER);\n editText.setEnabled(false);\n\n // textView.setText(String.valueOf(j));\n textView.setBackgroundColor(Color.WHITE);\n textView.setGravity(Gravity.CENTER);\n\n\n\n if (i ==0 && j==0)\n {\n textView.setText(\"No/Info\");\n tableRow.addView(textView, tableRowParams);\n }\n else if(i==0)\n {\n\n textView.setText(cv[j-1]);\n tableRow.addView(textView, tableRowParams);\n }\n else if( j==0)\n {\n\n textView.setText(Integer.toString(count));\n tableRow.addView(textView, tableRowParams);\n count = count +1;\n }\n else\n {\n // \"Tên người dùng\", \"Email\", \"Ngày sinh\",\"Giới tính\", \"Loại tài khoản\",\n ;\n switch (j){\n case 1:\n editText.setText(row.get(i).name);\n tableRow.addView(editText, tableRowParams);\n break;\n case 2:\n editText.setText(row.get(i).email);\n tableRow.addView(editText, tableRowParams);\n break;\n case 3:\n editText.setText(row.get(i).date);\n tableRow.addView(editText, tableRowParams);\n break;\n case 4:\n editText.setText(row.get(i).gender);\n tableRow.addView(editText, tableRowParams);\n break;\n case 5:\n editText.setText(row.get(i).role);\n tableRow.addView(editText, tableRowParams);\n break;\n\n case 6:\n Button btn=new Button(this);\n btn.setId(1);\n btn.setText(\"Ban\");\n btn.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn, tableRowParams);\n break;\n case 7:\n Button btn2=new Button(this);\n btn2.setId(2);\n btn2.setText(\"Change\");\n btn2.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn2, tableRowParams);\n break;\n default:\n break;\n\n }\n\n\n }\n\n }\n\n // 6) add tableRow to tableLayout\n tableLayout.addView(tableRow, tableLayoutParams);\n }\n\n return tableLayout;\n\n\n // --------------------------end of headers ----------------------\n\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n TextView tanggal = (TextView) view.findViewById(R.id.tanggal);\n TextView Pemasukan = (TextView) view.findViewById(R.id.Dana);\n TextView keterangan = (TextView) view.findViewById(R.id.keterangan);\n // Read the pet attributes from the Cursor for the current pet\n String editTanggal = cursor.getString(cursor.getColumnIndex(tabeldb.listtabeldb.COL_1_Pemasukan));\n double editPemasukan = cursor.getInt(cursor.getColumnIndex(tabeldb.listtabeldb.COL_2_Pemasukan));\n String editKeterangan= cursor.getString(cursor.getColumnIndex(tabeldb.listtabeldb.COL_3_Pemasukan));\n\n // Update the TextViews with the attributes for the current pet\n DecimalFormat decim = new DecimalFormat(\"#,###.##\");\n tanggal.setText(editTanggal);\n Pemasukan.setText(decim.format(editPemasukan));\n keterangan.setText(editKeterangan);\n }", "@Override\n public void bindView(View view, Context context, Cursor data) {\n TextView svcIdTextView = view.findViewById(R.id.text_iteminvoices_svcid);\n TextView medicalServicesTextView = view.findViewById(R.id.text_iteminvoices_medicalservices);\n TextView medicationTextView = view.findViewById(R.id.text_iteminvoices_mediction);\n TextView costTextView = view.findViewById(R.id.text_iteminvoices_cost);\n\n int svcIdColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_SVC_ID);\n int medicalServicesColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_MEDICAL_SERVICES);\n int medicationColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_MEDICATION);\n int costColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_COST);\n\n String svcId = data.getString(svcIdColumnIndex);\n String medicalServices = data.getString(medicalServicesColumnIndex);\n String medication = data.getString(medicationColumnIndex);\n String cost = data.getString(costColumnIndex);\n\n svcIdTextView.setText(svcId);\n medicalServicesTextView.setText(medicalServices);\n medicationTextView.setText(medication);\n costTextView.setText(cost);\n\n/*\n\n int dateOfSvcColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_DATE_OF_SVC);\n int invoiceColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_INVOICE_DATE);\n int dateDueColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_DATE_DUE);\n int billToNameColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_NAME);\n int billToAddressColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_ADDRESS);\n int billToPhoneColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_PHONE);\n int billToFaxColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_FAX);\n int billToEmailColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_EMAIL);\n\n int supTotalColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_SUBTOTAL);\n int taxRateColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TAX_RATE);\n int totalTaxColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TOTAL_TAX);\n int otherColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_OTHER);\n int totalColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TOTAL);\n int questionsNameColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_NAME);\n int questionsEmailColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_EMAIL);\n int questionsPhoneColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_PHONE);\n int questionsWebColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_WEB);\n int procedureColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_PROCEDURE);\n int patientIdColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_PATIENT_ID);\n\n\n String dateOfSvc = data.getString(dateOfSvcColumnIndex);\n String invoice = data.getString(invoiceColumnIndex);\n String dateDue = data.getString(dateDueColumnIndex);\n String billToName = data.getString(billToNameColumnIndex);\n String billToAddress = data.getString(billToAddressColumnIndex);\n String billToPhone = data.getString(billToPhoneColumnIndex);\n String billToFax = data.getString(billToFaxColumnIndex);\n String billToEmail = data.getString(billToEmailColumnIndex);\n String svcId = data.getString(svcIdColumnIndex);\n String medicalServices = data.getString(medicalServicesColumnIndex);\n String medication = data.getString(medicationColumnIndex);\n String cost = data.getString(costColumnIndex);\n String supTotal = data.getString(supTotalColumnIndex);\n String taxRate = data.getString(taxRateColumnIndex);\n String totalTax = data.getString(totalTaxColumnIndex);\n String other = data.getString(otherColumnIndex);\n String total = data.getString(totalColumnIndex);\n String questionsName = data.getString(questionsNameColumnIndex);\n String questionsEmail = data.getString(questionsEmailColumnIndex);\n String questionsPhone = data.getString(questionsPhoneColumnIndex);\n String questionsWeb = data.getString(questionsWebColumnIndex);\n String procedure = data.getString(procedureColumnIndex);\n String patientId = data.getString(patientIdColumnIndex);\n\n\n dateOfSvcTextView.setText(dateOfSvc);\n invoiceDateTextView.setText(invoice);\n dateDueTextView.setText(dateDue);\n\n billFixEditText.setText(billToFax);\n billNameEditText.setText(billToName);\n billAddressEditText.setText(billToAddress);\n billEmailEditText.setText(billToEmail);\n billPhoneEditText.setText(billToPhone);\n\n svcIdEditText.setText(svcId);\n medicalServicesEditText.setText(medicalServices);\n medicationEditText.setText(medication);\n costEditText.setText(cost);\n subtotalEditText.setText(supTotal);\n taxRateEditText.setText(taxRate);\n totalTaxEditText.setText(totalTax);\n otherEditText.setText(other);\n totalEditText.setText(total);\n\n questionsNameEditText.setText(questionsName);\n questionsPhoneEditText.setText(questionsPhone);\n questionEmailEditText.setText(questionsEmail);\n questionsWebEditText.setText(questionsWeb);\n procedureEditText.setText(procedure);\n*/\n }", "@Override\r\n\t\t\tpublic View getView(int position, View convertView,\r\n\t\t\t\t\tViewGroup parent) {\n\t\t\t\tTableLayout tl=new TableLayout(ShouZhiActivity.this);\r\n\t\t\t\t//tl.setOrientation(TableLayout.HORIZONTAL);\r\n\t\t\t\ttl.setShrinkAllColumns(false);\r\n\t\t\t\t\r\n\t\t\t\t TableRow tr=new TableRow(ShouZhiActivity.this);\r\n\t\t\t\t for(int j=0;j<4;j++)\r\n\t\t\t\t { TextView tv=new TextView(ShouZhiActivity.this);\r\n\t\t\t\t if(j==0||j==1||j==2){\t\r\n\t\t\t\t\t if(j==1){\r\n\t\t\t\t\t\ttv.setWidth(110);\r\n\t\t\t\t\t\ttv.setPadding(20, 20, 5, 5);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t if(j==0){\r\n\t\t\t\t\t\ttv.setWidth(110);\r\n\t\t\t\t\t\ttv.setPadding(0, 20, 5, 5);}\r\n\t\t\t\t\t if(j==2){\r\n\t\t\t\t\t\ttv.setWidth(110);\r\n\t\t\t\t\t\ttv.setPadding(20, 20, 5, 5);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t else{\r\n\t\t\t\t\t\ttv.setWidth(140);\r\n\t\t\t\t\t\ttv.setPadding(20, 15, 5, 5);\r\n\t\t\t\t\t}\r\n\t\t\t\t tv.setText(bl.get(position)[j]);\r\n\t\t\t\t tr.setLayoutParams(new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT));\r\n\t\t\t\t\t\ttv.setEllipsize(TruncateAt.END);\r\n\t\t\t\t\t\ttv.setTextSize(14);\r\n\t\t\t\t\t\ttv.setSingleLine(true);\r\n\t\t\t\t\t\ttv.setGravity(Gravity.CENTER);\r\n\t\t\t\t\t\ttv.setTextColor(ShouZhiActivity.this.getResources().getColor(R.color.black));\t\r\n\t\t\t\t\t\ttr.addView(tv);}\r\n\t\t\t\t\t\ttl.addView(tr);\r\n\t\t\t\t\t\treturn tl;\r\n\t\t\t}", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n\n TextView name = (TextView) view.findViewById(R.id.label3nazwa);\n TextView date = (TextView) view.findViewById(R.id.label1data);\n TextView type = (TextView) view.findViewById(R.id.label2typ);\n TextView value = (TextView) view.findViewById(R.id.label4wartosc);\n // Extract properties from cursor\n String nazwa = cursor.getString(cursor.getColumnIndexOrThrow(\"nazwa\"));\n String typ_id = cursor.getString(cursor.getColumnIndexOrThrow(\"typ_id\"));\n String data = cursor.getString(cursor.getColumnIndexOrThrow(\"data\"));\n String wartosc = cursor.getString(cursor.getColumnIndexOrThrow(\"wartosc\"));\n // Populate fields with extracted properties\n name.setText(nazwa);\n date.setText(data);\n type.setText(typ_id);\n value.setText(wartosc);\n }", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n public void init(View v) {\n\n LinearLayout li1 = (LinearLayout) v.findViewById(R.id.table_main);\n\n TableRow tbrow0 = new TableRow(getActivity());\n tbrow0.setPadding(10, 15, 15, 15);\n\n TextView tv0 = new TextView(getActivity());\n tv0.setText(\" Sl.No \");\n tv0.setTextSize(20);\n tv0.setTextColor(Color.BLACK);\n tbrow0.addView(tv0);\n\n TextView tv1 = new TextView(getActivity());\n tv1.setText(\" Name \");\n tv1.setTextSize(20);\n tv1.setTextColor(Color.BLACK);\n tbrow0.addView(tv1);\n\n TextView tv2 = new TextView(getActivity());\n tv2.setText(\" Field \");\n tv2.setTextSize(20);\n tv2.setTextColor(Color.BLACK);\n tbrow0.addView(tv2);\n\n li1.addView(tbrow0);\n\n\n for (int i = 0; i < name.length; i++) {\n TableRow tbrow = new TableRow(getActivity());\n TextView t1v = new TextView(getActivity());\n\n ShapeDrawable shape = new ShapeDrawable(new RectShape());\n shape.getPaint().setColor(Color.RED);\n shape.getPaint().setStyle(Paint.Style.STROKE);\n shape.getPaint().setStrokeWidth(3);\n\n tbrow.setPadding(10, 15, 15, 15);\n // Assign the created border to EditText widget\n // tbrow.setBackground(shape);\n t1v.setText(\"\" + i);\n t1v.setTextColor(Color.BLACK);\n t1v.setGravity(Gravity.CENTER);\n\n tbrow.addView(t1v);\n TextView t2v = new TextView(getActivity());\n t2v.setText(name[i] + i);\n t2v.setTextColor(Color.BLACK);\n t2v.setGravity(Gravity.CENTER);\n tbrow.addView(t2v);\n\n TableRow.LayoutParams lparams = new TableRow.LayoutParams(400, ViewGroup.LayoutParams.WRAP_CONTENT);\n EditText edT_v = new EditText(getActivity());\n edT_v.setLayoutParams(lparams);\n edT_v.setBackground(shape);\n\n edT_v.setTextColor(Color.BLACK);\n edT_v.setGravity(Gravity.CENTER);\n\n\n tbrow.addView(edT_v);\n li1.addView(tbrow);\n }\n\n }", "private void fillData() {\n\tparname.setText(UpStudentController.getName());\r\n\tparphone.setText(UpStudentController.getPhone());\r\n\tparmail.setText(UpStudentController.getMail());\r\n\taddres.setText(UpStudentController.getAdr());\r\n\tlocation.setText(UpStudentController.getLoc());\r\n\tkazi.setText(UpStudentController.getOc());\r\n\ttaifa.setText(UpStudentController.getNat());\r\n\t}", "public void addData(View view) {\n int numCompanies = companies.length;\n TableLayout tl = view.findViewById(R.id.tableLayout);\n Log.d(\"TableViewFragment\", \"addData() invoked\");\n for (int i = 0; i < numCompanies; i++) {\n Log.d(\"TableViewFragment\", \"addData()\" + (i));\n TableRow tr = new TableRow(getContext());\n tr.setLayoutParams(getLayoutParams());\n tr.addView(getTextView(i + 1, companies[i], Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(getContext(), R.color.colorAccent)));\n tr.addView(getTextView(i + numCompanies, os[i], Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(getContext(), R.color.colorAccent)));\n tl.addView(tr, getTblLayoutParams());\n }\n }", "private void bindAllViewElements() {\n\t\tseatingInfoList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_seating_info_list);\n\t\tqrCodeButton = (Button) findViewById(R.id.ticket_detail_view_view_qr_code_btn);\n\t\tpdfButton = (Button) findViewById(R.id.ticket_detail_view_view_pdf_btn);\n\n\t\tdnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_reference_number_value);\n\t\tpnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_resevation_code_value);\n\t\t//paymentMethod = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_TextView);\n\t\t//paymentMethodValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_value);\n\t\ttotalPriceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_total_price_value);\n\t\tinsurance = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_TextView);\n\t\tinsuranceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_value);\n\t\ttariffValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_tariff_value);\n\n\t\ttariffDetail = (TextView) findViewById(R.id.ticket_detail_view_tariff_details_TextView);\n\n\t\tdeliveryMethodValue = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_value);\n\t\tdeliveryMethodInfo = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_TextView);\n\t\tdeliveryMethodInfoDetail1 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail1_TextView);\n\t\tdeliveryMethodInfoDetail2 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail2_TextView);\n\n\t\texchangeButton = (Button) findViewById(R.id.ticket_detail_view_view_exchange_btn);\n\t\tcancelButton = (Button) findViewById(R.id.ticket_detail_view_view_cancel_btn);\n\n\t\ttitle = (TextView) findViewById(R.id.ticket_detail_view_title);\n\n\t\tstationList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_station_list);\n\t\trooView = findViewById(R.id.ticket_detail_root_view);\n\t\trooView.setVisibility(View.VISIBLE);\n\t\tprogressBar = (LinearLayout)findViewById(R.id.tickets_detail_view_progressBarLayout);\n\t\terrorLayout = (LinearLayout) findViewById(R.id.tickets_detail_view_service_error_Layout);\n\t\t\n\t\terrorTextview = (TextView) findViewById(R.id.tickets_detail_view_retrieving_real_time_service_error_textview);\n\t\t\n\t\trunProgressBar();\n\t\t\n\t\tbindAllListeners();\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View row = convertView;\n RecordHolder holder = null;\n // Check if an existing view is being reused, otherwise inflate the view\n if (row == null) {\n LayoutInflater inflater = ((Activity) context).getLayoutInflater();\n row = inflater.inflate(id,parent,false);\n holder = new RecordHolder();\n holder.tvName = (TextView) row.findViewById(R.id.tvName);\n row.setTag(holder);\n }\n Cursos c = data.get(position);\n holder.tvName.setText(c.getNombre_curso());\n\n return row;\n }", "private TableLayout createTableLayout(String [] rv, String [] cv,int rowCount, int columnCount) {\n TableLayout.LayoutParams tableLayoutParams = new TableLayout.LayoutParams();\n TableLayout tableLayout = new TableLayout(this);\n tableLayout.setBackgroundColor(Color.BLACK);\n\n // 2) create tableRow params\n TableRow.LayoutParams tableRowParams = new TableRow.LayoutParams();\n tableRowParams.setMargins(1, 1, 1, 1);\n tableRowParams.weight = 1;\n\n for (int i = 0; i < rowCount; i++) {\n // 3) create tableRow\n TableRow tableRow = new TableRow(this);\n tableRow.setBackgroundColor(Color.BLACK);\n\n for (int j= 0; j < columnCount; j++) {\n // 4) create textView\n TextView textView = new TextView(this);\n // textView.setText(String.valueOf(j));\n textView.setBackgroundColor(Color.WHITE);\n textView.setGravity(Gravity.CENTER);\n\n String s1 = Integer.toString(i);\n String s2 = Integer.toString(j);\n String s3 = s1 + s2;\n int id = Integer.parseInt(s3);\n Log.d(\"TAG\", \"-___>\" + id);\n if (i ==0 && j==0){\n textView.setText(\"Name\");\n } else if(i==0){\n Log.d(\"TAAG\", \"set Column Headers\");\n textView.setText(cv[j-1]);\n }else if( j==0){\n Log.d(\"TAAG\", \"Set Row Headers\");\n textView.setText(rv[i-1]);\n }else if(j==4) {\n textView.setText(\"\"+totalmarks.get(i));\n // check id=23\n } else if(j==3){\n textView.setText(\"\"+englishmarks[i]);\n }else if(j==2) {\n textView.setText(\"\"+sciencemarks[i]);\n } else if(j==1) {\n textView.setText(\"\"+mathsmarks[i]);\n } else{\n textView.setText(\"\" + id);\n }\n // 5) add textView to tableRow\n tableRow.addView(textView, tableRowParams);\n }\n // 6) add tableRow to tableLayout\n tableLayout.addView(tableRow, tableLayoutParams);\n }\n\n return tableLayout;\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n tableLayoutChat.removeAllViews();\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n //getting artist;\n ChatMessage chatMessage = postSnapshot.getValue(ChatMessage.class);\n String theMessege=chatMessage.getMessage();\n String theSender=chatMessage.getSender();\n String theTime=chatMessage.getTime();\n\n\n TableRow header=new TableRow(AcceptedTaskActivity.this);\n ViewGroup.MarginLayoutParams params = new ViewGroup.MarginLayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n header.setLayoutParams(params);\n\n TextView sender = new TextView(AcceptedTaskActivity.this);\n sender.setGravity(Gravity.LEFT);\n if (theSender.equals(userName)){\n sender.setTextColor(Color.BLUE);\n }\n else{\n sender.setTextColor(Color.GREEN);\n }\n sender.setText(theSender);\n\n TextView time = new TextView(AcceptedTaskActivity.this);\n time.setGravity(Gravity.LEFT);\n time.setTextColor(Color.GRAY);\n time.setText(theTime);\n //Log.d(\"theTime\",theTime);\n\n\n TableRow body=new TableRow(AcceptedTaskActivity.this);\n body.setLayoutParams(params);\n TextView message = new TextView(AcceptedTaskActivity.this);\n message.setGravity(Gravity.LEFT);\n\n message.setText(theMessege);\n\n TableRow spacing=new TableRow(AcceptedTaskActivity.this);\n spacing.setLayoutParams(params);\n TextView space = new TextView(AcceptedTaskActivity.this);\n\n\n header.addView(sender);\n header.addView(time);\n body.addView(message);\n spacing.addView(space);\n\n tableLayoutChat.addView(header, params);\n tableLayoutChat.addView(body, params);\n tableLayoutChat.addView(spacing,params);\n scrolview.fullScroll(ScrollView.FOCUS_DOWN);\n\n }\n\n }", "public void showDataBase(){\n List<Mission> missions = appDatabase.myDao().getMissions();\n\n\n String info = \"\";\n\n for(Mission mis : missions){\n int id = mis.getId();\n String name = mis.getName();\n String diffic = mis.getDifficulty();\n int pong = mis.getPoints();\n String desc = mis.getDescription();\n\n info = info+\"Id : \" + id + \"\\n\" + \"Name : \" + name + \"\\n\" + \"Difficulty : \" + diffic + \"\\n\" + \"Points : \" + pong + \"\\n\" + \"Description: \" + desc + \"\\n\\n\";\n }\n\n TextView databaseData = (TextView)getView().findViewById(R.id.DatabaseData);\n databaseData.setText(info);\n\n //Toggle visibility for the textview containing the data\n if(databaseData.getVisibility() == View.VISIBLE)\n databaseData.setVisibility(View.GONE);\n else\n databaseData.setVisibility(View.VISIBLE);\n\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n c.moveToPosition(position);\n holder.tv1.setText(c.getInt(0)+\"\");\n holder.tv2.setText(c.getString(1));\n holder.tv3.setText(c.getString(2));\n }", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, final int arg2,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\tTableLayout tl=(TableLayout)arg1;\r\n\t\t\t\tTableRow tr=(TableRow)tl.getChildAt(0);\r\n\t\t\t\tfor(int i=0;i<4;i++){\r\n\t\t\t\t\tfinal TextView tv=(TextView)tr.getChildAt(i);\r\n\t\t\t\t\tTextPaint mTextPaint=tv.getPaint();\r\n\t\t\t\t\tfinal float textWidth=mTextPaint.measureText(bl.get(arg2)[i]);\r\n\t\t\t\t\tif(i==1){\r\n\t\t\t\t\t\tif(textWidth>84.0){\r\n\t\t\t\t\t\t\ttv.setOnClickListener(new View.OnClickListener() {\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tisubject=bl.get(arg2)[0];\r\n\t\t\t\t\t\t\t\t\tiamount=bl.get(arg2)[1];\r\n\t\t\t\t\t\t\t\t\timode=bl.get(arg2)[2];\r\n\t\t\t\t\t\t\t\t\tidate=bl.get(arg2)[3];\r\n\t\t\t\t\t\t\t\t\tshowDialog(DETAIL_DIALOG);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(i==0||i==2){\r\n\t\t\t\t\t\tif(textWidth>100.0){\r\n\t\t\t\t\t\t tv.setOnClickListener(new View.OnClickListener() {\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t\t\tisubject=bl.get(arg2)[0];\r\n\t\t\t\t\t\t\t\tiamount=bl.get(arg2)[1];\r\n\t\t\t\t\t\t\t\timode=bl.get(arg2)[2];\r\n\t\t\t\t\t\t\t\tidate=bl.get(arg2)[3];\r\n\t\t\t\t\t\t\t\tshowDialog(DETAIL_DIALOG);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\n\n\t\tLayoutInflater inflater=activity.getLayoutInflater();\n\n\t\tif(convertView == null){\n\n\t\t\tconvertView=inflater.inflate(R.layout.column_row, null);\n }\n\t\t \n\t\ttxtFirst=(TextView) convertView.findViewById(R.id.idView);\n\t\ttxtSecond=(TextView) convertView.findViewById(R.id.dateView);\n\t\ttxtThird=(TextView) convertView.findViewById(R.id.discriptionView);\n\t\ttxtFourth=(TextView) convertView.findViewById(R.id.amountView);\n\n\t\tHashMap<String, String> map=list.get(position);\n\t\ttxtFirst.setText(map.get(FIRST_COLUMN));\n\t\ttxtSecond.setText(map.get(SECOND_COLUMN));\n\t\ttxtThird.setText(map.get(THIRD_COLUMN));\n\t\ttxtFourth.setText(map.get(FOURTH_COLUMN));\n\n\t\treturn convertView;\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\t ViewHolder viewholder = null;\n\n\t\t\t if(convertView == null)\n\t {\n\t\t\t\t viewholder = new ViewHolder();\n\t convertView = mInflater.inflate(R.layout.dialog_edit_bill_item, null);\n\t \n\t viewholder.textView1 = (TextView)convertView.findViewById(R.id.diaTextView1);\n\t \n\t convertView.setTag(viewholder);\n\t }else\n\t {\n\t \t viewholder = (ViewHolder)convertView.getTag();\n\t }\n\n\t\t\t viewholder.textView1.setText(data[position]);\n\t return convertView;\n\t\t}", "@Override\n public void onBindViewHolder(DetailAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n //holder.mTextView.setText(mDataset[position]);\n holder.informacion.setText(mDataset[position]); //informacion es el dato que nos entrega el arreglo\n }", "private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n currentUser = databaseHelper.getAllUser().get(userIndex);\n\n textViewName.setText(userName);\n textViewEmail.setText(currentUser.getEmail());\n textViewPhone.setText(currentUser.getNumber());\n double rent = currentUser.getRent();\n String rentStr = new Double(rent).toString();\n textViewRent.setText(rentStr);\n textViewChores.setText(currentUser.getChores());\n\n /*for(int i=0; i<listUsers.size(); i++){\n TextView textView = new TextView(this);\n final int passingInt = i;\n textView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String testMsg = listUsers.get(passingInt).getName();\n Log.d(\"User Clicked: \", testMsg);\n\n Intent editUserIntent = new Intent(EditChosenUserActivity.this, EditChosenUserActivity.class);\n }\n });\n\n textView.setTextSize(60.0f);\n textView.setText(listUsers.get(i).getName());\n users_list.addView(textView);\n }*/\n }", "@Override\r\n protected void onPostExecute(Cursor result)\r\n {\r\n super.onPostExecute(result);\r\n \r\n result.moveToFirst(); // move to the first item \r\n \r\n // get the column index for each data item\r\n int nameIndex = result.getColumnIndex(\"name\");\r\n int phoneIndex = result.getColumnIndex(\"phone\");\r\n int emailIndex = result.getColumnIndex(\"email\");\r\n int streetIndex = result.getColumnIndex(\"street\");\r\n int cityIndex = result.getColumnIndex(\"city\");\r\n \r\n // fill TextViews with the retrieved data\r\n nameTextView.setText(result.getString(nameIndex));\r\n phoneTextView.setText(result.getString(phoneIndex));\r\n emailTextView.setText(result.getString(emailIndex));\r\n streetTextView.setText(result.getString(streetIndex));\r\n cityTextView.setText(result.getString(cityIndex));\r\n \r\n result.close(); // close the result cursor\r\n databaseConnector.close(); // close database connection\r\n }", "private void fillData() {\n String[] from = new String[] {\n NOMBRE_OBJETO,\n DESCRIPCION,\n TEXTURA\n };\n // Campos de la interfaz a los que mapeamos\n int[] to = new int[] {\n R.id.txtNombreObjeto,\n R.id.txtDescripcion,\n R.id.imgIconoObjeto\n };\n getLoaderManager().initLoader(OBJETOS_LOADER, null, this);\n ListView lvObjetos = (ListView) findViewById(R.id.listaObjetos);\n adapter = new SimpleCursorAdapter(this, R.layout.activity_tiendaobjetos_filaobjeto, null, from, to, 0);\n lvObjetos.setAdapter(adapter);\n }", "@Override\n public void onClick(View v) {\n Cursor c=myDatabase.queryStudent();\n if (c!=null){\n StringBuilder sb=new StringBuilder();\n //that means there\n while (c.moveToNext()){\n int sno=c.getInt(0);\n String sname=c.getString(1);\n String scourse=c.getString(2);\n sb.append(sno+\":\"+sname+\":\"+scourse+\"\\n\");\n }\n //let us apply on textview\n tv.setText(sb.toString());\n }\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView Ename = (TextView) view.findViewById(R.id.Ename);\n TextView Designation = (TextView) view.findViewById(R.id.Designation);\n TextView Salary = (TextView) view.findViewById(R.id.Salary);\n // Extract properties from cursor\n String ename = cursor.getString(cursor.getColumnIndexOrThrow(\"ename\"));\n String designation = cursor.getString(cursor.getColumnIndexOrThrow(\"designation\"));\n int salary = cursor.getInt(cursor.getColumnIndexOrThrow(\"salary\"));\n\n ImageView imgView =(ImageView)view.findViewById(R.id.ImageView01);\n\n\n imgView.setImageResource(R.drawable.ic_launcher);\n\n\n\n\n\n // Populate fields with extracted properties\n Ename.setText(ename);\n Designation.setText(designation);\n Salary.setText(String.valueOf(salary));\n }", "private void setViews() {\n\n TextView currentApixu = findViewById(R.id.currentApixu);\n TextView currentOwm = findViewById(R.id.currentOwm);\n TextView currentWu = findViewById(R.id.currentWu);\n\n currentApixu.setText(feedValues[0]);\n currentOwm.setText(feedValues[1]);\n currentWu.setText(feedValues[2]);\n }", "public View getView(int position, View convertView, ViewGroup parent){\n\n\t\t// assign the view we are converting to a local variable\n\t\tView v = convertView;\n\n\t\t// first check to see if the view is null. if so, we have to inflate it.\n\t\t// to inflate it basically means to render, or show, the view.\n\t\tif (v == null) {\n\t\t\tLayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tv = inflater.inflate(R.layout.list_item, null);\n\t\t}\n\n\t\t/*\n\t\t * Recall that the variable position is sent in as an argument to this method.\n\t\t * The variable simply refers to the position of the current object in the list. (The ArrayAdapter\n\t\t * iterates through the list we sent it)\n\t\t * \n\t\t * Therefore, i refers to the current Item object.\n\t\t */\n\t\titem i = objects.get(position);\n\n\t\tif (i != null) {\n\n\t\t\t// This is how you obtain a reference to the TextViews.\n\t\t\t// These TextViews are created in the XML files we defined.\n\n\t\t\tTextView tn = (TextView) v.findViewById(R.id.tnLabel);\n\t\t\tTextView tnd = (TextView) v.findViewById(R.id.tnData);\n\t\t\tTextView dt = (TextView) v.findViewById(R.id.dtLabel);\n\t\t\tTextView dtd = (TextView) v.findViewById(R.id.dtData);\n\t\t\tTextView at = (TextView) v.findViewById(R.id.atLabel);\n\t\t\tTextView atd = (TextView) v.findViewById(R.id.atData);\n\n\t\t\t// check to see if each individual textview is null.\n\t\t\t// if not, assign some text\n\t\t\tif (tn != null){\n\t\t\t\ttn.setText(\"Train Number: \");\n\t\t\t}\n\t\t\tif (tnd != null){\n\t\t\t\ttnd.setText(i.getTrainNum());\n\t\t\t}\n\t\t\tif (dt != null){\n\t\t\t\tdt.setText(\"Departure Time: \");\n\t\t\t}\n\t\t\tif (dtd != null){\n\t\t\t\tdtd.setText(i.getDepTime());\n\t\t\t}\n\t\t\tif (at != null){\n\t\t\t\tat.setText(\"Arrival Time: \");\n\t\t\t}\n\t\t\tif (atd != null){\n\t\t\t\tatd.setText(i.getArrTime());\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// the view must be returned to our activity\n\t\treturn v;\n\n\t}", "@Override\n public void run() {\n receivedTextView6.setText(str5);\n receivedTextView5.setText(str4);\n receivedTextView4.setText(str3);\n receivedTextView3.setText(str2);\n receivedTextView2.setText(str1);\n receivedTextView1.setText(str0);\n }", "public void viewdata(View view){\n\n viewall.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Cursor data = dbHandler.getSeller();\n if(data.getCount() == 0){\n\n showMessage(\"Error\",\"Nothing found\");\n return;\n }\n\n StringBuffer buffer = new StringBuffer();\n\n while (data.moveToNext()){\n\n buffer.append(\"User Name\" +data.getString(0)+ \"\\n\");\n buffer.append(\"Password\" +data.getString(1)+ \"\\n\");\n buffer.append(\"Email\" +data.getString(2)+\"\\n\");\n buffer.append(\"Seller Name\" +data.getString(3)+\"\\n\");\n buffer.append(\"Contatct\" +data.getString(4)+\"\\n\\n\");\n\n //ShowableListMenu(\"Data\",buffer.toString());\n showMessage(\"Data\",buffer.toString());\n\n }\n\n }\n });\n\n\n }", "private void addDataToTable() {\n\n /* Get the main table from the xml */\n TableLayout mainTable = (TableLayout) findViewById(R.id.mainTable);\n\n /* Retrieve which products need to be displayed */\n int product_type = getIntent().getExtras().getInt(\"product_type\");\n String[] product_types_array = getResources().getStringArray(product_type);\n\n /* Retrieve product images for the above list of products */\n int[] product_images = getIntent().getExtras().getIntArray(\"product_images\");\n\n /* Loop through to add each product details in the table */\n for (int i = 0; i < product_types_array.length; i++) {\n\n TableRow tableRow = new TableRow(this);\n TableRow.LayoutParams tableRowParams =\n new TableRow.LayoutParams\n (TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n tableRow.setLayoutParams(tableRowParams);\n tableRow.setPadding(20, 20, 20, 20);\n\n // Initialize Linearlayout to set product name and images\n LinearLayout product_desc = new LinearLayout(this);\n product_desc.setId(R.id.product_linearlayout);\n product_desc.setOrientation(LinearLayout.VERTICAL);\n product_desc.setGravity(Gravity.START);\n product_desc.setPadding(10,0,10,0);\n\n // initialize string to separate product type\n String[] pn_str = product_types_array[i].split(\";\");\n // initialize string to get product name\n String prod_name_str = pn_str[0];\n // initialize string to get product color\n String prod_color = pn_str[1];\n\n /* Product Name Details */\n TextView textView_PN = new TextView(this);\n textView_PN.setText(prod_name_str);\n textView_PN.setWidth(350);\n textView_PN.setHeight(50);\n textView_PN.setId(R.id.product_name);\n textView_PN.setGravity(Gravity.CENTER_HORIZONTAL);\n textView_PN.setTypeface(null, Typeface.BOLD);\n textView_PN.setTextSize(13);\n textView_PN.setPadding(0, 0, 0, 0);\n product_desc.addView(textView_PN);\n\n /* Product Color */\n TextView textView_PC = new TextView(this);\n textView_PC.setText(\"Color : \" + prod_color);\n textView_PC.setId(R.id.product_color);\n textView_PC.setGravity(Gravity.CENTER_HORIZONTAL);\n textView_PC.setTypeface(null, Typeface.BOLD);\n textView_PC.setTextSize(13);\n textView_PC.setPadding(10, 10, 10, 10);\n product_desc.addView(textView_PC);\n\n /* Product Image Details */\n ImageView imageView = new ImageView(this);\n imageView.setImageResource(product_images[i]);\n imageView.setId(R.id.product_image);\n imageView.setPadding(20, 20, 20, 20);\n product_desc.addView(imageView);\n\n // add row in table\n tableRow.addView(product_desc, new TableRow.LayoutParams\n (TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT, 1.0f));\n\n /* LinearLayout for checkboxes */\n LinearLayout product_types = new LinearLayout(this);\n product_types.setOrientation(LinearLayout.VERTICAL);\n product_types.setGravity(Gravity.CENTER_VERTICAL);\n\n int box_type_value = decide_type(prod_name_str);\n\n /* show all products item with checkbox */\n if( box_type_value != -1){\n\n String[] product_modules_array = getResources().getStringArray(box_type_value);\n\n /* Loop for printing multiple checkboxes */\n for (int j = 0; j < product_modules_array.length; j++) {\n\n CheckBox checkBox = new CheckBox(this);\n checkBox.setTextSize(13);\n checkBox.setText(product_modules_array[j]);\n checkBox.setChecked(false);\n checkBox.setId(count);\n\n /* check condition if particular item name belongs to product hashmap */\n if (to_refer_each_item.containsKey(i)) {\n (to_refer_each_item.get(i)).add(count);\n } else {\n ArrayList<Integer> arrayList = new ArrayList<Integer>();\n arrayList.add(count);\n to_refer_each_item.put(i, arrayList);\n }\n count++;\n product_types.addView(checkBox);\n }\n }\n tableRow.addView(product_types, new TableRow.LayoutParams\n (TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT,1.0f));\n mainTable.addView(tableRow);\n }\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView row = convertView;\n\t\t\n\t\tif(row == null){\n\t\t\tLayoutInflater inflater = context.getLayoutInflater();\n\t\t\trow = inflater.inflate(R.layout.item_total_average, null);\n\t\t\t\n\t\t\t// configure RecordHolder\n\t\t\tViewHolder viewHolder = new ViewHolder();\n\t\t\tviewHolder.txtTitle = (TextView) row.findViewById(R.id.total_average_title);\n\t\t\tviewHolder.txtValue = (TextView) row.findViewById(R.id.total_average_value);\n\t\t\trow.setTag(viewHolder);\t\t\t\n\t\t}\n\t\t\n\t\t// fill data\n\t\tViewHolder holder = (ViewHolder) row.getTag();\n\t\tTuple values = data.get(position);\n\t\tholder.txtTitle.setText(values.getValue1());\n\t\tholder.txtValue.setText(values.getValue2());\n\t\t\n\t\treturn row;\n\t}", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView txtTitle = (TextView) view.findViewById(R.id.schoolTitle);\n TextView txtSchoolNo = (TextView) view.findViewById(R.id.schoolNo);\n TextView txtMajor = (TextView) view.findViewById(R.id.schoolMajor);\n TextView txtStartDate = (TextView) view.findViewById(R.id.schoolStartDate);\n TextView txtEndDate = (TextView) view.findViewById(R.id.schoolEndDate);\n TextView txtLocation = (TextView) view.findViewById(R.id.schoolLocation);\n TextView txtStatus = (TextView) view.findViewById(R.id.schoolStatus);\n\n // Extract properties from cursor\n String mTitle = cursor.getString(cursor.getColumnIndexOrThrow(\"school_title\"));\n String mSchoolNo = cursor.getString(cursor.getColumnIndexOrThrow(\"school_cardno\"));\n String mMajor = cursor.getString(cursor.getColumnIndexOrThrow(\"school_major\"));\n String mStartDate = cursor.getString(cursor.getColumnIndexOrThrow(\"start_date\"));\n String mEndDate = cursor.getString(cursor.getColumnIndexOrThrow(\"end_date\"));\n String mLocation = cursor.getString(cursor.getColumnIndexOrThrow(\"school_location\"));\n String mStatus = cursor.getString(cursor.getColumnIndexOrThrow(\"status\"));\n // Populate fields with extracted properties\n txtTitle.setText(mTitle);\n txtSchoolNo.setText(mSchoolNo);\n txtMajor.setText(mMajor);\n txtStartDate.setText(mStartDate);\n txtEndDate.setText(mEndDate);\n txtLocation.setText(mLocation);\n txtStatus.setText(mStatus);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Item item = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_layout, parent, false);\n }\n\n // Lookup view for data population\n TextView tvName = convertView.findViewById(R.id.item_textview);\n TextView tvNum = convertView.findViewById(R.id.num_textview);\n\n // TODO\n // Set the text used by tvName and tvNum using the data object\n // This will need to updated once the entity model has been updated\n tvName.setText(item.getName());\n tvNum.setText(item.getNum());\n\n // Return the completed view to render on screen\n return convertView;\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n Holder holder=new Holder();\n View rowView;\n rowView = inflater.inflate(R.layout.teamrow, null);\n holder.tv=(TextView) rowView.findViewById(R.id.teamrowitem);\n holder.tv.setText(result.get(position).get(\"title\"));\n Log.d(\"adapter\",result.get(position).get(\"title\"));\n\n\n\n\n return rowView;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.BLACK);\n\n // Generate ListView Item using TextView\n return view;\n }", "private void displayData() {\n int j = finalList.size() - 1;\n\n while (j >= 0) {\n Log.d(\"j\", \"\" + j);\n SleepNormalRow normalRow = new SleepNormalRow(\n finalList.get(j).getDateOfSleep(),\n finalList.get(j).getDurationString(),\n finalList.get(j).getSleepTimeToWakeTime());\n recyclerViewItems.add(normalRow);\n j--;\n }\n\n adapter = new SleepAdapter(SleepActivity.this, recyclerViewItems);\n mRecyclerView.setAdapter(adapter);\n\n }", "@Override\r\n public void onBindViewHolder(MyViewHolder holder, int position) {\r\n // - get element from your dataset at this position\r\n // - replace the contents of the view with that element\r\n holder.textView_longitude.setText(dataset.get(position).dataLongitude);\r\n holder.textView_latitude.setText(dataset.get(position).dataLatitude);\r\n holder.textView_speed.setText(dataset.get(position).dataSpeed);\r\n holder.textView_time.setText(dataset.get(position).dataTime);\r\n\r\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n //Find fields to populate in inflated template\n TextView sportClubFirstName = (TextView)view.findViewById(R.id.firstNameTextView);\n TextView sportClubLastName = (TextView)view.findViewById(R.id.lastNameTextView);\n TextView sportClubSport = (TextView)view.findViewById(R.id.sportTextView);\n //Extract properties from cursor\n String firstName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_FIRST_NAME));\n String lastName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_LAST_NAME));\n String sportName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_SPORT));\n //Populate fields with extracted properties\n sportClubFirstName.setText(firstName);\n sportClubLastName.setText(lastName);\n sportClubSport.setText(sportName);\n }", "public void setDataCount(TextView textView, int i) {\n textView.setText(Html.fromHtml(getContext().getString(R.string.activities_destination_record_count, new Object[]{Integer.valueOf(i)})));\n }", "private void inflateTextLayout(View row, BeadInfo beadInfo) {\n\t\tTextView colorCodeTV = (TextView) row.findViewById(R.id.colorNumber);\n\t\tif (colorCodeTV != null){\n\t\t\tString colorCode = beadInfo.getColorCode();\n\t\t\tif (colorCode != null){\n\t\t\t\tcolorCodeTV.setText(colorCode);\n\t\t\t}\n\t\t}\n\t\tLocation loc = beadInfo.getLocation(); \n\t\tif (loc != null){\n\t\t\tString wing = loc.getWing();\n\t\t\tString locRow = String.valueOf(loc.getRow());\n\t\t\tString locCol = String.valueOf(loc.getCol());\n\t\t\tString quantity = String.valueOf(beadInfo.getQuantity());\n\n\t\t\tTextView wingTV = (TextView) row.findViewById(R.id.beadLocationWing);\n\t\t\tif (wingTV != null){\n\t\t\t\twingTV.setText(wing);\n\t\t\t}\n\t\t\tTextView locRowTV = (TextView) row.findViewById(R.id.beadLocationRow);\n\t\t\tif (locRowTV != null){\n\t\t\t\tlocRowTV.setText(locRow);\n\t\t\t}\n\t\t\tTextView locColTV = (TextView) row.findViewById(R.id.beadLocationColumn);\n\t\t\tif (locColTV != null){\n\t\t\t\tlocColTV.setText(locCol);\n\t\t\t}\n\t\t\tTextView quantityTV = (TextView) row.findViewById(R.id.beadQuantity);\n\t\t\tif (quantityTV != null){\n\t\t\t\tquantityTV.setText(quantity);\n\t\t\t}\n\n\n\n\t\t}\n\n\t\t\n\t}", "public void ViewAllData(View v){\n Cursor res = myDB.viewAllData();\n // if there are no data\n if (res.getCount() == 0) {\n // show an error message\n showMessage(\"Error\", \"Nothing found\");\n return;\n }\n\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"Id :\" + res.getString(0) + \"\\n\");\n buffer.append(\"Name :\" + res.getString(1) + \"\\n\");\n buffer.append(\"Surname :\" + res.getString(2) + \"\\n\");\n buffer.append(\"Marks :\" + res.getString(3) + \"\\n\\n\");\n }\n\n // then show all the data inside the buffer\n showMessage(\"Data\", buffer.toString());\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n TextView subcode = (TextView) view.findViewById(R.id.subjectCodeListView);\n TextView subname = (TextView) view.findViewById(R.id.subjectNameListView);\n // Extract properties from cursor\n String subjectcode = cursor.getString(0);\n String subjectname = cursor.getString(1);\n // Populate fields with extracted properties\n subcode.setText(subjectcode);\n subname.setText(subjectname);\n }", "public void showData(){\n listName.setText(this.listName);\n listDescription.setText(this.description);\n Double Total = Lists.getInstance().getLists(this.listName).getTotal();\n listTotal.setText(pending.toString());\n\n this.data = FXCollections.observableArrayList(Lists.getInstance().getLists(this.listName).getItems());\n articleColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"name\")\n );\n quantityColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"quantity\")\n );\n priceColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"price\")\n );\n totalColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"total\")\n );\n stateColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"state\")\n );\n this.itemsTable.setItems(data);\n\n }", "@Override\n public void onBindViewHolder(MyViewHolder viewHolder, int i) {\n viewHolder.name.setText(ps.get(i).getName());\n viewHolder.schar.setText(ps.get(i).getScharr());\n viewHolder.schdep.setText(ps.get(i).getSchdep());\n viewHolder.actar.setText(ps.get(i).getActarr());\n viewHolder.actdep.setText(ps.get(i).getActdep());\n viewHolder.tnum.setText(ps.get(i).getNumber());\n\n\n\n }", "private void populateUI() {\n\n tipPercentTextView.setText(Double.toString(tipPercent));\n noPersonsTextView.setText(Integer.toString(noPersons));\n populateResultsUI();\n }", "private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }", "private void displayData() {\n dataBase = mHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"\n + DbHelper.TABLE_NAME, null);\n\n userId.clear();\n user_fName.clear();\n user_lName.clear();\n user_size.clear();\n user_pay.clear();\n user_produce.clear();\n user_genre.clear();\n if (mCursor.moveToFirst()) {\n do {\n userId.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_ID)));\n user_fName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_FNAME)));\n user_lName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_LNAME)));\n user_size.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_SIZE)));\n user_pay.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PAY)));\n user_produce.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PRODUCE)));\n user_genre.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_GENRE)));\n\n } while (mCursor.moveToNext());\n }\n DisplayAdapter disadpt = new DisplayAdapter(DisplayActivity.this, userId, user_fName, user_lName, user_size, user_pay, user_produce, user_genre);\n userList.setAdapter(disadpt);\n mCursor.close();\n }", "@Override\n public void onBindViewHolder(MyAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n View holder1, holder2, holder3, holder4;\n holder1 = holder.mView.findViewById(R.id.subText);\n holder2 = holder.mView.findViewById(R.id.dueDateText);\n // holder3 = holder.mView.findViewById(R.id.gradeText);\n// holder4 = holder.mView.findViewById(R.id.descText);\n if (mDataset.get(position).getCourse() != null) {\n ((TextView) holder1).setText(mDataset.get(position).getCourse().getSub());\n }\n if (mDataset.get(position).getDueDate() != null) {\n ((TextView) holder2).setText((CharSequence) mDataset.get(position).getDueDate());\n }\n // ((TextView) holder3).setText(mDataset.get(position).get);\n// ((TextView) holder4).setText(mDataset[position]);\n //.setText(mDataset[position]));\n //setText(mDataset[position]);\n }", "private void updateText() {\n updateDateText();\n\n TextView weightText = findViewById(R.id.tvWeight);\n TextView lowerBPText = findViewById(R.id.tvLowerBP);\n TextView upperBPText = findViewById(R.id.tvUpperBP);\n\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n\n double weight = mUser.weight.getWeightByDate(mDate.getTime());\n int upperBP = mUser.bloodPressure.getUpperBPByDate(mDate.getTime());\n int lowerBP = mUser.bloodPressure.getLowerBPByDate(mDate.getTime());\n\n weightText.setText(String.format(Locale.getDefault(), \"Paino\\n%.1f\", weight));\n lowerBPText.setText(String.format(Locale.getDefault(), \"AlaP\\n%d\", lowerBP));\n upperBPText.setText(String.format(Locale.getDefault(), \"YläP\\n%d\", upperBP));\n\n ((EditText)findViewById(R.id.etWeight)).setText(\"\");\n ((EditText)findViewById(R.id.etLowerBP)).setText(\"\");\n ((EditText)findViewById(R.id.etUpperBP)).setText(\"\");\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\taProgressDialog.dismiss();\n\n\t\t\ttry {\n\t\t\t\taJSONArray = aJSONObject.getJSONArray(\"Value\");\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tint size = aJSONArray.length();\n\n\t\t\tfor (int I = 0; I < size; I++) {\n\n\t\t\t\tString productName = null, soldQuantity = null, soldAmount = null;\n\t\t\t\tJSONObject mJSONObject;\n\t\t\t\ttry {\n\t\t\t\t\tmJSONObject = aJSONArray.getJSONObject(I);\n\t\t\t\t\tproductName = mJSONObject.getString(\"productName\");\n\t\t\t\t\tsoldQuantity = mJSONObject.getString(\"sellQuantity\");\n\t\t\t\t\tsoldAmount = mJSONObject.getString(\"totalPrice\");\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t// TableRow aRow = new TableRow(this);\n\t\t\t\tTableRow aRow = new TableRow(TargetProducts.this);\n\n\t\t\t\taRow.setLayoutParams(new LayoutParams(\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n\n\t\t\t\tTextView column1 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column2 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column3 = new TextView(TargetProducts.this);\n\n\t\t\t\tcolumn1.setText(productName);\n\t\t\t\tcolumn1.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn1.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn1.setTextSize(15);\n\t\t\t\tcolumn1.setBackgroundColor(Color.parseColor(\"#dcdcdc\"));\n\t\t\t\tcolumn1.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn2.setText(soldQuantity);\n\t\t\t\tcolumn2.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn2.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn2.setTextSize(15);\n\t\t\t\tcolumn2.setBackgroundColor(Color.parseColor(\"#d3d3d3\"));\n\t\t\t\tcolumn2.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn3.setText(soldAmount);\n\t\t\t\tcolumn3.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn3.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn3.setTextSize(15);\n\t\t\t\tcolumn3.setBackgroundColor(Color.parseColor(\"#cac9c9\"));\n\t\t\t\tcolumn3.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\taRow.addView(column1);\n\t\t\t\taRow.addView(column2);\n\t\t\t\taRow.addView(column3);\n\n\t\t\t\tmyTableLayout.addView(aRow);\n\t\t\t}\n\n\t\t}", "private void setStatTextViews() {\n TextView numLives = findViewById(R.id.lives);\n numLives.setText(String.valueOf(player.getLives()));\n\n TextView multiplier = findViewById(R.id.currMultiply);\n multiplier.setText(String.valueOf(player.getMultiplier()));\n\n TextView totalPoint = findViewById(R.id.currScore);\n totalPoint.setText(String.valueOf(player.getPoints()));\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView textViewListName = view.findViewById(R.id.textView_list_name);\n TextView textViewListNumber = view.findViewById(R.id.textView_list_Number);\n TextView textViewListDescription = view.findViewById(R.id.textView_sub_name);\n\n // Extract properties from cursor\n int getID = cursor.getInt(cursor.getColumnIndexOrThrow(\"food_calories\"));\n String getName = cursor.getString(cursor.getColumnIndexOrThrow(\"food_name\"));\n String getDescription = cursor.getString(cursor.getColumnIndexOrThrow(\"food_description\"));\n\n // Populate fields with extracted properties\n textViewListName.setText(getName);\n textViewListNumber.setText(String.valueOf(getID));\n textViewListDescription.setText(String.valueOf(getDescription));\n }", "public void generate(GridLayout glr, List<String> inpg){\n\t\ttry{\n\t\t\tif(glr.getRowCount()<1){\n\t\t\t\tfor(int i=0; i<clmn; i++){\n\t\t\t\t\ttv.add(new TextView(this));\n\t\t\t\t\ttv.get(tv.size()-1).setId(id); id++;\n\t\t\t\t\trw.add(GridLayout.spec(0));\n\t\t\t\t\tcl.add(GridLayout.spec(i));\n\t\t\t\t\tglp.add(new GridLayout.LayoutParams(rw.get(i), cl.get(i)));\n\t\t\t\t\tglp.get(glp.size()-1).setGravity(Gravity.FILL);\n\t\t\t\t\ttv.get(tv.size()-1).setLayoutParams(glp.get(glp.size()-1));\n\t\t\t\t\ttv.get(tv.size()-1).setPadding(25,10,25,10);\n\t\t\t\t\tGradientDrawable gd = new GradientDrawable();\n\t\t\t\t\tgd.setColor(Color.WHITE);\n\t\t\t\t\tgd.setCornerRadius(5);\n\t\t\t\t\tgd.setStroke(10, BROWN);\n\t\t\t\t\ttv.get(tv.size()-1).setBackgroundDrawable(gd);\n\t\t\t\t\ttv.get(tv.size()-1).setTextSize(25);\n\t\t\t\t\ttv.get(tv.size()-1).setTextColor(Color.BLACK);\n\t\t\t\t\ttv.get(tv.size()-1).setText(dt.get(i));\n\t\t\t\t\ttv.get(tv.size()-1).setGravity(Gravity.CENTER);\n\t\t\t\t\tglr.addView(tv.get(tv.size()-1), glp.get(glp.size()-1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tint iref = glr.getRowCount()*clmn;\n\t\t\tint rc = glr.getRowCount();\n\t\t\tfor(int i=0; i<inpg.size(); i++){\n\t\t\t\tint r = i/clmn+rc;\n\t\t\t\trw.add(GridLayout.spec(r));\n\t\t\t\tint c = (i)-(r-rc)*clmn;\n\t\t\t\tcl.add(GridLayout.spec(c));\n\t\t\t\tGradientDrawable gd = new GradientDrawable();\n\t\t\t\tgd.setColor(Color.WHITE); // Changes this drawbale to use a single color instead of a gradient\n\t\t\t\tgd.setCornerRadius(5);\n\t\t\t\tgd.setStroke(10, BROWN);\n\t\t\t\tglp.add(new GridLayout.LayoutParams(rw.get(rw.size()-1), cl.get(cl.size()-1)));\n\t\t\t\tglp.get(glp.size()-1).setGravity(Gravity.FILL);\n\n\t\t\t\tswitch(dt.get(c)){\n\n\t\t\t\t\tcase(\"TOTAL\"):\n\t\t\t\t\tcase(\"DUE\"):\n\t\t\t\t\t\ttve.add(new TextView(this));\n\t\t\t\t\t\ttve.get(tve.size()-1).setId(id); id++;\n\t\t\t\t\t\ttve.get(tve.size()-1).setLayoutParams(glp.get(glp.size()-1));\n\t\t\t\t\t\ttve.get(tve.size()-1).setPadding(25,10,25,10);\n\t\t\t\t\t\ttve.get(tve.size()-1).setBackgroundDrawable(gd);\n\t\t\t\t\t\ttve.get(tve.size()-1).setGravity(Gravity.CENTER);\n\t\t\t\t\t\ttve.get(tve.size()-1).setTextSize(20);\n\t\t\t\t\t\ttve.get(tve.size()-1).setTextColor(Color.BLACK);\n\t\t\t\t\t\ttve.get(tve.size()-1).setText(inpg.get(i));\n\t\t\t\t\t\tcv.add(tve.get(tve.size()-1));\n\t\t\t\t\t\tcv.get(cv.size()-1).setTag(i+iref);\n\t\t\t\t\t\tglr.addView(tve.get(tve.size()-1), glp.get(glp.size()-1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tet.add(new EditText(this));\n\t\t\t\t\t\tet.get(et.size()-1).setId(id); id++;\n\t\t\t\t\t\tet.get(et.size()-1).setLayoutParams(glp.get(glp.size()-1));\n\t\t\t\t\t\tet.get(et.size()-1).setPadding(25,10,25,10);\n\t\t\t\t\t\tet.get(et.size()-1).setBackgroundDrawable(gd);\n\t\t\t\t\t\tet.get(et.size()-1).setGravity(Gravity.CENTER);\n\t\t\t\t\t\tet.get(et.size()-1).setTextSize(20);\n\t\t\t\t\t\tet.get(et.size()-1).setHint(dth.get(c));\n\t\t\t\t\t\tet.get(et.size()-1).setText(inpg.get(i));\n\t\t\t\t\t\tet.get(et.size()-1).setOnFocusChangeListener(this);\n\t\t\t\t\t\tet.get(et.size()-1).setTag(i+iref);\n\t\t\t\t\t\tcv.add(et.get(et.size()-1));\n\t\t\t\t\t\tglr.addView(et.get(et.size()-1), glp.get(glp.size()-1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tswitch(dt.get(c)){\n\n\t\t\t\t\t//case(\"DATE\"):\n\t\t\t\t\tcase(\"TIME\"):\n\t\t\t\t\tcase(\"RATE\"):\n\t\t\t\t\tcase(\"TRVL\"):\n\t\t\t\t\tcase(\"PAID\"):\n\t\t\t\t\t\tet.get(et.size()-1).setInputType(number0);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase(\"DUE\"):\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tDouble grn = Double.valueOf(tve.get(tve.size()-1).getText().toString().substring(1, tve.get(tve.size()-1).length()));\n\t\t\t\t\t\t\tif(grn>0){tve.get(tve.size()-1).setTextColor(Color.RED);}\n\t\t\t\t\t\t\tif(grn<=0){tve.get(tve.size()-1).setTextColor(Color.GREEN);}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Exception e){\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tToast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n\tpublic void setData() {\n\t\tsuper.setData();\n\t\tif (!isAdult) {\n\t\t\ttv_title1.setText(\"作息规律\");\n\t\t\ttv_title2.setText(\"对人态度\");\n\t\t\ttv_title3.setText(\"学习专注\");\n\t\t\ttv_title4.setText(\"爱心善意\");\n\t\t\ttv_title5.setText(\"尊师重教\");\n\t\t\ttv_title6.setText(\"思考行动\");\n\t\t\ttv_title7.setText(\"其 它\");\n\t\t}\n\t\tif (isYesterday) {\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.add(Calendar.DATE, -1);\n\t\t\ttime = new SimpleDateFormat(\"yyyy-MM-dd \").format(cal.getTime());\n\n\t\t} else {\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.add(Calendar.DATE, -2);\n\t\t\ttime = new SimpleDateFormat(\"yyyy-MM-dd \").format(cal.getTime());\n\t\t}\n\t\tHttpUtils.searchTable(UserInfo.instance().getUid(), time, time,\n\t\t\t\tisAdult, this, this);\n\t}", "private void bindViews() {\n txt_home = (TextView) findViewById(R.id.txt_home);\n txt_progress = (TextView) findViewById(R.id.txt_progress);\n txt_community = (TextView) findViewById(R.id.txt_community);\n txt_profile = (TextView) findViewById(R.id.txt_profile);\n\n txt_home.setOnClickListener(this);\n txt_progress.setOnClickListener(this);\n txt_community.setOnClickListener(this);\n txt_profile.setOnClickListener(this);\n }", "private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}", "public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }", "@Override\n public View getView(int position, View ConvertView, ViewGroup parent){ ///position starts from zero,one and goes on, parent would be the layout we want to display all elements\n View row=ConvertView; //to optimize we inflate the item only first else we recycle the view using converterView\n if(row==null) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n //**View of which we want to convert to java view object\n row = inflater.inflate(R.layout.single_row, parent, false);\n }\n //*****From row view we can access the view items and populate it data\n ImageView imageView = (ImageView)row.findViewById(R.id.imageView);\n TextView myDiscription=(TextView)row.findViewById(R.id.myDescription);\n TextView myTitle=(TextView)row.findViewById(R.id.mytitle);\n\n imageView.setImageResource(images[position]); //postion will incremented automaticlly as views will populate\n myDiscription.setText(description[position]);\n myTitle.setText(titles[position]);\n\n return row;\n }", "public void setupTextFields(View v) {\n other = (EditText) v.findViewById(R.id.eText_Notes);\n totalTotes = (EditText) v.findViewById(R.id.eText_NumStacked);\n\n other.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setENOTES_COLUMN(other.getText().toString());\n }\n });\n\n totalTotes.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOTAL_COLUMN(totalTotes.getText().toString());\n }\n });\n }", "public void fetRowList() {\n try {\n data.clear();\n if (rsAllEntries != null) {\n ObservableList row = null;\n //Iterate Row\n while (rsAllEntries.next()) {\n row = FXCollections.observableArrayList();\n //Iterate Column\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n row.add(rsAllEntries.getString(i));\n }\n data.add(row);\n }\n //connects table with list\n table.setItems(data);\n // cell instances are generated for Order Status column and then colored\n customiseStatusCells();\n\n } else {\n warning.setText(\"No rows to display\");\n }\n } catch (SQLException ex) {\n System.out.println(\"Failure getting row data from SQL \");\n }\n }", "private void updateView() {\n model.inlezenHighscore();\n for (int i = 0; i < 10; i++) {\n view.getNaamLabels(i).setText(model.getNaam(i));\n view.getScoreLabels(i).setText(model.getScores(i));\n }\n }", "public void updateTextViews() {\n // Set the inputs according to the initial input from the entry.\n //TextView dateTextView = (TextView) findViewById(R.id.date_textview);\n //dateTextView.setText(DateUtils.formatDateTime(getApplicationContext(), mEntry.getStart(), DateUtils.FORMAT_SHOW_DATE));\n\n EditText dateEdit = (EditText) findViewById(R.id.date_text_edit);\n dateEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_ABBREV_ALL));\n\n EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);\n startTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_SHOW_TIME));\n\n EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);\n endTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getEnd(), DateUtils.FORMAT_SHOW_TIME));\n\n\n TextView descriptionView = (TextView) findViewById(R.id.description);\n descriptionView.setText(mEntry.getDescription());\n\n\n enableSendButtonIfPossible();\n }", "private void loadRec() {\n\t\tString test = \"ID, Name, Amount, Price\\n\";\n\t\t//formatting for string to load into the screen\n\t\tfor(int i=0 ; i< t.items.size() ; i++) {\n\t\t\ttest += (i+1) + \" \" + t.items.get(i).name +\", \" \n\t\t\t\t\t+ t.items.get(i).amount + \n\t\t\t\t\t\", $\"+ t.items.get(i).price +\"\\n\";\n\t\t}\n\t\tthis.reciet.setText(test);\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tLayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\t\tView v=inflater.inflate(R.layout.custom, null);\n\t\t\t\n\t\t\ttv1=(TextView)v.findViewById(R.id.text1);\n\t\t\ttv1.setText(names[position]);\n\t\t\t\n\t\t\t\n\t\t\ttv2=(TextView)v.findViewById(R.id.text2);\n\t\t\ttv2.setText(phones[position]);\n\t\t\t\n\t\t\t\n\t\t\treturn v;\n\t\t}", "@Override\n public void setView(View row){\n TextView uid = row.findViewById(R.id.user_uid);\n TextView name = row.findViewById(R.id.user_name);\n TextView agender = row.findViewById(R.id.user_agender);\n\n uid.setText(\"UID: \" + this.id);\n name.setText(this.name);\n agender.setText(this.gender + \", DOB: \" + this.dob);\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\taProgressDialog.dismiss();\n\n\t\t\t// Toast.makeText(TargetProducts.this, aJSONObject.toString(),\n\t\t\t// Toast.LENGTH_LONG).show();\n\n\t\t\ttry {\n\t\t\t\taJSONArray = aJSONObject.getJSONArray(\"Value\");\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tint size = aJSONArray.length();\n\n\t\t\tfor (int I = 0; I < size; I++) {\n\n\t\t\t\tString productName = null, soldQuantity = null, soldAmount = null;\n\t\t\t\tJSONObject mJSONObject;\n\t\t\t\ttry {\n\t\t\t\t\tmJSONObject = aJSONArray.getJSONObject(I);\n\t\t\t\t\tproductName = mJSONObject.getString(\"productName\");\n\t\t\t\t\tsoldQuantity = mJSONObject.getString(\"sellQuantity\");\n\t\t\t\t\tsoldAmount = mJSONObject.getString(\"totalPrice\");\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t// TableRow aRow = new TableRow(this);\n\t\t\t\tTableRow aRow = new TableRow(TargetProducts.this);\n\n\t\t\t\taRow.setLayoutParams(new LayoutParams(\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n\n\t\t\t\tTextView column1 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column2 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column3 = new TextView(TargetProducts.this);\n\n\t\t\t\tcolumn1.setText(productName);\n\t\t\t\tcolumn1.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn1.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn1.setTextSize(15);\n\t\t\t\tcolumn1.setBackgroundColor(Color.parseColor(\"#dcdcdc\"));\n\t\t\t\tcolumn1.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn2.setText(soldQuantity);\n\t\t\t\tcolumn2.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn2.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn2.setTextSize(15);\n\t\t\t\tcolumn2.setBackgroundColor(Color.parseColor(\"#d3d3d3\"));\n\t\t\t\tcolumn2.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn3.setText(soldAmount);\n\t\t\t\tcolumn3.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn3.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn3.setTextSize(15);\n\t\t\t\tcolumn3.setBackgroundColor(Color.parseColor(\"#cac9c9\"));\n\t\t\t\tcolumn3.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\taRow.addView(column1);\n\t\t\t\taRow.addView(column2);\n\t\t\t\taRow.addView(column3);\n\n\t\t\t\tmyTableLayout.addView(aRow);\n\t\t\t}\n\n\t\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n ViewHolder viewHolder;\n if(convertView == null){\n viewHolder = new ViewHolder();\n LayoutInflater lukesInflater = LayoutInflater.from(getContext());\n convertView = lukesInflater.inflate(R.layout.infolink_row, parent, false);\n viewHolder.urlTitle = (TextView) convertView.findViewById(R.id.urlTitle);\n viewHolder.urlText = (TextView) convertView.findViewById(R.id.urlText);\n convertView.setTag(viewHolder);\n }else{\n viewHolder = (ViewHolder) convertView.getTag();\n }\n\n //Populate the data into the view using data object\n\n InfoLink infoLink = getItem(position);\n\n\n viewHolder.urlTitle.setText(infoLink.getDisplayName());\n viewHolder.urlText.setText(infoLink.getUrl());\n\n viewHolder.urlTitle.setTextColor(Color.DKGRAY);\n viewHolder.urlText.setTextColor(Color.DKGRAY);\n\n return convertView;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent){\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.WHITE);\n // Generate ListView Item using TextView\n return view;\n }", "public void setarText() {\n txdata2 = (TextView) findViewById(R.id.txdata2);\n txdata1 = (TextView) findViewById(R.id.txdata3);\n txCpf = (TextView) findViewById(R.id.cpf1);\n txRenda = (TextView) findViewById(R.id.renda1);\n txCpf.setText(cpf3);\n txRenda.setText(renda.toString());\n txdata1.setText(data);\n txdata2.setText(data2);\n\n\n }", "void bind(int listIndex){\n cursor.moveToPosition(listIndex);\n\n projectName = cursor.getString(cursor.getColumnIndex(Contract.TABLE_PROJECT.COLUMN_NAME_TITLE));\n numberOfTask = cursor.getString(cursor.getColumnIndex(Contract.TABLE_PROJECT.COLUMN_NAME_NUMBER_OF_TASKS));\n projectId = cursor.getInt(cursor.getColumnIndex(Contract.TABLE_PROJECT._ID));\n\n if(numberOfTask.equals(\"0\")){\n if (excelExportButton.getVisibility()==View.VISIBLE)\n excelExportButton.setVisibility(View.INVISIBLE);\n\n }else {\n if(numberOfTask.equals(\"1\")){\n itemProjectName.setText(projectName + \" ( \" + numberOfTask + \" task )\");\n }\n else{\n itemProjectName.setText(projectName + \" ( \" + numberOfTask + \" tasks )\");\n }\n\n if (excelExportButton.getVisibility()==View.INVISIBLE)\n excelExportButton.setVisibility(View.VISIBLE);\n }\n }", "@Override\n public View getView(final int i, View convertView, ViewGroup parent) {\n\n if (convertView == null) {\n li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n convertView = li.inflate(R.layout.row_speaker, null);\n h = new ViewHolder(convertView);\n convertView.setTag(h);\n\n } else {\n h = (ViewHolder) convertView.getTag();\n }\n\n\n //___________________set data___________________\n h.sl.setText(list.get(i).sl+\". \");\n h.name.setText( list.get(i).name);\n h.topic.setText(list.get(i).topicExtra);\n\n\n /* h.theme.setText(list.get(i).themeExtra);\n h.country.setText(list.get(i).countryExtra);\n h.digit.setText(list.get(i).digitExtra);*/\n\n // hideBlankTextView();\n\n\n h.cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n A.setPerson(list.get(i));\n DialogFragment dialog = new InfoDialog();\n dialog.show(((AppCompatActivity) context).getSupportFragmentManager(), \"dialog\");\n }\n });\n return convertView;\n }", "private void update_text() {\n\n if(i < text_data.length) {\n i++;\n // text_data.setText(String.valueOf(i)); = avoid the RunTime error\n myHandler.post(myRunnable); // relate this to a Runnable\n } else {\n myTimer.cancel(); // stop the timer\n return;\n }\n }", "private void fillData() {\n table.setRowList(data);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n History user = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.activity_riwayat2, parent, false);\n }\n // Lookup view for data population\n TextView tvTanggal = (TextView) convertView.findViewById(R.id.tanggalTextViewID);\n TextView tvRS = (TextView) convertView.findViewById(R.id.RSTextViewID);\n TextView tvPoli = (TextView) convertView.findViewById(R.id.PoliTextViewID);\n // Populate the data into the template view using the data object\n tvTanggal.setText(user.ambilTanggalHis());\n tvRS.setText(user.ambilNamaRSHis());\n tvPoli.setText(user.ambilNamaPoliHis());\n // Return the completed view to render on screen\n return convertView;\n }", "public void updateViews() {\n textView.setText(contactName);\n\n }", "public void populateDetails() {\n\n txtpn_NameHeading.setText(selStudent.getfName() + \" \" + selStudent.getlName());\n\n txtpn_RacesComplete.setText(String.valueOf(dataCur.countNumberRaces(selStudent.getId())));\n txtpn_DaysAbsent.setText(String.valueOf(selStudent.getAttend()));\n txtpn_AgeGroup.setText(String.valueOf(selStudent.getAge()));\n\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n Holder holder=new Holder();\n View rowView;\n\n rowView = inflater.inflate(R.layout.sample_gridlayout, null);\n holder.os_text =(TextView) rowView.findViewById(R.id.os_texts);\n holder.os_img =(ImageView) rowView.findViewById(R.id.os_images);\n\n holder.os_text.setText(result[position]);\n holder.os_img.setImageResource(imageId[position]);\n\n rowView.setOnClickListener(new OnClickListener() {\n double years;\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n switch (result[position]){\n case \"Java\": years = 8;\n break;\n case \"Python\": years = 6;\n break;\n case \"C\": years = 6;\n break;\n case \"Embedded\": years = 6;\n break;\n case \"C++\": years = 6;\n break;\n case \"XML\": years = 0.25;\n break;\n case \"JavaScript\": years = 1;\n break;\n case \"IAM\": years = 1;\n break;\n case \"SQL\": years = 7;\n break;\n case \"Automation\": years = 3;\n break;\n }\n Toast.makeText(context, result[position]+\" Experience: \"+years+ \" years\", Toast.LENGTH_SHORT).show();\n }\n });\n\n return rowView;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.BLACK);\n\n // Generate ListView Item using TextView\n return view;\n }", "private void populateFriendsTables(){\r\n TableLayout tl = (TableLayout) findViewById(R.id.friendTable);\r\n tl.removeAllViews();\r\n TableRow row, titleRow;\r\n TextView view, titleViewEmail, tileViewButton;\r\n\r\n List<String> friends = (List<String>) mFriendData.get(\"friends\");\r\n\r\n titleRow = new TableRow(getApplicationContext());\r\n titleViewEmail = new TextView(getApplicationContext());\r\n titleViewEmail.setText(\"Friend Email\");\r\n titleViewEmail.setPadding(20, 20, 20, 20);\r\n\r\n tileViewButton = new TextView(getApplicationContext());\r\n tileViewButton.setText(\"Remove\");\r\n tileViewButton.setPadding(20, 20, 20, 20);\r\n\r\n titleRow.addView(titleViewEmail);\r\n titleRow.addView(tileViewButton);\r\n\r\n tl.addView(titleRow);\r\n for (String email : friends) {\r\n row = new TableRow(getApplicationContext());\r\n view = new TextView(getApplicationContext());\r\n view.setText(email);\r\n view.setPadding(20, 20, 20, 20);\r\n\r\n TextView button = new Button(getApplicationContext());\r\n button.setText(\"Remove Friend\");\r\n button.setPadding(20, 20, 20, 20);\r\n\r\n row.addView(view);\r\n row.addView(button);\r\n tl.addView(row);\r\n }\r\n }", "private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n\n LayoutInflater myCustomInflater = LayoutInflater.from(getContext());\n View customView = myCustomInflater.inflate(R.layout.customrow, parent, false);\n\n\n TextView startOdo = (TextView) customView.findViewById(R.id.startOdo);\n TextView endOdo = (TextView) customView.findViewById(R.id.endOdo);\n TextView date = (TextView) customView.findViewById(R.id.date);\n TextView note = (TextView) customView.findViewById(R.id.note);\n\n String startOdo1 = String.valueOf(getItem(position).getStartOdo());\n String endOdo1 = String.valueOf(getItem(position).getEndOdo());\n String date1 = getItem(position).getDate();\n String note1 = getItem(position).getNote();\n\n\n startOdo.setText(\"Starting Odometer: \" + startOdo1);\n endOdo.setText(\"Ending Odometer: \" + endOdo1);\n date.setText(\"Date: \" + date1);\n note.setText(note1);\n\n return customView;\n\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.tv.setText(arr.get(position));\n\n // .setText(arr[position]);\n // ((ImageView)temp.findViewById(R.id.iconimage)).setImageResource(ico[position]);\n\n }", "public void update() {\r\n\t\tfor (int i = 0; i < myRows; i++)\r\n\t\t\tfor (int j = 0; j < myColumns; j++)\r\n\t\t\t\tsetCellText(cellArray[i][j]);\r\n\t}", "public void llenar2(ArrayList<String> values1,ArrayList<String[]> values,String txt){\n this.txt.setText(txt);\n DefaultTableModel t=new DefaultTableModel();\n for (int i = 0; i < values1.size(); i++) {\n t.addColumn(values1.get(i));\n }\n this.tv.setModel(t);\n for (int i = 0; i < values.size(); i++) {\n String array[]=values.get(i);\n t.addRow(array);\n \n }\n this.tv.setModel(t);\n \n \n \n }" ]
[ "0.69825363", "0.6889744", "0.65003824", "0.64334226", "0.6420809", "0.63198715", "0.6298689", "0.6276189", "0.62720525", "0.62354594", "0.6231778", "0.6228207", "0.61968917", "0.6184883", "0.6167035", "0.61536914", "0.61530423", "0.615287", "0.61525244", "0.6127181", "0.6105863", "0.6088485", "0.60764706", "0.60237706", "0.6006148", "0.5999797", "0.59935755", "0.5985899", "0.59843785", "0.598261", "0.59791005", "0.5965008", "0.5963121", "0.5954502", "0.5954183", "0.5947058", "0.59427905", "0.59426737", "0.5933577", "0.5931961", "0.5924112", "0.5922929", "0.59209764", "0.59026384", "0.589753", "0.58650815", "0.5863469", "0.58624744", "0.58559716", "0.5852763", "0.58433336", "0.58397806", "0.5838928", "0.5835773", "0.5829976", "0.5823965", "0.5823965", "0.5823965", "0.58221537", "0.5812668", "0.5810534", "0.5807241", "0.58028185", "0.5802488", "0.57988006", "0.5780477", "0.577612", "0.57697904", "0.576932", "0.57491976", "0.57483983", "0.5745363", "0.57408595", "0.5716229", "0.57072693", "0.57035404", "0.57006633", "0.5699998", "0.569676", "0.5695819", "0.56921506", "0.5688593", "0.568843", "0.56835735", "0.5676968", "0.56766486", "0.5668791", "0.56680566", "0.56660116", "0.56613654", "0.5643482", "0.56428796", "0.56414133", "0.5637085", "0.56321126", "0.5631417", "0.56305337", "0.5630352", "0.5627286", "0.5622953", "0.5622596" ]
0.0
-1
total number of rows
@Override public int getItemCount() { return mData == null ? 0 : mData.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int totalRowsCount();", "int getRowsCount();", "public int getTotalRows();", "int getRowsAmount();", "public int getNumRows() {\n\t\treturn NUM_ROWS; \n\t}", "public abstract int getNumOfRows();", "public abstract int getNumRows();", "public int getRowsCount() {\n return rows_.size();\n }", "public int getRowsCount() {\n return rows_.size();\n }", "public int getNumRows() { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getter for the number of rows\n\t\treturn numRows; \n\t}", "public int getNumRows () {\n\t\treturn numrows_;\n\t}", "public int getRows() {\n\t\treturn NUM_OF_ROWS;\n\t}", "public int getNumRows() { return numRows; }", "public int getRowCount() {\r\n\t\treturn(noOfRows);\r\n\t}", "public int getRowCount();", "public int getNumRows() {\n\t\treturn numRows;\n\t}", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "private int numRows(){\n return attrTable.getModel().getRowCount();\n }", "public int getRowCount() {\r\n //return outputs.length;\r\n return NUM_ROW;\r\n }", "public int getNumRows() {\n return numRows;\n }", "public int getNumRows() {\n return numRows;\n }", "public int size() {\n return numberOfRows();\n }", "public int getRowCount()\n {\n return numRows;\n }", "public int getTotalRowCount() {\r\n return totalRowCount;\r\n }", "public int getNumberOfRows() {\n return this.numberOfRows;\n }", "public int getnRows() {\n return nRows;\n }", "public int getnRows() {\n return nRows;\n }", "public int numberOfRows(){\n SQLiteDatabase db = this.getReadableDatabase();\n int numRows = (int) DatabaseUtils.queryNumEntries(db,TABLE_NAME);\n return numRows;\n }", "public int getRowCount() {\n\t\treturn(data.length);\n\t}", "int countRows() throws IOException {\n Scan s = new Scan();\n ResultScanner rs = tbl.getScanner(s);\n int i = 0;\n while(rs.next() !=null) {\n i++;\n }\n return i;\n }", "int getTotalsRowCount();", "public int getRowCount() { return this.underlying.getRowCount(); }", "public int numberOfRows() {\n\t\treturn rowCount;\n\t}", "private int getJTableNumberOfRows() {\n\n\t\tint count = 0; /* create a integer object for rows count */\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\tstatement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT COUNT(*) as numberOfRows FROM invoice\");\n\t\t\tresultSet.next();\n\t\t\tcount = resultSet.getInt(\"numberOfRows\");\n\t\t\tresultSet.close();\n\t\t} // end try\n\t\tcatch (SQLException sqlException) {\n\t\t\tsqlException.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} // end catch\n\t\tfinally // ensure statement and connection are closed properly\n\t\t{\n\t\t\ttry {\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t} // end try\n\t\t\tcatch (Exception exception) {\n\t\t\t\texception.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} // end catch\n\t\t} // end finally\n\t\treturn count; /* return the result of rows count */\n\t}", "public int getRowCount() {\r\n return this.data.length;\r\n }", "public int getActualRowCount() {\r\n int ret = 0;\r\n if (rows != null) ret = rows.size();\r\n return ret;\r\n }", "public int resultCount(){\n\n int c = 0;\n\n try{\n if(res.last()){\n c = res.getRow();\n res.beforeFirst();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return c;\n }", "public int getRows();", "public int getRows();", "int totalRows(){\n return row;\n }", "public int rowCount() {\n\t\treturn n_;\n\t}", "public int getRowCount() {\n return _data.size();\n }", "public int getRowCount()\n\t{\n\t\treturn datas.size();\n\t}", "double getRowCount();", "public int getRowCount() {\n\t\treturn(data.size());\n\t}", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n return row_.size();\n }", "public int getRowCount() {\n\t\treturn this.records.size();\n\t}", "@Override\n\tpublic int getNumRows() {\n\t\treturn 0;\n\t}", "public int rows() {\n\treturn rows;\n}", "public int getRowCount() {\n return data.size();\n }", "public int getRowCount() {\n return data.length;\n }", "int getRows();", "int getRows();", "@Transactional\n\t\tpublic Long getNumberRows (){\n\t\t\n\t\t\treturn pharmacyRepository1.getNumberOfRows();\n\t\t\t\n\t\t}", "public long getNRowsTotal() {\n return cGetNRowsTotal(this.cObject);\n }", "@Override\n\t\tpublic int getRowCount() \n\t\t{\n\t\t\treturn tables.size();\n\t\t}", "public int getRowSize() {\n \t\treturn this.rows;\n \t}", "public int getRowCount()\r\n\t{\r\n\t\treturn rowCount;\r\n\t}", "int getNumberOfRows() {\n lock.readLock().lock();\n try {\n return extensionPointPluginMap.rowMap().size();\n } finally {\n lock.readLock().unlock();\n }\n }", "public int getRowCount()\n\t{\n\t\treturn m_data.rows.size();\n\t}", "public int numberOfRows(){\n int numRows = (int) DatabaseUtils.queryNumEntries(db, TRACKINGS_TABLE_NAME);\n return numRows;\n }", "public int getRows()\n\t{\n\t\treturn rows;\n\t}", "public int getRowCount() {\n return noeuds.size();\n }", "public int getRowCount() {\n return 0;\n }", "@Override\r\n\tpublic long getTotalRows() {\n\t\treturn warehouseDao.getTotalRows();\r\n\t}", "@Override\r\n\tpublic int getRowCount() {\n\t\treturn rowData.length;\r\n\t}", "public int getRowCount() {\r\n return this.rowCount;\r\n }", "public int getRowCount(){\n return dataEntries.length;\n }", "int rowCount();", "@Override\n public int getRowCount() {\n \n return data.size();\n }", "@Override\n\tpublic int getRowCount() {\n\t\treturn records.size();\n\t}", "public int getNumRows() {\n\t\treturn this.subset.length;\n\t}", "public int total(){\n int rows = 0;\n \n try {\n rs = stmt.executeQuery \n (\"SELECT * FROM JEREMY.TICKET\");\n while (rs.next()) {rows++;}\n System.out.println(\"There are \"+ rows + \" record in the table\"); \n \n } catch (Exception e) {}\n \n return rows;\n }", "public int getRowCount() {\n return this.rowCount;\n }", "@Override\r\n public int getRowCount() {\n if (leitores != null) {\r\n return leitores.size();\r\n }\r\n return 0;\r\n }", "public int getRowCount() {\n\t\treturn rowcount;\n\t}", "public static int rowCount() {\n\t return sheet.getPhysicalNumberOfRows();\n\t}", "@Override\r\n public int getRowCount() {\n return this.rowData.size();\r\n }", "public int getRows() {\n\treturn rows;\n }", "@Override\n\tpublic int getRowCount() {\n\t\treturn rowData.size();\n\t}", "@Override\n public int getRowCount() {\n return this.data.length;\n }", "@Override\n\tpublic int getRowCount() {\n\t\treturn data.length;\n\t}", "@Override\n\tpublic int getRowCount() {\n\t\treturn data.length;\n\t}", "public static int RowCount()\r\n\t{\r\n\t\treturn wrksheet.getRows();\r\n\t}", "public int getRowCount()\n {\n return al.size();\n }", "@Override\r\n\tpublic int getRowCount() {\n\t\t\r\n\t\treturn variableData.size();\r\n\t}", "public int getRows() {\n\t\treturn rows;\n\t}", "public int getRows() {\n\t\treturn rows;\n\t}", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }", "public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }" ]
[ "0.8941779", "0.8815116", "0.8755007", "0.8385308", "0.8262187", "0.8252142", "0.82368404", "0.82230633", "0.8137333", "0.80887896", "0.8063271", "0.8062647", "0.8059102", "0.80109876", "0.7972208", "0.7943724", "0.79223907", "0.79223907", "0.79223907", "0.79223907", "0.79223907", "0.79223907", "0.79223907", "0.791794", "0.7915757", "0.789428", "0.789428", "0.78721195", "0.78684336", "0.78649163", "0.7862208", "0.7846895", "0.7846895", "0.78193116", "0.78121465", "0.7809546", "0.78060645", "0.7803065", "0.77864057", "0.7785364", "0.7758101", "0.7745636", "0.77420247", "0.77405655", "0.77405655", "0.77366906", "0.77248925", "0.77206814", "0.7712769", "0.7706339", "0.76991194", "0.768405", "0.768405", "0.768405", "0.768405", "0.768405", "0.768405", "0.76700926", "0.7657344", "0.76475", "0.76430994", "0.76395965", "0.76368093", "0.76368093", "0.762544", "0.7618137", "0.76170254", "0.76163036", "0.76123005", "0.7607695", "0.76071274", "0.7602586", "0.75937635", "0.7590996", "0.7590033", "0.7588551", "0.7587605", "0.75772923", "0.7575437", "0.7563971", "0.7556263", "0.7550502", "0.7545346", "0.75348127", "0.7526064", "0.75244653", "0.75092614", "0.74978095", "0.7497251", "0.7497137", "0.7484907", "0.7483944", "0.7481794", "0.7481794", "0.74693763", "0.74689543", "0.7467577", "0.7461112", "0.7461112", "0.7460352", "0.7460352" ]
0.0
-1
todo: get rid of the need to override toString as READ_ENUMS_USING_TO_STRING is enabled in other projects (i.e. remove READ_ENUMS_USING_TO_STRING)
@Override public String toString() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "public void testEnumUsingToString() throws Exception\n {\n assertEquals(\"\\\"c2\\\"\", MAPPER.writeValueAsString(AnnotatedTestEnum.C2));\n }", "public String asString() {\n\t\t\tString enumName;\n\t\t\tswitch(this) {\n\t\t\tcase INDEX:\n\t\t\t\tenumName = \"index\";\n\t\t\t\tbreak;\n\t\t\tcase NAME:\n\t\t\t\tenumName = \"name\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tenumName = \"unsupported\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn enumName;\n\t\t}", "@Override\n public String toString() {\n throw new UnsupportedOperationException();\n //TODO: Complete this method!\n }", "@SuppressWarnings(\"unchecked\")\n private String toString(Object obj)\n {\n if (obj instanceof Enum)\n return ((Enum) obj).name();\n return obj.toString();\n\n }", "@Override String toString();", "@Override\n public abstract String toString();", "@Override\n public String toString()\n {\n return this.toLsString();\n }", "@Test\n public void testLevelToString() {\n for (PdfaFlavour.Level level : PdfaFlavour.Level.values()) {\n System.out.println(level.toString());\n }\n }", "@Override\n\tpublic abstract String toString ();", "@Override\n public String toString() {\n return toString(Locale.getDefault(), true);\n }", "@Override\n String toString();", "@Override\n String toString();", "@Override public String toString();", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "@Override\n public String toString() {\n throw new UnsupportedOperationException(\"implement me!\");\n }", "@Override\n\tString toString();", "public String toString() {\n StringBuffer buffer = new StringBuffer(getClass().getName());\n\n buffer.append(\": \");\t\t\t\t//NOI18N\n buffer.append(\" name: \");\t\t\t//NOI18N\n buffer.append(getName());\n buffer.append(\", logging level: \");\t//NOI18N\n buffer.append(toString(getLevel()));\n\n return buffer.toString();\n }", "@Override\n public synchronized String toString() {\n return super.toString();\n }", "@Override\r\n String toString();", "@Override\n String toString();", "@Override\n public String toString();", "@Override\n public String toString();", "@Override\n public String toString(){\n return toString(false);\n }", "@Override\n\tpublic String toString();", "public String toString() { return kind() + \":\"+ text() ; }", "@Override\r\n public String toString();", "public String toString(){\n\t\treturn super.toString().toLowerCase();\n\t}", "@Override \n\tpublic String toString() {\n\t\treturn stringForm;\n\t}", "@Override\r\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\r\n\t\t}", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "@Override\r\n public String toString() {\r\n return super.toString();\r\n }", "@Override\r\n public String toString() {\r\n return super.toString();\r\n }", "@Override\r\n\tpublic String toString();", "@Override\n public String toString() {\n return super.toString();\n }", "@Override\n public String toString() {\n return super.toString();\n }", "@Override\n public String toString() {\n return super.toString();\n }", "@Override\n public String toString() {\n return super.toString();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\n\t\t}", "@Override\n\tpublic String toString(){\n\n\t}", "public String toString() {\n return _iotaEnum + \" - \" + _value ;\n }", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }", "public String getEnum() {\n if (model == null)\n return strEnum;\n return model.getEnum();\n }", "public String toString() {\n \t\treturn super.toString();\n \t}", "@Override\n public final String toString() {\n return asString(0, 4);\n }", "@Override\n public String toString() {\n return super.toString(); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n public String toString() {\n return value();\n }", "public String toString(){\n StringBuffer szBuf = new StringBuffer();\n Iterator<String> iter;\n String key;\n ChoiceEntry entry;\n \n iter = getEntriesName().iterator();\n while(iter.hasNext()){\n key = iter.next().toString();\n entry = getEntry(key);\n szBuf.append(entry.getStringRepr());\n if (entry.getKey().equals(_default)){\n szBuf.append(\" (Default)\");\n }\n if (iter.hasNext())\n szBuf.append(\"\\n\");\n }\n return szBuf.toString();\n }", "public String toString() {\n return super.toString() + \", Language = \" + getLanguage() + \", Category = \" + getCategory() + \"\\n\";\n }", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public String toString() {\r\n\r\n\tString out = \"\";\r\n\r\n\tfor (int i = 0; i < this.getNumberChoices(); i++) {\r\n\t MenuChoice thisChoice = this.getChoices().get(i);\r\n\t out += thisChoice.getIndex() + \") \" + thisChoice.getValue() + \"\\n\";\r\n\t}\r\n\r\n\treturn out;\r\n }", "protected String _convertEnumObjectToString(Enum<?> object) {\n\t\treturn object.toString();\n\t}", "@Override\n public String toString(){\n return super.toString().substring(0,1) + super.toString().substring(1).toLowerCase();\n }" ]
[ "0.6093634", "0.6086614", "0.6086614", "0.6086614", "0.6086614", "0.6086614", "0.6086614", "0.6086614", "0.60865325", "0.6077797", "0.6075875", "0.6061258", "0.6049063", "0.6026649", "0.60207075", "0.6011529", "0.6006171", "0.5958313", "0.5940941", "0.5940941", "0.5922575", "0.59008646", "0.58988374", "0.58975255", "0.58913743", "0.58900493", "0.58869565", "0.58576685", "0.585588", "0.585588", "0.5853699", "0.5852768", "0.5846403", "0.58355546", "0.58300006", "0.58256555", "0.58224225", "0.58172745", "0.5816023", "0.5816023", "0.5815647", "0.58136785", "0.58136785", "0.58136785", "0.58136785", "0.5812557", "0.5812557", "0.5812557", "0.5812557", "0.5812557", "0.5812557", "0.58029926", "0.5797585", "0.579546", "0.5793476", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.5791262", "0.57900995", "0.5785029", "0.5772863", "0.57666814", "0.5766153", "0.5765642", "0.5754311", "0.5744228", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57439566", "0.57361454", "0.57268584", "0.5722373" ]
0.0
-1
Created by E5575G on 1/18/2018.
public interface BurppleAPI { @FormUrlEncoded @POST("v1/getFeatured.php") Call<GetFeaturedResponse> loadFeatured( @Field("access_token") String accessToken, @Field("page") int pageIndex); @FormUrlEncoded @POST("v1/getPromotions.php") Call<GetPromotionsResponse> loadPromotions( @Field("access_token") String accessToken, @Field("page") int pageIndex); @FormUrlEncoded @POST("v1/getGuides.php") Call<GetGuidesResponse> loadGuides( @Field("access_token") String accessToken, @Field("page") int pageIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@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 void mo4359a() {\n }", "private void m50366E() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "private TMCourse() {\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "private static void cajas() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void poetries() {\n\n\t}", "public void mo6081a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "Petunia() {\r\n\t\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 gravarBd() {\n\t\t\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "public void mo12930a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo1531a() {\n }", "@Override\n public void init() {}", "@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 memoria() {\n \n }", "public void mo55254a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "private void m50367F() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public void mo21779D() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n protected void init() {\n }", "private ArrowRelationSerializerTeX() {\n }", "public void mo21877s() {\n }", "@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 protected void initialize() {\n\n \n }", "public void m23075a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo9848a() {\n }", "@Override\n public String toString() {\n return \"\";\n }", "private UsineJoueur() {}", "@Override\n public int describeContents()\n {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }" ]
[ "0.5823221", "0.5722275", "0.559076", "0.556265", "0.5435894", "0.5424832", "0.5421941", "0.5419157", "0.54056376", "0.54056376", "0.5390603", "0.5341874", "0.5330922", "0.532195", "0.53081924", "0.5271543", "0.5271543", "0.5271543", "0.5271543", "0.5271543", "0.5271543", "0.5271543", "0.52496517", "0.5248926", "0.52367353", "0.52296114", "0.52178353", "0.5211441", "0.521019", "0.520113", "0.51973164", "0.5191051", "0.518339", "0.5174793", "0.51714385", "0.5163786", "0.5156762", "0.51520634", "0.5147949", "0.514287", "0.51428014", "0.5135172", "0.5130602", "0.51289445", "0.51289445", "0.51289445", "0.51289445", "0.51289445", "0.51289445", "0.5120425", "0.5109252", "0.5108054", "0.51039934", "0.50984514", "0.5092387", "0.5091907", "0.50808483", "0.5076531", "0.50687236", "0.5067285", "0.50644845", "0.5061858", "0.50588423", "0.50588423", "0.50588423", "0.50588423", "0.50588423", "0.5055802", "0.50451475", "0.5043071", "0.5040397", "0.50387436", "0.5033155", "0.50264925", "0.5021637", "0.5021394", "0.5021394", "0.5019324", "0.50189763", "0.50129354", "0.50097334", "0.50087994", "0.50087994", "0.5006444", "0.5003502", "0.5001854", "0.5001407", "0.49930373", "0.49919382", "0.4989139", "0.4987469", "0.4987469", "0.4987469", "0.4987469", "0.4987469", "0.4987469", "0.4987469", "0.4987469", "0.4987469", "0.4987469", "0.4987469" ]
0.0
-1
Sends request for book information based on GID received as extra. The GID of the book from the previous activity is passed to this activity as an extra. That GID is used to create a URL that requests detailed information about a book. The requested is initiated by utilizing volley.
public void retrieveDetailedBookInfo(){ //Check for internet connection if(!NetworkJSONUtils.checkInternetConnection(this)) { ErrorUtils.errorDialog(BookDetailsActivity.this, "Network Error", "It seems you don't have any network connection. Reset your connection and try again."); return; } //Build Uri that fetches book data Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME) .authority(BASE_URL) .appendPath(PATH0) .appendPath(PATH1) .appendPath(PATH2) .appendQueryParameter(PARAM_ACTION, VALUE_ACTION_RETRIEVE_DETAILED_DATA) .appendQueryParameter(PARAM_GID, VALUE_GID) .build(); String urlString = builder.toString(); //Download and parse JSON downloadJSON(urlString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void newVolume(){\n Intent intent = getIntent();\n\n id = intent.getStringExtra(\"Id\");\n\n newUrl = \"https://www.googleapis.com/books/v1/volumes/\"+id;\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, newUrl,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Log.d(\"RESPONSE\", \"onResponse: \" + response);\n\n parseJSONResponse(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"SHIT\", \"onErrorResponse: wrong\");\n }\n });\n queue.add(stringRequest);\n }", "public void viewInfo(View view){\n if(currentBook.ISBN13 != null){//If the data for ISBN has been retrieved\n //Open browser with information\n String bookLink = GOOGLE_BASE_LINK + currentBook.ISBN13;\n Intent browserIntent = new Intent(Intent.ACTION_VIEW);\n browserIntent.setData(Uri.parse(bookLink));\n startActivity(browserIntent);\n }else{\n Toast.makeText(this, \"Book is still loading...\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n IntentResult scanISBN = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);\n if (scanISBN != null) {\n if (scanISBN.getContents() != null) {\n String ISBN = scanISBN.getContents();\n Book book = BookList.getBook(ISBN);\n if (book== null) {\n Toast.makeText(getActivity(), \"Book Does not Exist\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent book_info_intent = new Intent(getActivity(), book_description_activity.class);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"book\", book);\n if (book.getOwner().equalsIgnoreCase(UserList.getCurrentUser().getUsername())) {\n bundle.putInt(\"VISIBILITY\", 1); // 1 for show Edit button\n }\n else {\n bundle.putInt(\"VISIBILITY\", 2); // 2 for not show Edit button\n }\n book_info_intent.putExtras(bundle);\n startActivity(book_info_intent);\n }\n } else {\n Toast.makeText(getActivity(), \"No Results\", Toast.LENGTH_SHORT).show();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, intent);\n }\n }", "public void sendCivicInfo(String url){\n RequestQueue queue = Volley.newRequestQueue(this);\n Intent intent = new Intent(MainActivity.this, CongressionalActivity.class); //All 3 are applicable from here\n Intent altIntent = new Intent(MainActivity.this, CongressionalActivity2.class);\n // Request a JSON response from the provided URL.\n JsonObjectRequest jRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n //JSONArray offices = response.getJSONArray(\"offices\");\n JSONArray officials = response.getJSONArray(\"officials\");\n\n int numOfficials = officials.length();\n if(numOfficials == 3) { // 2 Senators + 1 House Rep\n for (int i = 0; i < numOfficials; i++) {\n JSONObject officialsObject = officials.getJSONObject(i); // Senators: 0 & 1, HouseRep: 2\n intent.putExtra(\"Name_\" + String.valueOf(i), officialsObject.getString(\"name\"));\n intent.putExtra(\"Party_\" + String.valueOf(i), officialsObject.getString(\"party\"));\n try { //handle case where no photo is available through API\n intent.putExtra(\"Photo_\" + String.valueOf(i), officialsObject.getString(\"photoUrl\"));\n } catch (JSONException j) {\n intent.putExtra(\"Photo_\" + String.valueOf(i), \"NA\");\n }\n //sending (4) attributes to pass through for detailed view..\n String website = \"NA\";\n String phone = \"NA\";\n String twitterLink = \"NA\";\n String youtubeLink = \"NA\";\n\n website = officialsObject.getJSONArray(\"urls\").getString(0);\n phone = officialsObject.getJSONArray(\"phones\").getString(0);\n\n //get social media links if they exist for this representative:\n JSONArray channelsArr = officialsObject.getJSONArray(\"channels\");\n for(int index = 0; index < channelsArr.length(); index++){\n if (channelsArr.getJSONObject(index).getString(\"type\").equals(\"Twitter\")){\n twitterLink = channelsArr.getJSONObject(index).getString(\"id\");\n }\n else if(channelsArr.getJSONObject(index).getString(\"type\").equals(\"YouTube\")){\n youtubeLink = channelsArr.getJSONObject(index).getString(\"id\");\n }\n }\n intent.putExtra(\"Website_\" + String.valueOf(i), website);\n intent.putExtra(\"Phone_\" + String.valueOf(i), phone);\n intent.putExtra(\"Twitter_\" + String.valueOf(i), twitterLink);\n intent.putExtra(\"Youtube_\" + String.valueOf(i), youtubeLink);\n intent.putExtra(\"numOfficials\", numOfficials); // to loop & extract in successive activities.\n //Toast.makeText(getApplicationContext(), website + \", \" + phone + \", \" + twitterLink + \", \" + youtubeLink, Toast.LENGTH_LONG).show();\n\n }\n startActivity(intent);//Call CongressionalActivity\n }\n else{ // 2 Senators only LOGIC HAD TO BE SPLIT FOR THE CALL TO SEPARATE INTENTS\n for (int i = 0; i < numOfficials; i++){\n JSONObject officialsObj = officials.getJSONObject(i);\n altIntent.putExtra(\"Name_\" + String.valueOf(i), officialsObj.getString(\"name\"));\n altIntent.putExtra(\"Party_\" + String.valueOf(i), officialsObj.getString(\"party\"));\n try{\n altIntent.putExtra(\"Photo_\" + String.valueOf(i), officialsObj.getString(\"photoUrl\"));\n } catch (JSONException j){\n altIntent.putExtra(\"Photo_\" + String.valueOf(i), \"NA\");\n }\n\n //sending (4) attributes to pass through for detailed view..\n String website = \"NA\";\n String phone = \"NA\";\n String twitterLink = \"NA\";\n String youtubeLink = \"NA\";\n\n website = officialsObj.getJSONArray(\"urls\").getString(0);\n phone = officialsObj.getJSONArray(\"phones\").getString(0);\n\n //get social media links if they exist for this representative:\n JSONArray channelsArr = officialsObj.getJSONArray(\"channels\");\n for(int index = 0; index < channelsArr.length(); index++){\n if (channelsArr.getJSONObject(index).getString(\"type\").equals(\"Twitter\")){\n twitterLink = channelsArr.getJSONObject(index).getString(\"id\");\n }\n else if(channelsArr.getJSONObject(index).getString(\"type\").equals(\"YouTube\")){\n youtubeLink = channelsArr.getJSONObject(index).getString(\"id\");\n }\n }\n altIntent.putExtra(\"Website_\" + String.valueOf(i), website);\n altIntent.putExtra(\"Phone_\" + String.valueOf(i), phone);\n altIntent.putExtra(\"Twitter_\" + String.valueOf(i), twitterLink);\n altIntent.putExtra(\"Youtube_\" + String.valueOf(i), youtubeLink);\n }\n startActivity(altIntent);//Call CongressionalActivity2\n }\n\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(), \"Could not retrieve Data. Please check your address\", Toast.LENGTH_SHORT).show();\n }\n });\n queue.add(jRequest);\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 0) {\n// Log.e(\"scanned isbn in task\", result);\n\n if (resultCode == Activity.RESULT_OK || resultCode == RESULT_INCOMPLETE) {\n String result = data.getStringExtra(\"isbn\");\n\n if (selectedISBN.equals(result)) {\n Intent intent = new Intent(ReturningTaskActivity.this, SuccessExchangeActivity.class);\n intent.putExtra(\"RETURNER\", result);\n intent.putExtra(\"OTHER_UID\", otherUID);\n startActivity(intent);\n } else {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN did not match selected book!\",\n Toast.LENGTH_SHORT).show();\n }\n } else if (resultCode == RESULT_INVALID) {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN is not valid\",\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void fetchBooks(String barcode_number) {\n Log.d(\"fetchBooks\", \"Books being fetched...\");\n client = new BookClient();\n final String error = \"{\\\"start\\\":0,\\\"num_found\\\":0,\\\"numFound\\\":0,\\\"docs\\\":[]}\";\n\n client.getBooks(barcode_number, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n try {\n JSONArray docs = null;\n if(response != null) {\n if (response.toString().equals(error)) {\n // Deal with invalid barcode\n Log.d(\"ReceievedError\", \"received error\");\n errorText.setText(\"Error: Could not find book \" + barcodeID);\n } else {\n Log.d(\"debug\", \"response = \" + response);\n // Get the docs json array\n docs = response.getJSONArray(\"docs\");\n // Parse json array into array of model objects\n final ArrayList<Book> books = Book.fromJson(docs);\n // retrieve first book out of array\n Book myBook = books.get(0);\n String title = \"Title:\";\n String author = \"Author\";\n String barcode = \"Barcode ID:\";\n\n titleText.setText(myBook.getTitle());\n authorText.setText(myBook.getAuthor());\n preTitleText.setText(title);\n preAuthorText.setText(author);\n preBarcodeText.setText(barcode);\n\n Log.d(\"Picasso\", \"getContext() = \" + getContext());\n\n Picasso.with(getContext()).load(Uri.parse(myBook.getLargeCoverUrl())).error(R.drawable.ic_nocover).into(coverImage);\n }\n }\n } catch (JSONException e) {\n // Invalid JSON format\n Log.d(\"ReceievedError\", \"received error\");\n errorText.setText(\"Error: Received invalid JSON format\");\n }\n }\n });\n }", "public JSONObject getBookJSONObject(String bookTitle) throws BadRequestException {\n\n String apiUrlString = \"https://www.googleapis.com/books/v1/volumes?q=intitle:\" + bookTitle + \"&filter:free-ebooks&printType:books\";\n try{\n HttpURLConnection connection = null;\n // Build Connection.\n try{\n URL url = new URL(apiUrlString);\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(5000); // 5 seconds\n connection.setConnectTimeout(5000); // 5 seconds\n } catch (MalformedURLException e) {\n // Impossible: The only two URLs used in the app are taken from string resources.\n e.printStackTrace();\n } catch (ProtocolException e) {\n // Impossible: \"GET\" is a perfectly valid request method.\n e.printStackTrace();\n }\n int responseCode = connection.getResponseCode();\n if(responseCode != 200){\n connection.disconnect();\n throw new BadRequestException(\"GoogleBooksAPI request failed. Response Code: \" + responseCode);\n\n }\n\n // Read data from response.\n StringBuilder builder = new StringBuilder();\n BufferedReader responseReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n String line = responseReader.readLine();\n while (line != null){\n builder.append(line);\n line = responseReader.readLine();\n System.out.println(line);\n }\n String responseString = builder.toString();\n JSONObject responseJson = new JSONObject(responseString);\n // Close connection and return response code.\n connection.disconnect();\n return responseJson;\n } catch (SocketTimeoutException e) {\n return null;\n } catch(IOException e){\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 325) {\n if (resultCode == Activity.RESULT_OK) {\n String result = data.getStringExtra(\"RESULT_ISBN\");\n if (result.equals(clickedBook.getISBN())){\n //owner confirm receive returned book\n Toast.makeText(getActivity(), \"You successfully received this book\", Toast.LENGTH_SHORT).show();\n currentBookDocRef.update(\"returnDenoted\",\"false\");\n currentBookDocRef.update(\"status\",\"Available\");\n currentBookDocRef.update(\"borrowerID\", FieldValue.delete());\n currentBookDocRef.update(\"borrowerUname\", FieldValue.delete());\n currentBookDocRef.update(\"lat\", FieldValue.delete());\n currentBookDocRef.update(\"lng\", FieldValue.delete());\n borrowerSideBorrowedBookRef.update(\"returnDenoted\",\"false\");\n\n // for borrower,remove book from BorrowedBook\n borrowerSideBorrowedBookRef.delete();\n\n }\n else {\n Toast.makeText(getActivity(), \"The ISBN you scaned does not match the ISBN of the book\", Toast.LENGTH_SHORT).show();\n\n }\n }\n }\n }", "private void startBookingDetails() {\n\t\t\n\t\n\t Intent launchBookingDetails = new Intent(this, BookingDetails.class);\n\t launchBookingDetails.putExtra(\"obj\", obj);\n\t startActivity(launchBookingDetails);\n\n\t }", "com.google.openrtb.OpenRtb.BidRequest getRequest();", "@Override\n protected Void doInBackground(Void... params) {\n\n bjReq = new BookJobRequest(this, this);\n // sysid get from company list response\n bjReq.setSysID(mbook.getSysId() + \"\");\n bjReq.setReqType(\"1\");\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(_context);\n String phone = SharedPreferencesManager.loadStringPreferences(sharedPreferences, MBDefinition.SHARE_PHONE_NUMBER);\n String userName = SharedPreferencesManager.loadStringPreferences(sharedPreferences, MBDefinition.SHARE_NAME);\n bjReq.setPhoneNum(phone);\n bjReq.setPassengerName(userName);\n bjReq.setNumOfPassenger(\"1\");\n bjReq.setNumOfTaxi(\"1\");\n bjReq.setAdviseArrival(\"1\");\n bjReq.setForcedAddressFlag(\"Y\");\n bjReq.setPriority(\"N\");\n bjReq.setHardwareID(Utils.getHardWareId(_context));\n bjReq.setOSPVersion(\"3.0\");\n\n bjReq.setTaxiCompanyID(mbook.getDestID() + \"\");\n\n bjReq.setPickUpTime(mbook.getPickup_time());\n\n if (mbook.getPickup_unit() != null) {\n bjReq.setPickUpUnit(mbook.getPickup_unit());\n }\n\n bjReq.setPickupHouseNum(mbook.getPickup_house_number());\n bjReq.setPickUpStreetName(mbook.getPickup_street_name());\n bjReq.setPickUpDistrict(mbook.getPickup_district());\n bjReq.setPickUpLatitude(Double.toString(mbook.getPickup_latitude()));\n bjReq.setPickUpLongitude(Double.toString(mbook.getPickup_longitude()));\n bjReq.setZipCode(mbook.getPickup_zipCode());//TL-301 this is\n\n if (mbook.getDropoff_unit() != null) {\n bjReq.setDropOffUnit(mbook.getDropoff_unit());\n }\n\n if (mbook.getDropoff_house_number() != null) {\n bjReq.setDropOffHouseNum(mbook.getDropoff_house_number());\n }\n\n if (mbook.getDropoff_street_name() != null) {\n bjReq.setDropOffStreetName(mbook.getDropoff_street_name());\n }\n\n if (mbook.getDropoff_district() != null) {\n bjReq.setDropOffDistrict(mbook.getDropoff_district());\n }\n\n if (Utils.selected_attribute != null) {\n ArrayList<String> temp = new ArrayList<String>();\n for (int i = 0; i < Utils.selected_attribute.size(); i++) {\n temp.add(Utils.selected_attribute.get(i).toString());\n }\n bjReq.setAttributeList(temp);\n }\n\n String remark = mbook.getRemarks();\n for (int i = 0; i < MBDefinition.SPECIAL_CHAR_TO_REMOVE.length; i++) {\n remark = remark.replace(MBDefinition.SPECIAL_CHAR_TO_REMOVE[i], \"\");\n }\n\n bjReq.setRemark(remark);\n\n bjReq.sendRequest(_context.getResources().getString(R.string.name_space), _context.getResources().getString(R.string.url));\n\n return null;\n }", "public void bookResource(View view)\r\n {\n startActivity(new Intent(this, BookResource.class));\r\n // Intent intent_bookResource = new Intent(this, BookResource.class );\r\n // intent_bookResource.putExtra(\"userName\", userName);\r\n // this.startActivity(intent_bookResource);\r\n\r\n\r\n\r\n\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(ReadingDataActivity.this,\n\t\t\t\t\t\tBookInfoNewUIActivity.class);\n\t\t\t\tintent.putExtra(BookInfoNewUIActivity.BookIdKey,\n\t\t\t\t\t\treadingDataM.getBookId());\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n String idbook = request.getParameter(\"book\");\r\n request.setAttribute(\"book\", BookManager.getById(Integer.parseInt(idbook)));\r\n RequestDispatcher rd = request.getRequestDispatcher(\"borrow.jsp\");\r\n rd.forward(request, response);\r\n }", "private void sendRequest() {\n\t\tloading = ProgressDialog.show(this, \"Loading\", \"Please wait...\");\n\n\t\tUri.Builder uri = new Uri.Builder();\n\t\turi.authority(DatabaseContract.PROVIDER_NAME);\n\t\turi.path(Integer.toString(Constants.LOADREQUESTSCMD));\n\t\turi.scheme(\"content\");\n\n\t\tIntent intent = new Intent(this, MyService.class);\n\t\tintent.putExtra(\"ACTION\", \"QUERY\");\n\t\tintent.setData(uri.build());\n\n\t\trequestid = new Date().getTime();\n\t\tintent.putExtra(\"requestid\", requestid);\n\t\tstartService(intent);\n\t}", "private void sendRequestDetails(){\n\n\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, sURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n mTextView.setText(\"Fetching shape...\");\n Log.w(TAG, \"Token verified by server\");\n Log.w(TAG, \"Response: \" + response);\n\n // Send intent to change to logged in activity\n Intent intent = new Intent(getBaseContext(), DisplayShape.class);\n intent.putExtra(\"Shape\", response);\n startActivity(intent);\n finish();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (mLastToken.isEmpty()){\n mTextView.setText(\"Request details incorrect. Please try again.\");\n Log.w(TAG, \"Got empty token!\");\n } else {\n mTextView.setText(\"Unknown server error. Please try again.\");\n Log.w(TAG, \"That didn't work!\");\n error.printStackTrace();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"ApproovToken\", mLastToken);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n mQueue.add(stringRequest);\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Intent intent = new Intent(CuisineActivity.this,BookActivity.class);\n // Intent intent = new Intent(mContext,BookActivity.class);\n intent.putExtra(\"res_id\",restDetails.get(position).getRestId());\n intent.putExtra(\"Title\",restDetails.get(position).getRestName());\n intent.putExtra(\"Email\",restDetails.get(position).getRestEmail());\n intent.putExtra(\"Details\",restDetails.get(position).getRestAddress());\n intent.putExtra(\"thumbnail\",restDetails.get(position).getRestImage());\n intent.putExtra(\"phoneNumber\",restDetails.get(position).getRestPhone());\n intent.putExtra(\"restStatus\",restDetails.get(position).getRestStatus());\n intent.putExtra(\"openingTime\",restDetails.get(position).getRestOpeningTime());\n intent.putExtra(\"closingTime\",restDetails.get(position).getRestClosingTime());\n intent.putExtra(\"Badge\",restDetails.get(position).getRestRating());\n //intent.putExtra(\"thumbnail\",image);\n startActivity(intent);\n }", "@Override\n public void onCreate(Bundle savedInstanceState){\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_returntask);\n\n ListView BookListLV;\n\n BookListLV = findViewById(R.id.RETURNT_LVbooks);\n bookDataList = new ArrayList<>();\n bookAdapter = new ReturningTaskCustomList(this, bookDataList);\n BookListLV.setAdapter(bookAdapter);\n\n db = FirebaseFirestore.getInstance();\n mAuth = FirebaseAuth.getInstance();\n String currentUID = mAuth.getCurrentUser().getUid();\n collectionReference = db.collection(\"users\" + \"/\" + currentUID + \"/requested\");\n\n collectionReference.addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable\n FirebaseFirestoreException error) {\n bookDataList.clear();\n for(QueryDocumentSnapshot doc: queryDocumentSnapshots)\n {\n if (!doc.getData().containsKey(\"blank\")) {\n\n if (doc.getData().get(\"status\").toString().equals(\"borrowed\")) {\n ArrayList<String> owner = new ArrayList<>();\n owner.add(doc.getData().get(\"owners\").toString());\n\n Book book = new Book(doc.getData().get(\"title\").toString(),\n doc.getData().get(\"author\").toString(),\n owner.get(0), doc.getId().replace(\"-\", \"\"));\n //Log.e(\"ISB\", doc.getId());\n //Log.e(\"title\", doc.getData().get(\"title\").toString());\n bookDataList.add(book);\n }\n }\n }\n bookAdapter.notifyDataSetChanged();\n }\n });\n\n BookListLV.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n selectedISBN = bookDataList.get(i).getISBN();\n otherUID = bookDataList.get(i).getOwner();\n Log.e(\"SELECTED BOOK\", bookDataList.get(i).getTitle());\n Log.e(\"SELECTED BOOK ISBN\", bookDataList.get(i).getISBN());\n openScanner();\n\n }\n });\n\n }", "public void returnBook(Copy copy){\n int BID = copy.BID;\n\n //Build URI\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(SCHEME)\n .authority(BASE_URL)\n .appendPath(PATH0)\n .appendPath(PATH1)\n .appendPath(PATH2)\n .appendQueryParameter(PARAM_ACTION, VALUE_ACTION_RETURN)\n .appendQueryParameter(PARAM_BID, Integer.toString(BID))\n .appendQueryParameter(PARAM_UID, Integer.toString(VALUE_UID))\n .appendQueryParameter(PARAM_PASSWORD, VALUE_PASSWORD)\n .build();\n\n String urlString = builder.toString();\n\n restartOnFinished = true;\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n prefEditor.remove(\"ALARM\" + BID + \"-TO\");\n prefEditor.remove(\"ALARM\" + BID + \"-BODY\");\n prefEditor.remove(\"ALARM\" + BID + \"-TITLE\");\n prefEditor.remove(\"ALARM-BID\" + BID);\n prefEditor.remove(\"ALARM\" + BID + \"-TYPE\");\n prefEditor.remove(\"ALARM\" + BID + \"-RING-TIME\");\n prefEditor.apply();\n\n downloadJSON(urlString);\n }", "private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }", "private void getCodeBookForPayBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws IOException {\n\t\t\n\t\tString bookItemId = (String) session.getAttribute(\"bookItemIdForPayBookPart\");\n\t\t//Get value properties from bookItem variable\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemId, BookItem.BOOK_ITEM_ID);\n\t\t//Set attribute to display to user\n\t\t\n\t\tsession.setAttribute(\"codeBookPayBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_CODE]);\n\t\tsession.setAttribute(\"requestFromBookItem\", \"getBookTitleIdForPayBookController\");\n\t\t//Send redirect to BookTitleController\n\t\t\n\t\tresponse.sendRedirect(\"BookTitleController\");\n\t\t\n\t\treturn;\n\t}", "public void getBookDetails() {\n\t}", "public JSONObject book_details(int book_id) throws JSONException {\n startSession();\n\n Query query = session.createQuery(\"from Book where id = :i\");\n query.setParameter(\"i\", book_id);\n\n Book book = (Book) query.uniqueResult();\n User owner = (User) book.getOwner();\n JSONObject book_info = new JSONObject(book.getBook_info());\n JSONObject response = new JSONObject();\n\n response.put(\"success\",\"true\");\n response.put(\"book\", book.getName());\n response.put(\"author\", book.getAuthor());\n response.put(\"rent\", book.getRent());\n response.put(\"deposit\", book.getDeposit());\n response.put(\"genre\", book.getGenre());\n response.put(\"times_rented\", book.getTimes_rented());\n response.put(\"available\",book.isAvailable());\n\n response.put(\"print\", book_info.getString(\"print\"));\n response.put(\"condition\", book_info.getString(\"condition\"));\n response.put(\"year_bought\", book_info.getString(\"year_bought\"));\n response.put(\"review\", book_info.getString(\"review\"));\n\n response.put(\"owner_id\", owner.getId());\n response.put(\"owner_name\", owner.getFull_name());\n response.put(\"owner_location\", owner.getLocation());\n response.put(\"owner_contact\", owner.getContact_no());\n\n endSession();\n return response;\n }", "public void requestGetLikeItem(String bravoID, final IRequestListener iRequestListener) {\r\n int _loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin _sessionLogin = BravoUtils.getSession(mContext, _loginBravoViaType);\r\n String userId = _sessionLogin.userID;\r\n String accessToken = _sessionLogin.accessToken;\r\n String url = BravoWebServiceConfig.URL_GET_LIKE_ITEM.replace(\"{User_ID}\", userId).replace(\"{Bravo_ID}\", bravoID);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsGetBravo(userId, accessToken);\r\n AsyncHttpGet getLikeItemRequest = new AsyncHttpGet(mContext, new AsyncHttpResponseProcess(mContext, null) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"requestLikingCheck:\" + response);\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObGetLikeItem mObGetLikeItem;\r\n mObGetLikeItem = gson.fromJson(response.toString(), ObGetLikeItem.class);\r\n if (mObGetLikeItem == null)\r\n return;\r\n else {\r\n iRequestListener.onResponse(response);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"cannot get like item\");\r\n }\r\n }, params, true);\r\n getLikeItemRequest.execute(url);\r\n }", "public void requestToGetBravoForSpotDetail(Context context, String bravoID, final IRequestListener iRequestListener, FragmentBasic fragmentBasic) {\r\n int _loginBravoViaType = BravoSharePrefs.getInstance(context).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin _sessionLogin = BravoUtils.getSession(context, _loginBravoViaType);\r\n String userId = _sessionLogin.userID;\r\n String accessToken = _sessionLogin.accessToken;\r\n String url = BravoWebServiceConfig.URL_GET_BRAVO.replace(\"{Bravo_ID}\", bravoID);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsGetBravo(userId, accessToken);\r\n AsyncHttpGet getBravoRequest = new AsyncHttpGet(context, new AsyncHttpResponseProcess(context, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObGetBravo obGetBravo;\r\n obGetBravo = gson.fromJson(response.toString(), ObGetBravo.class);\r\n AIOLog.d(\"obGetAllBravoRecentPosts:\" + obGetBravo);\r\n if (obGetBravo == null)\r\n return;\r\n else {\r\n iRequestListener.onResponse(response);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"Cannot get the bravo object\");\r\n }\r\n }, params, true);\r\n getBravoRequest.execute(url);\r\n }", "@Override\n\tpublic void getByID(String ID) {\n\t\tString endpoint = \"bookinfo/get.php\";\n\t\tHashMap<String, String> dict = new HashMap<>();\n\t\tdict.put(\"bookID\", ID);\n\t\ttry {\n\t\t\tHashMap<String, Object> result = APIClient.get(BookInfo.host + endpoint, dict);\n\t\t\tif ( result.get(\"status_code\").equals(\"Success\") ) {\n\t\t\t\tJSONObject o = (JSONObject) result.get(\"result\");\n\t\t\t\tthis.title = o.getString(\"title\");\n\t\t\t\tthis.author = o.getString(\"author\");\n\t\t\t\tthis.publisher = o.getString(\"publisher\");\n\t\t\t\tthis.isbn = o.getString(\"isbn\");\n\t\t\t\tthis.bookID = o.getString(\"bookID\");\n\t\t\t\tthis.valid = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.valid = false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void launchLibraryActivity(View view){\n// joker=new Joker();\n// Intent myIntent = new Intent(getApplicationContext(), LibraryActivity.class);\n// myIntent.putExtra(\"key\",joker.getJoke());\n// startActivity(myIntent);\n new JokesFetchAsyncTask().execute(new Pair<Context, String>(this, \"Manfred\"));\n//\n\n// new JokesFetchAsyncTask().execute(getApplicationContext(),new Joker().getJoke());\n }", "private void loadBuyer() {\n swipeLayout.setRefreshing(true);\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, apiUrl, null, response -> {\n\n try {\n if(!response.getBoolean(\"status\")) {\n alert.setMessage(response.getJSONObject(\"data\").getString(\"message\"))\n .show();\n } else {\n JSONObject buyer = response.getJSONObject(\"data\");\n fieldName.setText(buyer.getString(\"name\"));\n fieldPhone.setText(buyer.getString(\"phone\"));\n fieldAddress.setText(buyer.getString(\"address\"));\n fieldVillage.setText(buyer.getString(\"village\"));\n fieldDistrict.setText(buyer.getString(\"district\"));\n fieldCity.setText(buyer.getString(\"city\"));\n fieldProvince.setText(buyer.getString(\"province\"));\n fieldPos.setText(buyer.getString(\"postal_code\"));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n alert.setMessage(e.getMessage()).show();\n }\n\n swipeLayout.setRefreshing(false);\n\n }, error -> {\n swipeLayout.setRefreshing(false);\n }) {\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return RequestGlobalHeaders.get(getApplicationContext());\n }\n };\n\n requestQueue.add(request);\n }", "public void requestToPutLike(String bravoID, final IRequestListener iRequestListener, FragmentBasic fragmentBasic) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"Bravo_ID\", bravoID);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_PUT_LIKE.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPut putLikeItem = new AsyncHttpPut(mContext, new AsyncHttpResponseProcess(mContext, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putFollow :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObPutLike mObPutLike;\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n mObPutLike = gson.fromJson(response.toString(), ObPutLike.class);\r\n iRequestListener.onErrorResponse(mObPutLike.error);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"Cannot like this spot\");\r\n }\r\n }, params, true);\r\n putLikeItem.execute(url);\r\n }", "public void parseJSON(JSONObject json){\n try {\n\n int success = json.getInt(KEY_SUCCESS);\n if(success == 0){\n //An error occurred - Server will handle message\n String message = json.getString(KEY_MESSAGE);\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }else if(success == 1){\n //Book Info successfully retrieved\n //Get detailed book info\n JSONObject jsonResponse = json.getJSONObject(KEY_JSON);\n String title = jsonResponse.getString(KEY_TITLE);\n String subTitle = jsonResponse.getString(KEY_SUB_TITLE);\n String subject = jsonResponse.getString(KEY_SUBJECT);\n String description = jsonResponse.getString(KEY_DESCRIPTION);\n String authors = jsonResponse.getString(KEY_AUTHORS);\n //String bookDetails = jsonResponse.getString(KEY_BOOK_DETAILS);\n String thumbnail = jsonResponse.getString(KEY_THUMBNAIL);\n int copies = jsonResponse.getInt(KEY_COPIES);\n String ISBN10 = jsonResponse.getString(KEY_ISBN10);\n String ISBN13 = jsonResponse.getString(KEY_ISBN13);\n int numberRatings = jsonResponse.getInt(KEY_NUMBER_RATINGS);\n String averageRating = jsonResponse.getString(KEY_AVG_RATING);\n int availableCopies = jsonResponse.getInt(KEY_AVAILABLE_COPIES);\n JSONArray copyDetails = jsonResponse.getJSONArray(KEY_COPY_DETAILS);\n JSONArray reviews = jsonResponse.getJSONArray(KEY_REVIEWS);\n\n //Create book object\n currentBook = new Book(Float.valueOf(averageRating), numberRatings, copies, availableCopies, VALUE_GID, title, subTitle, null, subject, description, authors, thumbnail, null, ISBN10, ISBN13);\n\n //Get UID to check if there are comments by current user. Also assume that there are no reviews initially\n SharedPreferences sharedPref = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n VALUE_UID = sharedPref.getInt(\"UID\", -2);\n\n //Loop through copy details\n for(int i = 0; i < copyDetails.length(); i++){\n JSONObject currentCopy = (JSONObject)copyDetails.get(i);\n\n int BID = currentCopy.getInt(KEY_BID);\n String checkoutTime = currentCopy.getString(KEY_CHECKOUT_TIME);\n String returnTime = currentCopy.getString(KEY_RETURN_TIME);\n int waitingListSize = currentCopy.getInt(KEY_WAITLIST_SIZE);\n int UID = currentCopy.getInt(KEY_UID);\n\n Copy curCopy = new Copy(BID, waitingListSize, checkoutTime, returnTime);\n currentBook.copies.add(curCopy);\n if (VALUE_UID == UID) {\n mCheckout.setText(\"Return\");\n checkedOut = true;\n mCopy = curCopy;\n break;\n }else{\n checkedOut = false;\n mCheckout.setText(getResources().getString(R.string.checkout));\n }\n\n\n\n }\n\n //Loop through Reviews\n for(int i = 0; i < reviews.length(); i++){\n JSONObject currentReview = (JSONObject)reviews.get(i);\n int CID = currentReview.getInt(KEY_CID);\n int rating = currentReview.getInt(KEY_RATING);\n String timestamp = currentReview.getString(KEY_COMMENT_TIME);\n String commentTitle = currentReview.getString(KEY_COMMENT_TITLE);\n String comment = currentReview.getString(KEY_COMMENT);\n String name = currentReview.getString(KEY_NAME);\n int UID = currentReview.getInt(KEY_UID);\n\n Review curReview = new Review(CID, UID, rating, comment, commentTitle, timestamp, name);\n\n //If the current user already added a review, display it at the top.\n if(UID == VALUE_UID) {\n currentBook.reviews.add(0, curReview);\n }else {\n currentBook.reviews.add(curReview);\n }\n }\n retrieveDetailedImage();\n displayBookInfo();\n }else if(success == 11){\n //Comment successfully added\n boolean authSuccess = json.getBoolean(KEY_AUTH_SUCCESS);\n Log.i(\"LoginActivity\", \"AUTH SUCCESS: \" + authSuccess);\n if(authSuccess){\n String message = json.getString(KEY_MESSAGE);\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n //Updates new info\n Log.i(\"LoginActivity\", \"UPDATE INITIATED\");\n retrieveDetailedBookInfo();\n }else{\n ErrorUtils.errorDialog(this, \"Authentication Error\", \"The user's credentials could not be authenticated, so the review was not uploaded. Please try logging out and baack in.\");\n }\n }else if(success == 14){\n //Book successfully checked out\n int BID = json.getInt(KEY_BID);\n SharedPreferences.Editor prefEditor = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE).edit();\n prefEditor.putInt(\"BOOK\" + BID, BID);\n prefEditor.commit();\n\n String message = json.getString(KEY_MESSAGE);\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n\n checkedOut = true;\n mCheckout.setText(\"Return\");\n\n configureReturnAlarm(BID);\n\n if(restartOnFinished){\n restartOnFinished = false;\n refreshScreen();\n }\n\n }else if(success == 15){\n //Successfully added to wait list\n int BID = json.getInt(KEY_BID);\n SharedPreferences.Editor prefEditor = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE).edit();\n prefEditor.putInt(\"WAITLIST\" + BID, BID);\n prefEditor.commit();\n\n String message = json.getString(KEY_MESSAGE);\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n\n if(restartOnFinished) {\n restartOnFinished = false;\n refreshScreen();\n }\n\n }else if(success == 16){\n //Successfully returned\n int BID = json.getInt(KEY_BID);\n SharedPreferences pref = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor prefEditor = pref.edit();\n prefEditor.remove(\"BOOK\" + BID);\n prefEditor.commit();\n\n String message = json.getString(KEY_MESSAGE);\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n checkedOut = false;\n mCheckout.setText(\"Checkout\");\n\n if(restartOnFinished) {\n restartOnFinished = false;\n refreshScreen();\n }\n\n Log.i(\"LoginActivity\", \"SUCCESS RETURNED\");\n }\n }catch(JSONException JSONE){\n JSONE.printStackTrace();\n ErrorUtils.errorDialog(this, \"Malformed JSON Error\", \"A malformed response was recieved from the server. Please try again later.\");\n }\n }", "private void getBikeModel(final Booking booking, final View view, final ArrayList<Booking> trackingDaos, final Context context) {\n\n try {\n final String vehicleId = booking.getVehicleId().trim();\n //query to get information of the registered bike\n db.collection(\"my_vehicle\").document(booking.getVehicleId())\n .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n Vehicle vehicle = documentSnapshot.toObject(Vehicle.class);\n String mVehicleId = documentSnapshot.getId();\n\n if (mVehicleId.equals(vehicleId)) {\n booking.setModel(vehicle.getManufacturer() + \" \" + vehicle.getModel());\n }\n //variable initilizations to pass into booking constructor\n long bookId = booking.getBookingID();\n String sType = booking.getServiceType();\n String makeNModel = booking.getModel();\n String status = booking.getStatus();\n String message = booking.getMessage();\n Date dateOfService = booking.getDateOfService();\n String workshopId = booking.getWorkshopId();\n String category = booking.getRepairCategory();\n String description = booking.getRepairDescription();\n String messageSeen = booking.getMessageSeen();\n String viewColor = null;\n\n if (status.equals(\"accepted\") || status.equals(\"progress\")) {\n viewColor = String.valueOf(context.getResources().getColor(R.color.green));\n }\n if (status.equals(\"completed\")) {\n viewColor = String.valueOf(context.getResources().getColor(R.color.red));\n }\n //adding all the variables\n trackingDaos.add(new Booking(bookId, sType, viewColor, makeNModel, message\n , status, messageSeen, category, description, workshopId, dateOfService, \"\"));\n\n //Tracking adapter initilizations, setup and passing values to the adapter\n recyclerView = view.findViewById(R.id.tracking_recycler_view);\n recyclerView.setHasFixedSize(true);\n layoutManager = new LinearLayoutManager(getActivity());\n trackingAdapter = new TrackingAdapter(trackingDaos);\n\n progressBar.setVisibility(View.GONE);\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setAdapter(trackingAdapter);\n //tracking recylcer view on item click listener\n trackingAdapter.setOnItemClickListener(new TrackingAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(int position) {\n\n Booking data = trackingDaos.get(position);\n //values passed into the bundler object to pass data to next ativity\n Bundle bundle = new Bundle();\n bundle.putLong(\"bookingID\", data.getBookingID());\n bundle.putString(\"bookingStatus\", data.getStatus());\n bundle.putString(\"serviceType\", data.getServiceType());\n bundle.putString(\"serviceDate\", String.valueOf(data.getDateOfService()));\n bundle.putString(\"model\", data.getModel());\n bundle.putString(\"workshopID\", data.getWorkshopId());\n bundle.putString(\"repairCat\", data.getRepairCategory());\n bundle.putString(\"repairDesc\", data.getRepairDescription());\n bundle.putString(\"message\", data.getMessage());\n\n //display tracking summary\n TrackingViewDetails trackingViewDetails = new TrackingViewDetails();\n trackingViewDetails.setArguments(bundle);\n trackingViewDetails.show(getActivity().getSupportFragmentManager(), \"View Details\");\n\n }\n });\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //log error\n Log.d(TAG, e.toString());\n }\n });\n }catch (Exception e){\n e.printStackTrace();\n Log.d(TAG, e.toString());\n }\n }", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "public void onClick(View v) {\n int bookID = MySQLiteHelper.addBook(currentBook);\n ArrayList<String> authors = currentBook.getAllAuthors();\n if (authors.isEmpty()){\n\n }\n else {\n for(String author : authors){\n // Link current book with all authors\n MySQLiteHelper.addAuthor(author);\n int authorID = MySQLiteHelper.getAuthorID(author);\n MySQLiteHelper.linkBookWithAuthor(bookID, authorID);\n }\n }\n // Then go back to book list\n startActivity(new Intent(BookDetailActivity.this, BookListViewActivity.class));\n }", "private void handleRequestPlacingBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString bookItemId = (String) session.getAttribute(\"valueBookItemIdStore\");\n\t\t//Get value of book item\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemId, BookItem.BOOK_ITEM_ID);\n\t\t//Set some attribute to session\n\t\t\n\t\tsession.setAttribute(\"nameBookResultPlaceBook\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE]);\n\t\t//Create dispatcher and forward to main.jsp\n\t\t\n\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\tdispatcher.forward(request, response);\n\t\t\n\t\treturn;\n\t}", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "public void inviteFriend() {\n ProgressDialog progressDialog = new ProgressDialog(getContext());\n progressDialog.setCancelable(false);\n progressDialog.setMessage(\"Loading..\");\n progressDialog.show();\n String url = APIBaseURL.inviteFriend;\n\n CustomVolleyRequest customVolleyRequest = new CustomVolleyRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n JSONObject jsonObject = new JSONObject(response);\n\n JSONObject dataObject = new JSONObject();\n if (jsonObject.has(\"data\")) {\n dataObject = jsonObject.getJSONObject(\"data\");\n }\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_SEND);\n\n intent.setType(\"text/plain\");\n intent.putExtra(Intent.EXTRA_TEXT, \"Join me on FoodyHive, online food platform, to order authentic home cooked food from expert home chefs around you. Enter my code \" + inviteCode.getText().toString() + \" to earn back 50 points on your first purchase!\\nDownload Foodyhive Now:\\n\" + dataObject.optString(\"description\") + \"\\n\" + \"https://play.google.com/store/apps/details?id=com.foodyHive\");\n startActivity(Intent.createChooser(intent, \"Share\"));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n //Toast.makeText(getContext(), \"Please try again\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_SEND);\n\n intent.setType(\"text/plain\");\n intent.putExtra(Intent.EXTRA_TEXT, \"Join me on FoodyHive, online food platform, to order authentic home cooked food from expert home chefs around you. Enter my code \" + inviteCode.getText().toString() + \" to earn back 50 points on your first purchase!\\nDownload Foodyhive Now:\\n\" + \"https://play.google.com/store/apps/details?id=com.foodyHive\");\n startActivity(Intent.createChooser(intent, \"Share\"));\n }\n }, getContext());\n\n ApplicationController.getInstance().addToRequestQueue(customVolleyRequest, \"get_referral_history_taq\");\n }", "private void getBookItemInformation(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString idBookItem = request.getParameter(\"bookItemIdGetBookManager\");\n\t\tString url = \"/main.jsp\";\n\t\t\n\t\tif(this.bookItem.getValueInformations(idBookItem, BookItem.BOOK_ITEM_CODE)) {\n\t\t\t//Set value for properties of edit book part\n\t\t\t\n\t\t\tsession.setAttribute(\"imageBookResultLinkEditBookManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_IMAGE]);\n\t\t\tsession.setAttribute(\"nameEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE]);\n\t\t\tsession.setAttribute(\"codeEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_CODE]);\n\t\t\tsession.setAttribute(\"authorEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_AUTHOR]);\n\t\t\tsession.setAttribute(\"dayPublisherEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_DAY_PUBPLICATION]);\n\t\t\tsession.setAttribute(\"publisherEditUpdateBookManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_PUBLISHER]);\n\t\t\tsession.setAttribute(\"summaryEditUpdateBookManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_SUMMARY]);\n\t\t\t//Set style for display part edit book\n\t\t\t\n\t\t\tsession.setAttribute(\"styleResultNotExistBookManager\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleResultExistBookManager\", \"display: block;\");\n\t\t\t//Redirect to BookTitleController\n\t\t\t\n\t\t\tsession.setAttribute(\"requestFromBookItem\", \"getBookTitleInformation\");\n\t\t\tsession.setAttribute(\"bookItemId\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\t\n\t\t\tresponse.sendRedirect(\"BookTitleController\");\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t//Set style for display part error\n\t\t\t\n\t\t\tsession.setAttribute(\"styleResultNotExistBookManager\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleResultExistBookManager\", \"display: none;\");\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(url);\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "private void buildIntent() {\n ReportLogic.report(this, \"POST\", mInfo.c_rpt, 0, null);\n Intent intent = new Intent();\n Bundle bundle = new Bundle();\n bundle.putString(PKG_NAME, mInfo.href);\n bundle.putString(APP_NAME, mInfo.name);\n intent.putExtra(DetailActivity.DETAIL, bundle);\n intent.setClass(this, DetailActivity.class);\n startActivity(intent);\n }", "public void getEventDetails(String eventId,String venueId,String eventName,String venue,String date,String category){\n String url = \"https://eng-empire-315722.wl.r.appspot.com/eventDetails?event=\"+eventId;\n System.out.println(url);\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n System.out.println(response);\n\n// res_list.add(response.toString());\n Intent intent = new Intent(context, EventDetails.class);\n intent.putExtra(\"eventdetails\", response.toString());\n intent.putExtra(\"eventId\",eventId);\n intent.putExtra(\"venueId\", venueId);\n intent.putExtra(\"venue\", venue);\n intent.putExtra(\"date\", date);\n intent.putExtra(\"category\", date);\n intent.putExtra(\"eventname\", eventName);\n context.startActivity(intent);\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n\n }\n });\n mQueue.add(request);\n }", "public void book(View view){\n Intent intent = new Intent(this, View_Booked_ItinerariesActivity.class);\n intent.putExtra(MainActivity.USER, email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "public void submit(View v) {\n nam = name.getText().toString();\n phon = phone.getText().toString();\n bookname = bname.getText().toString();\n authorname = aname.getText().toString();\n edition = edi.getText().toString();\n price = pric.getText().toString();\n subject = sub.getText().toString();\n numberofbooks = num.getText().toString();\n rating = r.getRating();\n //TODO: Add this object into the SellingBook model class and retrofit it\n MyAsyncTask task = new MyAsyncTask();\n task.execute(\"\");//url\n\n }", "@Override\r\n\tpublic void onSearchSelected(String book, int chapter, int verse) {\r\n\t\t\tBibleReaderFragment viewer = (BibleReaderFragment) getSupportFragmentManager()\r\n\t\t .findFragmentById(R.id.reader_fragment);\r\n\t\r\n\t\t \tIntent i = new Intent();\r\n\t\t \ti.putExtra(LiteralWord.VERSES_BOOK_ROWID,book);\r\n\t\t i.putExtra(LiteralWord.VERSES_CHAPTERS_ROWID, chapter);\r\n\t\t i.putExtra(LiteralWord.VERSES_NUM_ROWID, verse);\r\n\t\t i.putExtra(SEARCH_TAG, true);\r\n\t\t viewer.handleIntent(i);\r\n\t\t\r\n\t}", "public void useArguments(Bundle arguments) {\n // we retain this instance, so we don't need to fetch the data twice.\n if (this.bookId < 0) {\n translateArguments(arguments);\n\n Uri getBookUri = ContentUris.withAppendedId(MiniLibrisContract.Books.CONTENT_URI, this.bookId);\n Cursor bookCursor = this.getActivity().getContentResolver().query(getBookUri, MiniLibrisContract.Books.ALL_FIELDS, null, null, null);\n if (bookCursor.getCount() > 0) {\n bookCursor.moveToFirst();\n title = bookCursor.getString(bookCursor.getColumnIndex(MiniLibrisContract.Books.TITLE));\n author = bookCursor.getString(bookCursor.getColumnIndex(MiniLibrisContract.Books.AUTHOR));\n year = bookCursor.getInt(bookCursor.getColumnIndex(MiniLibrisContract.Books.YEAR));\n publisher = bookCursor.getString(bookCursor.getColumnIndex(MiniLibrisContract.Books.PUBLISHER));\n }\n bookCursor.close();\n Uri getReservationUri = MiniLibrisContract.Reservations.CONTENT_URI;\n // int userId = ((BookDetailFragmentListener) getActivity()).getUserId();\n Cursor reservationCursor = this.getActivity().getContentResolver().query(getReservationUri, MiniLibrisContract.Reservations.ALL_FIELDS, \"is_lent=? and book_id=?\", new String[] {\"1\",String.valueOf(this.bookId)}, null);\n if (reservationCursor.getCount() > 0) {\n reservationCursor.moveToFirst();\n endsDate = reservationCursor.getString(reservationCursor.getColumnIndex(MiniLibrisContract.Reservations.ENDS));\n }\n reservationCursor.close();\n }\n\n }", "public void searchForBooks(String query) {\n\n\n BooksAPI booksAPI = ServiceGenerator.getBooksAPI();\n Call<GBookList> call = booksAPI.getBook(query);\n call.enqueue(new Callback<GBookList>() {\n @EverythingIsNonNull\n @Override\n public void onResponse(Call<GBookList> call, Response<GBookList> response) {\n if (response.isSuccessful()) {\n //response.body() returns GBookList\n //from json format to object\n searchedBooks.setValue(response.body());\n\n }\n }\n @EverythingIsNonNull\n @Override\n public void onFailure(Call<GBookList> call, Throwable t) {\n Log.i(\"Retrofit \", \"Retrieving from google.books.com failed\");\n }\n });\n }", "@Override\n\t\t\tpublic void onGetBookIdsStart() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString string = intent.getExtras().getString(Constants.INTENT_RECEIVER);\n\t\t\t\n\t\t\t\n\t\t\tif (string.equals(Constants.LOADING)) {\n\t\t\t\tcode = intent.getStringExtra(\"code\");\n\t\t\t\tbookCurrent = intent.getIntExtra(\"current\", 0);\n\t\t\t\tfileCurrent = intent.getIntExtra(\"fileCurrent\", 0);\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\t\t\t\n\t\t\tif (string.equals(Constants.PHONE_DOWNLOAD)) {\n\t\t\t\tMyLog.d(TAG, \"here is download receiver******************* \");\n\t\t\t\tgetData();\n\t\t\t\tcandelete =-1;\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}", "private void fetchIncomingData() {\n Bundle bundle = getIntent().getExtras();\n if (bundle.containsKey(\"TAX_ID\") && bundle.containsKey(\"TAX_NAME\")) {\n INCOMING_TAX_NAME = bundle.getString(\"TAX_NAME\");\n INCOMING_TAX_ID = bundle.getString(\"TAX_ID\");\n if (INCOMING_TAX_ID != null) {\n new fetchTaxDetails().execute();\n } else {\n //TODO: SHOW AN ERROR\n }\n } else {\n //TODO: SHOW AN ERROR\n }\n }", "public void retrieveDetailedImage(){\n //Build request for raw JSON data\n ImageRequest imageRequest = new ImageRequest(currentBook.thumbnail, new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap image) {\n //Image is returned\n mBackgroundImage.setImageBitmap(image);\n mBookImage.setImageBitmap(image); // Sets cover in case book was called from context where no cover provided\n }\n }, 5000, 5000, ImageView.ScaleType.CENTER, Bitmap.Config.RGB_565,\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //Print error\n ErrorUtils.errorDialog(BookDetailsActivity.this, \"Could not connect to the server\", \"Could not connect to the server at this time, please try again later.\");\n }\n });\n //Start the JSON request\n queue.add(imageRequest);\n }", "public void acquire(Book book)\r\n\t {\r\n\t \tbooks.put(book.getCallNumber(), book);\r\n\t }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n HttpSession session = request.getSession();\n\n //System.out.println(\"----------------------------------------getQueryString----------\" + request.getQueryString());\n //System.out.println(\"----------------------------------------getRequestURI----------\" + request.getRequestURI());\n\n String ParamPath = request.getQueryString();\n\n if(ParamPath == null){\n System.out.println(\"ParamPath == null\");\n request.setAttribute(\"books\", (bookServiceBean.getAllBooks()));\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/jsp/bookList.jsp\");\n dispatcher.forward(request, response);\n }\n else {\n String[] splitQuery = ParamPath.split(\"=\");\n if (splitQuery[1].toLowerCase().equals(\"asc\") || splitQuery[1].toLowerCase().equals(\"desc\")) {\n System.out.println(\"PATHPARAM !==== NULL\");\n request.setAttribute(\"books\", (bookServiceBean.getAllBookOrderByYear(splitQuery[1].toUpperCase())));\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/jsp/bookList.jsp\");\n dispatcher.forward(request, response);\n }\n else if(splitQuery[0].toLowerCase().startsWith(\"idpanier\"))\n {\n String id_book = splitQuery[0].split(\"-\")[1];\n System.out.println(\"---------------------------------------- CHECKED ----------\" + checkPanier(session, splitQuery[0]));\n bookServiceBean.updatebookRetr(Long.parseLong(id_book));\n System.out.println(\"----------------------------------------getQueryString----------\" + request.getQueryString());\n request.setAttribute(\"books\", (bookServiceBean.getAllBooks()));\n //session.setAttribute(splitQuery[0],splitQuery[1]);\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/jsp/bookList.jsp\");\n dispatcher.forward(request, response);\n }else if(splitQuery[0].toLowerCase().startsWith(\"getatt\")){\n Enumeration e = session.getAttributeNames();\n while (e.hasMoreElements()) {\n String name = (String) e.nextElement();\n if(name.startsWith(\"idpanier\")) {\n long idBook =Long.parseLong(name.split(\"-\")[1]);\n int quatite = Integer.parseInt((String)session.getAttribute(name));\n String title= bookServiceBean.getBookById(idBook).getTitle();\n System.out.println(title + \" - ===================>: \" + quatite + \"<BR>\");\n Commande commande = new Commande(title, quatite);\n session.setAttribute(\"panier\"+idBook,commande);\n\n }\n }\n request.setAttribute(\"panier\", (bookServiceBean.getAllBooks()));\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/jsp/valideCommande.jsp\");\n dispatcher.forward(request, response);\n }else{\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/jsp/bookList.jsp\");\n dispatcher.forward(request, response);\n }\n }\n\n\n }", "@Override\n public void onClick(View v) {\n int position = getAdapterPosition();\n Book selectBook = books.get(position);\n Intent intent = new Intent(itemView.getContext(),BookDetail.class);\n intent.putExtra(\"Book\", selectBook);\n itemView.getContext().startActivity(intent);\n }", "protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tLong id = Long.parseLong(req.getParameter(\"making_friend_id\"));\n\t\tMakingFriend makingFriend = ObjectifyService.ofy().load().type(MakingFriend.class).id(id).now();\n\t\tmakingFriend.setStatus(\"1\");\n\t\tObjectifyService.ofy().save().entity(makingFriend);\n\t\tresp.sendRedirect(\"list_friend_sending_request.jsp\");\n\t}", "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 }", "private void getBookItemIdForPlacingBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString bookItemCode = (String) session.getAttribute(\"bookItemCodeFromPlacingBook\");\n\t\t//Get value properties from bookItem\n\t\t\n\t\tthis.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID] = \"\";\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemCode, BookItem.BOOK_ITEM_CODE);\n\t\t\n\t\tif(this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID].equals(\"\")) {\n\t\t\t//Display error \n\t\t\t\n\t\t\tsession.setAttribute(\"styleErrorPlaceBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleSuccessResutPlaceBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver15Days\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver10BooksLending\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorSameBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorNotExistBookItem\", \"display: block;\");\n\t\t\tsession.setAttribute(\"errorNotAvaiablePlaceBook\", \"display: none;\");\n\t\t\t//Create dispatcher and forward to main.jsp\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t} else {\n\t\t\t//Set some attributes\n\t\t\t\n\t\t\tsession.setAttribute(\"bookItemIdFromController\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\tsession.setAttribute(\"typeRequestToLendingController\", \"returnGetBookItemFromBookItemController\");\n\t\t\t//Send direct to LendingBookController\n\t\t\t\n\t\t\tresponse.sendRedirect(\"LendingController\");\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n Review reviewsarapan = this.list.get(position);\n\n Intent intent = new Intent(ctx, ReviewDetails.class);\n intent.putExtra(\"detail_id\", reviewsarapan.getId_review());\n intent.putExtra(\"detail_gambar\", \"http://192.168.1.36/Pampo/gambar_detail/\"+reviewsarapan.getGambar_detail());\n System.out.println(\"Gambar : \"+ reviewsarapan.getGambar_detail());\n intent.putExtra(\"detail_judul\", reviewsarapan.getJudul_review());\n intent.putExtra(\"detail_deskripsi\", reviewsarapan.getDeskripsi_review());\n this.ctx.startActivity(intent);\n }", "@Override\n public void onClick(View view)\n {\n Intent intent = new Intent(BoilerRoom.this, ScanQR.class);\n //intent.putExtra( \"id\", tvmechID.getText().toString() );\n startActivity(intent);\n }", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "public void book(long bookRecordId, boolean isBackground) {\n if (!NetworkChecker.isConnected(activity)) {\n SnackbarHelper.show(parentView, activity.getString(R.string.network_not_connected), Snackbar.LENGTH_LONG);\n return;\n }\n Scheduler scheduler = isBackground ? Schedulers.io() : AndroidSchedulers.mainThread();\n Observable.just(bookRecordId)\n .map(id -> {\n BookRecordModel.getInstance().book(activity, id, this);\n return null;\n })\n .subscribeOn(scheduler)\n .doOnSubscribe(this::showProgressDialog)\n .subscribeOn(AndroidSchedulers.mainThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe();\n }", "@Override\n\t\t\t\tpublic void onGetBookIdsStart() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onGetBookIdsStart() {\n\t\t\t\t\t\n\t\t\t\t}", "private void sendData() {\r\n //PACK DATA IN A BUNDLE\r\n Bundle bundle = new Bundle();\r\n bundle.putString(\"FACY\", shopN);\r\n //PASS OVER THE BUNDLE TO OUR FRAGMENT\r\n CustomerReview myFragment1 = new CustomerReview();\r\n myFragment1.setArguments(bundle);\r\n\r\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n final Book books = book.get(position);\n\n //Loading image from url\n imageLoader = CustomRequest.getInstance(context).getImageLoader();\n imageLoader.get(books.getImageUrl(), ImageLoader.getImageListener(holder.imageView, R.drawable.image, android.R.drawable.ic_dialog_alert));\n\n //Showing data on the views\n holder.imageView.setImageUrl(books.getImageUrl(), imageLoader);\n holder.textViewEmail.setText(books.getEmail());\n holder.textViewName.setText(books.getName());\n holder.textViewBookName.setText(books.getBookName());\n holder.textViewPublisher.setText(books.getPublisher());\n holder.textViewDepart.setText(books.getDepartment());\n holder.textViewCondition.setText(books.getCondition());\n holder.textViewSelling.setText(books.getSelling());\n holder.textViewLoc.setText(books.getLocation());\n holder.textViewSold.setText(books.getSell());\n\n holder.buy1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n /// button click event\n\n // Intent i = new Intent(context, HomeActivity.class);\n // context.startActivity(i);\n\n // Intent call = new Intent(Intent.ACTION_CALL);\n // call.setData(Uri.parse(\"tel:9820111067\"));\n // callIntent.setData(Uri.parse(\"tel:\" + phone.getText().toString()));\n // context.startActivity(call);\n try {\n Intent callIntent = new Intent(Intent.ACTION_CALL);\n callIntent.setData(Uri.parse(\"tel:\" + books.getBuy()));\n context.startActivity(callIntent);\n\n } catch (ActivityNotFoundException e) {\n Log.e(\"helloandroid dialing \", \"Call failed\", e);\n }\n }\n });\n }", "@Override\n\t\t\t\tpublic void onGetBookIdsStart() {\n\t\t\t\t\tif (bookCartInfoListener != null) {\n\t\t\t\t\t\tbookCartInfoListener.onStart();\n\t\t\t\t\t}\n\t\t\t\t}", "public void onBookEvent(final BookStatusEvent event) {\n if (this.feed.containsID(event.book())) {\n LOG.debug(\"update: updated feed entry\");\n UIThread.runOnUIThread(adapter::notifyDataSetChanged);\n }\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent=new Intent();\r\n\t\t\t\tintent.putExtra(\"goods_id\", goods_id);\r\n\t\t\t\tintent.setClass(GoodsActivity.this, LoadurlActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "@Override\r\n public void onCreate(@Nullable Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_item);\r\n supprimer = (Button) findViewById(R.id.supp);\r\n mail = (Button) findViewById(R.id.mail);\r\n Intent intent = getIntent();\r\n Bundle bundle = intent.getExtras();\r\n final String title = bundle.getString(\"titles\");\r\n String title2 = bundle.getString(\"desc\");\r\n\r\n\r\n txt = (TextView) findViewById(R.id.textView);\r\n txt.setText(title2);\r\n mail.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n\r\n startActivity(new Intent(ItemActivity.this, MailApiActivity.class));\r\n }\r\n\r\n });\r\n\r\n supprimer.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n requestQueue = Volley.newRequestQueue(ItemActivity.this);\r\n sendRequest( title);\r\n startActivity(new Intent(ItemActivity.this, MainActivity.class));\r\n }\r\n\r\n });\r\n }", "private void onQueryEventFunctionality() {\n hideKeypad();\n // Find a reference to the {@link EditText} in the layout\n EditText bookQuery = (EditText) findViewById(R.id.book_search_text);\n // Get the user typed text from the EditText view\n mbookQueryText = bookQuery.getText().toString();\n // Make the final URL, based on user input, to be used to fetch data from the server\n mGBooksRequestUrl = makeUrlFromInput(mbookQueryText);\n\n // Get a reference to the ConnectivityManager to check state of network connectivity\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n mEmptyStateTextView.setVisibility(GONE);\n\n //Show the progress indicator\n View loadingIndicator = findViewById(R.id.loading_indicator);\n loadingIndicator.setVisibility(VISIBLE);\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n // Initialize the loader. Pass in the int ID constant defined above and pass in null for\n // the bundle. Pass in this activity for the LoaderCallbacks parameter (which is valid\n // because this activity implements the LoaderCallbacks interface).\n loaderManager.restartLoader(BOOK_LOADER_ID, null, BookActivity.this);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.no_internet_connection);\n }\n }", "public static void requestInfo(Context context) {\n Intent intent = new Intent(context, BandCollectionService.class);\n intent.putExtra(BAND_ACTION, BandAction.REQUEST_INFO);\n context.startService(intent);\n }", "@Override\n\tpublic Long addBook(BookRequestVO request) {\n\t\tLong savedBookId = bookStorePersistDao.addBook(request);\n\t\treturn savedBookId;\n\t}", "private void getBooks(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Fetching Data\",\"Please wait...\",false,false);\n\n //Creating a rest adapter\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(ROOT_URL)\n .build();\n\n //Creating an object of our api interface\n BooksAPI api = adapter.create(BooksAPI.class);\n\n //Defining the method\n api.getBooks(new Callback<List<Book>>() {\n @Override\n public void success(List<Book> list, Response response) {\n //Dismissing the loading progressbar\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }\n\n @Override\n public void failure(RetrofitError error) {\n //you can handle the errors here\n Log.e(\"error\",error.getResponse().getReason());\n }\n });\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(checkInfo())\r\n\t\t\t\t{\r\n\t\t\t\t\tBundle extra = getIntent().getExtras();\r\n\t\t\t\t\tif(extra!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString json = extra.getString(\"json\");\r\n\t\t\t\t\t\tType typeObject = new TypeToken<CustomerEntity>(){}.getType();\r\n\t\t\t\t\t\tString customer = JSonHelper.serializerJson(getCustomer(), typeObject);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tIntent it = new Intent(Booking.this, BookingConfirm.class);\r\n\t\t\t\t\t\tit.putExtra(\"json\", json);\r\n\t\t\t\t\t\tit.putExtra(\"customer\", customer);\r\n\t\t\t\t\t\tit.putExtra(\"bonus\",chkBonus.isChecked()?\"150000\":\"0\");\r\n\t\t\t\t\t\tstartActivity(it);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tHelper.showToast(Booking.this, \"Please input all customer infomation!\", true);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic BookingDetails requestBook(UserDetails userDetails, FilghtDetails flightDetails) {\n\t\t boolean flag = false, \n\t\t\t\t\tisRequestExists = false;\n\t \t\tBookingDetails bookingDetails = new BookingDetails();\n\t UserDetails uf = new UserDetails();\n\t FilghtDetails fd = new FilghtDetails();\n\t \t\t\tfor (BookingDetails bs : Repository.BOOKING_DETAILS) {\n\t\t\t\t\t\tif (flightDetails.getFlightId() == bs.getFlightDetails().getFlightId()) {\n\t\t\t\t\t\t\tisRequestExists = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t \t\t\tif(!isRequestExists) {\n\t \t\t\t\tfor (UserDetails ud : Repository.USER_DETAILS) {\n\t\t\t\t\t\t\tif (userDetails.getUserId() == ud.getUserId()) {\n\t\t\t\t\t\t\t\tfor (FilghtDetails flight : Repository.FLIGHT_DETAILS) {\n\t\t\t\t\t\t\t\t\tif (flight.getFlightId() == flightDetails.getFlightId()) {\n\t\t\t\t\t\t\t\t\t\tuf= ud;\n\t\t\t\t\t\t\t\t\t\tfd = flight;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\t\n\t \t\t\t\t}\n\t\t\t\t\t\n\t \n\t\t\t\t\t\tif (flag == true) {\n\t\t\t\t\t\t\tbookingDetails.setFlightDetails(fd);;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbookingDetails.setUserDetails(uf);;\n\t\t\t\t\t\t\tRepository.BOOKING_DETAILS.add(bookingDetails);\n\t\t\t\t\t\treturn bookingDetails;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\tthrow new AirlineException(\"Invalid request or you cannot request that book\");\n\t\t\t\n\n\t}", "private void getData() {\n loading = new ProgressDialog(ScoreActivity.this);\n loading.setIcon(R.drawable.wait_icon);\n loading.setTitle(\"Loading\");\n loading.setMessage(\"Please wait....\");\n loading.show();\n\n String URL = Key.WRITTEN_MARK+mid;\n\n StringRequest stringRequest = new StringRequest(URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n loading.dismiss();\n showJSON(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Intent intent = new Intent(ScoreActivity.this,ExaminationActivity.class);\n startActivity(intent);\n loading.dismiss();\n Toast.makeText(ScoreActivity.this, \"Network Error!\", Toast.LENGTH_SHORT).show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(ScoreActivity.this);\n requestQueue.add(stringRequest);\n }", "public void requestToPutFollow(String bravoUserID, final IRequestListener iRequestListener, FragmentBasic fragmentBasic) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"User_ID\", bravoUserID);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_PUT_FOLLOWING.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPut putFollow = new AsyncHttpPut(mContext, new AsyncHttpResponseProcess(mContext, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putFollow :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObPutFollowing obPutFollowing;\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n obPutFollowing = gson.fromJson(response.toString(), ObPutFollowing.class);\r\n iRequestListener.onErrorResponse(obPutFollowing.error);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n AIOLog.d(\"response error\");\r\n }\r\n }, params, true);\r\n AIOLog.d(url);\r\n putFollow.execute(url);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tresp.setCharacterEncoding(\"gbk\");\n\t\tresp.setContentType(\"text/html;charset=gbk\");\n\t\tPrintWriter out=resp.getWriter();\n\t\tCollection<Book> books=BookDB.getAll();\n\t\tout.write(\"本站提供的图书有:<br/>\");\n\t\tfor(Book book :books) {\n\t\t\tString url =\"/chapter05/PurchaseServlet?id=\"+book.getId();\n\t\t \n\t\t\tout.write(book.getName()+\"<a href='\"+url\n\t\t\t\t\t+\"'>点击购买</a><br/>\");\n\t\t}\n\t}", "public final void onResume() {\n ApplicationInfo applicationInfo;\n f31972d.mo25412b(\"onResume\", new Object[0]);\n super.onResume();\n try {\n xxa xxa = this.f31973e;\n if (xxa == null) {\n xxq xxq = this.f31974f;\n if (xxq == null) {\n f31972d.mo25418e(\"No FIDO API call to resume, and a new request is being processed.\", new Object[0]);\n RequestParams requestParams = (RequestParams) getIntent().getParcelableExtra(\"RequestExtra\");\n this.f31976h = requestParams;\n String str = this.f31975g;\n if (requestParams instanceof BrowserRequestParams) {\n str = ((BrowserRequestParams) requestParams).mo18804e().getAuthority();\n } else {\n PackageManager packageManager = getApplicationContext().getPackageManager();\n try {\n applicationInfo = packageManager.getApplicationInfo(str, 0);\n } catch (PackageManager.NameNotFoundException e) {\n f31972d.mo25418e(\"Application info cannot be retrieved\", new Object[0]);\n applicationInfo = null;\n }\n if (applicationInfo == null || packageManager.getApplicationLabel(applicationInfo) == null) {\n f31972d.mo25418e(\"Cannot retrieve application name and package name is used instead\", new Object[0]);\n } else {\n str = packageManager.getApplicationLabel(applicationInfo).toString();\n }\n }\n sdo.m34971a(!str.trim().isEmpty(), (Object) \"App name or authority from request params cannot be empty after trimming.\");\n this.f52327b = new ycc(this, str, false);\n ybu ybu = new ybu(this);\n ybv ybv = new ybv(this);\n Context applicationContext = getApplicationContext();\n try {\n if (!(this.f31976h instanceof BrowserRequestParams)) {\n xxq xxq2 = new xxq(this.f31977i);\n this.f31974f = xxq2;\n RequestParams requestParams2 = this.f31976h;\n if (requestParams2 instanceof RegisterRequestParams) {\n xwj xwj = this.f31978j;\n RegisterRequestParams registerRequestParams = (RegisterRequestParams) requestParams2;\n new xbd(applicationContext);\n String str2 = this.f31975g;\n sek sek = xxq.f53341c;\n String valueOf = String.valueOf(str2);\n sek.mo25414c(valueOf.length() == 0 ? new String(\"headfulRegister is called by \") : \"headfulRegister is called by \".concat(valueOf), new Object[0]);\n xbc a = xbd.m42595a(str2);\n if (a != null) {\n xxq2.f53343b = true;\n xxs xxs = xxq2.f53342a;\n xyy a2 = xxq2.mo30231a(applicationContext);\n xxs.f53345g.mo25414c(\"doRegister for apps is called\", new Object[0]);\n xxs.f53346b = applicationContext;\n xxs.f53347c = ybv;\n xxs.f53348d = a2;\n xxs.f53349e = new xxg(registerRequestParams);\n xxs.f53350f.mo30201a(xwj, str2, registerRequestParams, a2.mo30279a());\n if (a2.mo30279a().isEmpty()) {\n xxs.f53345g.mo25418e(\"No enabled transport found on the platform\", new Object[0]);\n xxs.mo30235a(xwj, ErrorCode.CONFIGURATION_UNSUPPORTED);\n return;\n }\n xxs.mo30237a(xwj, a);\n return;\n }\n throw new SecurityException(\"Calling app is unknown; facetId should not be null!\");\n } else if (requestParams2 instanceof SignRequestParams) {\n xwj xwj2 = this.f31978j;\n SignRequestParams signRequestParams = (SignRequestParams) requestParams2;\n new xbd(applicationContext);\n String str3 = this.f31975g;\n sek sek2 = xxq.f53341c;\n String valueOf2 = String.valueOf(str3);\n sek2.mo25414c(valueOf2.length() == 0 ? new String(\"headfulSign is called by \") : \"headfulSign is called by \".concat(valueOf2), new Object[0]);\n xbc a3 = xbd.m42595a(str3);\n if (a3 != null) {\n xxq2.f53343b = true;\n xxs xxs2 = xxq2.f53342a;\n xyy a4 = xxq2.mo30231a(applicationContext);\n xxs.f53345g.mo25414c(\"doSign for apps is called\", new Object[0]);\n xxs2.f53346b = applicationContext;\n xxs2.f53347c = ybu;\n xxs2.f53348d = a4;\n xxs2.f53349e = new xxl(signRequestParams);\n xxs2.f53350f.mo30202a(xwj2, str3, signRequestParams, xxs2.f53348d.mo30279a());\n if (a4.mo30279a().isEmpty()) {\n xxs.f53345g.mo25418e(\"No enabled transport found on the platform\", new Object[0]);\n xxs2.mo30235a(xwj2, ErrorCode.CONFIGURATION_UNSUPPORTED);\n return;\n }\n xxs2.mo30237a(xwj2, a3);\n return;\n }\n throw new SecurityException(\"Calling app is unknown; facetId should not be null!\");\n } else {\n f31972d.mo25418e(\"Unsupported RequestParams type!\", new Object[0]);\n }\n } else {\n xxa xxa2 = new xxa(this.f31977i);\n this.f31973e = xxa2;\n RequestParams requestParams3 = this.f31976h;\n if (requestParams3 instanceof BrowserRegisterRequestParams) {\n xwj xwj3 = this.f31978j;\n BrowserRegisterRequestParams browserRegisterRequestParams = (BrowserRegisterRequestParams) requestParams3;\n xbd xbd = new xbd(applicationContext);\n String str4 = this.f31975g;\n sek sek3 = xxa.f53319c;\n String valueOf3 = String.valueOf(str4);\n sek3.mo25414c(valueOf3.length() == 0 ? new String(\"headfulRegister is called by \") : \"headfulRegister is called by \".concat(valueOf3), new Object[0]);\n xxa2.f53321b = true;\n if (xbd.mo29604a(browserRegisterRequestParams.f31888b.toString(), str4) != null) {\n xxa2.f53320a.mo30233a(applicationContext, xwj3, browserRegisterRequestParams, ybv, xxa2.mo30208a(applicationContext), str4);\n return;\n }\n throw new SecurityException(\"Calling app is not a legitimate browser!\");\n } else if (requestParams3 instanceof BrowserSignRequestParams) {\n xwj xwj4 = this.f31978j;\n BrowserSignRequestParams browserSignRequestParams = (BrowserSignRequestParams) requestParams3;\n xbd xbd2 = new xbd(applicationContext);\n String str5 = this.f31975g;\n sek sek4 = xxa.f53319c;\n String valueOf4 = String.valueOf(str5);\n sek4.mo25414c(valueOf4.length() == 0 ? new String(\"headfulSign is called by \") : \"headfulSign is called by \".concat(valueOf4), new Object[0]);\n xxa2.f53321b = true;\n if (xbd2.mo29604a(browserSignRequestParams.f31890b.toString(), str5) != null) {\n xxa2.f53320a.mo30234a(applicationContext, xwj4, browserSignRequestParams, ybu, xxa2.mo30208a(applicationContext), str5);\n return;\n }\n throw new SecurityException(\"Calling app is not a legitimate browser!\");\n } else {\n f31972d.mo25418e(\"Unsupported BrowserRequestParams type!\", new Object[0]);\n }\n }\n } catch (SecurityException e2) {\n this.f31977i.mo30184a(this.f31978j, e2);\n mo18877a(new ErrorResponseData(ErrorCode.BAD_REQUEST, \"SecurityException\"));\n } catch (Exception e3) {\n this.f31977i.mo30184a(this.f31978j, e3);\n mo18877a(new ErrorResponseData(ErrorCode.OTHER_ERROR));\n }\n } else {\n xxq.mo30232a(StateUpdate.f31873c);\n }\n } else {\n xxa.mo30209a(StateUpdate.f31873c);\n }\n } catch (SecurityException e4) {\n this.f31977i.mo30184a(this.f31978j, e4);\n mo18877a(new ErrorResponseData(ErrorCode.BAD_REQUEST, \"SecurityException\"));\n } catch (Exception e5) {\n this.f31977i.mo30184a(this.f31978j, e5);\n mo18877a(new ErrorResponseData(ErrorCode.OTHER_ERROR));\n }\n }", "com.google.openrtb.OpenRtb.BidRequestOrBuilder getRequestOrBuilder();", "public void returnBook()\n\t{\n\t\tavailableBooks++;\n\t}", "public void onGitheriSelect() {\n Food githeri = FoodRatios.getGitheriRatios(mTotalAttendance);\n Intent intent = new Intent(this, GitheriProgramActivity.class);\n intent.putExtra(\"GitheriMeal\", Parcels.wrap(githeri));\n intent.putExtra(\"attendancenum\", mTotalAttendance);\n startActivity(intent);\n }", "@Override \n public void run() {\n\t\tString path = Urls.URL_14;\n\t\t\n\t\tMap<String, String> map = new HashMap<String, String>();\n\n\t \tList<BasicNameValuePair> params = HttpUtils.setParams(map);\n\n\t \tLog.i(TAG, path);\n\t\t\n\t\tApkInfoItem apk = new ApkInfoItem();\n\t\ttry {\n\t\t\tString jsonStr = RequestService.getInstance().getRequest(params, path, new HashMap<String, String>());\n\t\t \tJSONObject jsonObject = new JSONObject(jsonStr);\n\t\t \t\n\t\t\tapk.setApkPath(jsonObject.getString(\"apkPath\"));\n\t\t\tapk.setVersion(jsonObject.getString(\"apkVersion\"));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tMessage msg = new Message();\n\t\t\tmsg.obj = apk;\n\t\t\tmsg.what = Constants.GET_UPDATEINFO_ERROR;\n\t\t\thandler.sendMessage(msg);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tMessage msg = new Message();\n\t\tmsg.obj = apk;\n\t\tmsg.what = Constants.UPDATE_CLIENT;\n\t\thandler.sendMessage(msg);\n }", "@Override\n public void onClick(View view) {\n Intent myIntent = new Intent(DriverPrefrActivity.this, SearchParkActivity.class);\n //Creating a bundle\n Bundle bundle = new Bundle();\n //Adding values to bundle\n bundle.putString(\"driverlargecar\", String.valueOf(largecar));\n bundle.putString(\"drivertype\", String.valueOf(type));\n bundle.putString(\"driverprice\", String.valueOf(price));\n bundle.putString(\"driverdistancepklot\", String.valueOf(distpklot));\n\n myIntent.putExtra(\"mybundle\", bundle);\n startActivity(myIntent);\n }", "public void requestToPutMyListItem(String bravoID, final IRequestListener iRequestListener, FragmentBasic fragmentBasic) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"Bravo_ID\", bravoID);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_PUT_MYLIST.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPut putMyListItem = new AsyncHttpPut(mContext, new AsyncHttpResponseProcess(mContext, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putFollow :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObPutMyList obPutMyList;\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n obPutMyList = gson.fromJson(response.toString(), ObPutMyList.class);\r\n iRequestListener.onErrorResponse(obPutMyList.error);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"Cannot save this item\");\r\n }\r\n }, params, true);\r\n AIOLog.d(url);\r\n putMyListItem.execute(url);\r\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int pos, long id) {\n DashboardResModel.BookData bookData = (DashboardResModel.BookData) adapterView.getItemAtPosition(pos);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"data\", bookData);\n FragmentBookInfo fragment = new FragmentBookInfo();\n fragment.setArguments(bundle);\n ((MainActivity) getActivity()).loadFragment(fragment);\n }", "@Override\n public void onClick(View v) {\n try {\n Intent callIntent = new Intent(Intent.ACTION_CALL);\n callIntent.setData(Uri.parse(\"tel:\" + books.getBuy()));\n context.startActivity(callIntent);\n\n } catch (ActivityNotFoundException e) {\n Log.e(\"helloandroid dialing \", \"Call failed\", e);\n }\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, MovieTrailerActivity.class); // makes intent\n\n // grab videolink\n//\n// String url = API_BASE_URL + \"/movie/\" + movie.getId() + \"/videos\"; // create url -- endpoint is videos\n// RequestParams params = new RequestParams();\n// params.put(API_KEY_PARAM, \"a07e22bc18f5cb106bfe4cc1f83ad8ed\"); // api key always required\n// client.get(url, params, new JsonHttpResponseHandler() {\n// @Override\n// public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n// try {\n// JSONArray results = response.getJSONArray(\"results\"); // root node\n// String video_key = results.getJSONObject(0).getString(\"key\");\n// Toast.makeText(context, video_key, Toast.LENGTH_SHORT).show();\n//\n// } catch (JSONException e) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// }\n//\n// @Override\n// public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// });\n\n //intent.putExtra(Movie.class.getSimpleName(), Parcels.wrap(movie));\n // ^^ serializes movie using parceler. it uses short name as key, movie as value\n context.startActivity(intent); // start activity\n }", "@Override\n public void onClick(View v) {\n int pos = recyclerView.getChildAdapterPosition(v);\n int bookId = ((RecyclerViewBookAdapter) recyclerView.getAdapter()).getBookId(pos);\n launchActivity(this, ChapterActivity.class, BOOK_ID_INTENT_KEY, bookId);\n }", "public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n currentUser = (User) this.getArguments().getSerializable(\"current user\");\n clickedBook = (Book) this.getArguments().getSerializable(\"clicked book\");\n\n View view = inflater.inflate(R.layout.fragment_owner_view_borrowed, container,false);\n context = container.getContext();\n\n mapFragment = (MapFragment) getActivity().getFragmentManager().findFragmentById(R.id.mapp5);\n mapFragment.getMapAsync(this);\n\n\n storage = FirebaseStorage.getInstance();\n storageReference = storage.getReference();\n currentBookDocRef = db.collection(\"user\").document(uid).collection(\"Book\").document(clickedBook.getID());\n borrowerSideBorrowedBookRef = db.collection(\"user\").document(clickedBook.getBorrowerID()).collection(\"BorrowedBook\").document(clickedBook.getID());\n\n // Assign buttons\n backButton = view.findViewById(R.id.back);\n confirmReturnButton = view.findViewById(R.id.owner_confirm_return);\n\n // Display clicked book\n bookTitle = view.findViewById(R.id.viewTitleOwnerBorrowed);\n bookAuthor = view.findViewById(R.id.viewAuthorOwnerBorrowed);\n bookDescription = view.findViewById(R.id.viewDescriptionOwnerBorrowed);\n bookISBN = view.findViewById(R.id.viewISBNOwnerBorrowed);\n bookBorrower = view.findViewById(R.id.borrowedBorrower);\n\n\n bookTitle.setText(clickedBook.getTitle());\n bookAuthor.setText(clickedBook.getAuthor());\n bookDescription.setText(clickedBook.getDescription());\n bookISBN.setText(clickedBook.getISBN());\n //need to get borrower here\n bookBorrower.setText(\"Borrower:\"+clickedBook.getBorrowerUname());\n imageView = view.findViewById(R.id.imageViewOwnerBorrowed);\n\n Photographs.viewImage(\"B\", clickedBook.getID(), storageReference, applicationContext, imageView);\n\n bookBorrower.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new SearchUserDialogFragment(clickedBook.getBorrowerID()).show(getActivity().getSupportFragmentManager(),\"borrower profile\");\n\n }\n });\n\n\n confirmReturnButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n currentBookDocRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n DocumentSnapshot document = task.getResult();\n if (document.exists()) {\n returnDenoted = document.getString(\"returnDenoted\");\n if (returnDenoted!=null &&returnDenoted.equals(\"true\")) {\n if (ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_DENIED) {\n Toast.makeText(getActivity(), \"You must grant the permission of camera to confirm borrow\", Toast.LENGTH_SHORT).show();\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.CAMERA}, 445);\n } else {\n Intent intent = new Intent(getActivity(), Scanner.class);\n startActivityForResult(intent, 325);\n }\n }\n //the book is either first time to be denoted or denoted==\"false\" currently\n else {\n Toast.makeText(getActivity(), \"The borrower have not denoted return yet\", Toast.LENGTH_SHORT).show();\n\n }\n } else {\n Toast.makeText(getActivity(), \"some error occurs\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n\n\n }\n });\n\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Destroy Map fragment\n if (mapFragment != null) {\n getActivity().getFragmentManager().beginTransaction().remove(mapFragment).commit();\n }\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n fragmentManager.popBackStack();\n }\n });\n/*\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n fragmentManager.popBackStack();\n }\n });\n*/\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_ingredient);\n\n spinner = findViewById(R.id.progressBarI);\n spinner.setVisibility(View.GONE);\n\n Intent intent = getIntent();\n\n // check from which activity ingredient was chosen\n if (intent.getStringExtra(\"recipeId\") != null) {\n recipe = intent.getStringExtra(\"recipeId\");\n message = \"recipes/\" + recipe + \"/information\";\n\n // get ingredient connected to recipe\n IngredientRequest request = new IngredientRequest(this, message);\n request.getIngredients(this, message);\n }\n\n else if (intent.getStringExtra(\"query\") != null) {\n message = intent.getStringExtra(\"query\");\n\n // get ingredient connected to query\n AutoIngredientRequest autoRequest = new AutoIngredientRequest(this, message);\n autoRequest.getAutoIngredients(this, message);\n }\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState, R.layout.goodscheck_view);\n\n\t\tLog.i(TAG, \"onCreate()\");\n\t\tIntent intent = getIntent();\n\n\t\tgj = intent.getStringExtra(\"gj\");\n\t\tzw = intent.getStringExtra(\"zw\");\n\t\tbirthday_s = intent.getStringExtra(\"birthday_s\");\n\t\tssdw = intent.getStringExtra(\"ssdw\");\n\t\tzjzl = intent.getStringExtra(\"zjzl\");\n\t\txb = intent.getStringExtra(\"xb\");\n\t\tzjhm = intent.getStringExtra(\"zjhm\");\n\n\t\tryid = intent.getStringExtra(\"ryid\");\n\t\tcsrq = intent.getStringExtra(\"csrq\");\n\t\tname = intent.getStringExtra(\"name\");\n\t\ttime = intent.getStringExtra(\"time\");\n\t\tfx = intent.getStringExtra(\"fx\");\n\t\tsfcy = intent.getStringExtra(\"sfcy\");\n\t\tfrom = intent.getStringExtra(\"from\");\n\t\tvoyageNumber = intent.getStringExtra(\"voyageNumber\");\n\t\tsubmitBtn = (Button) findViewById(R.id.record_submit);\n\t\tif (\"01\".equals(from)) {// 卡口记录上下轮物品提供选择卡口内监护船舶功能\n\t\t\tsetMyActiveTitle(getText(R.string.kakoumanager) + \">\"\n\t\t\t\t\t+ getText(R.string.record_goods));\n\t\t\tfindViewById(R.id.send_good_info_layout_select_ship).setVisibility(\n\t\t\t\t\tView.VISIBLE);\n\t\t\tfindViewById(R.id.send_good_info_ship_czsm).setVisibility(\n\t\t\t\t\tView.VISIBLE);\n\t\t\tsubmitBtn.setEnabled(false);\n\t\t} else {\n\t\t\tsetMyActiveTitle(getText(R.string.tikoumanager) + \">\"\n\t\t\t\t\t+ getText(R.string.record_goods));\n\t\t\tfindViewById(R.id.send_good_info_layout_select_ship).setVisibility(\n\t\t\t\t\tView.GONE);\n\t\t\tfindViewById(R.id.send_good_info_ship_czsm)\n\t\t\t\t\t.setVisibility(View.GONE);\n\t\t}\n\n\t\t((TextView) findViewById(R.id.goods_record_name)).setText(Html\n\t\t\t\t.fromHtml(getString(R.string.name_s)\n\t\t\t\t\t\t+ \"<font color=\\\"#acacac\\\">\" + name + \"</font>\"));\n\t\t((TextView) findViewById(R.id.goods_record_time)).setText(Html\n\t\t\t\t.fromHtml(getString(R.string.goods_downup_time_tag)\n\t\t\t\t\t\t+ \"<font color=\\\"#acacac\\\">\" + time + \"</font>\"));\n\n\t\tcharSequences = DataDictionary.getDataDictionaryNameList(\n\t\t\t\tDataDictionary.DATADICTIONARY_TYPE_GOODS_TYPE).toArray(\n\t\t\t\tnew CharSequence[DataDictionary.getDataDictionaryNameList(\n\t\t\t\t\t\tDataDictionary.DATADICTIONARY_TYPE_GOODS_TYPE).size()]);\n\n\t\tstates = new boolean[charSequences.length];\n\n\t\tgoodsRes = (TextView) findViewById(R.id.goods);\n\t\tgoodsRes.setText(\"\");\n\t\tgoodsRes.setVisibility(View.GONE);\n\n\t\tsubmitBtn.setOnClickListener(new OnClickListener() {\n\t\t\t/** 向后台提交数据 */\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (progressDialog != null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tStringBuffer buffer = new StringBuffer();\n\t\t\t\tif (states != null && states.length > 0) {\n\n\t\t\t\t\tfor (int i = 0; i < states.length; i++) {\n\t\t\t\t\t\tif (states[i]) {\n\t\t\t\t\t\t\tif (buffer != null && buffer.length() > 0) {\n\t\t\t\t\t\t\t\tbuffer.append(\"|\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbuffer.append(DataDictionary\n\t\t\t\t\t\t\t\t\t.getDataDictionaryCodeByIndex(\n\t\t\t\t\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\t\t\t\t\tDataDictionary.DATADICTIONARY_TYPE_GOODS_TYPE));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (buffer == null || buffer.length() == 0) {\n\t\t\t\t\tHgqwToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tR.string.plase_choose_good).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tprogressDialog = new ProgressDialog(GoodsCheckView.this);\n\t\t\t\tprogressDialog.setTitle(getString(R.string.waiting));\n\t\t\t\tprogressDialog.setMessage(getString(R.string.waiting));\n\t\t\t\tprogressDialog.setCancelable(false);\n\t\t\t\tprogressDialog.setIndeterminate(false);\n\t\t\t\tprogressDialog.show();\n\t\t\t\tString url = \"sendGoodsInfo\";\n\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\t\t\tparams.add(new BasicNameValuePair(\"userID\", LoginUser\n\t\t\t\t\t\t.getCurrentLoginUser().getUserID()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"pdacode\", DeviceUtils\n\t\t\t\t\t\t.getIMEI()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"PDACode\", DeviceUtils\n\t\t\t\t\t\t.getIMEI()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"voyageNumber\", voyageNumber));\n\t\t\t\tparams.add(new BasicNameValuePair(\"time\", time));\n\t\t\t\tparams.add(new BasicNameValuePair(\"type\", buffer.toString()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"fx\", fx));\n\t\t\t\tparams.add(new BasicNameValuePair(\"sfcy\", sfcy));\n\t\t\t\tparams.add(new BasicNameValuePair(\"ryid\", ryid));\n\n\t\t\t\tparams.add(new BasicNameValuePair(\"zjhm\", zjhm));\n\t\t\t\tparams.add(new BasicNameValuePair(\"xm\", name));\n\t\t\t\tparams.add(new BasicNameValuePair(\"xb\", xb));\n\t\t\t\tparams.add(new BasicNameValuePair(\"zjlx\", zjzl));\n\t\t\t\tparams.add(new BasicNameValuePair(\"csrq\", csrq));\n\t\t\t\tparams.add(new BasicNameValuePair(\"ssdw\", ssdw));\n\t\t\t\tparams.add(new BasicNameValuePair(\"zw\", zw));\n\t\t\t\tparams.add(new BasicNameValuePair(\"gj\", gj));\n\n\t\t\t\t// 开启离线开关后统一保存到本地,否则传送到服务器\n\t\t\t\t// if (!BaseApplication.instent.getWebState()) {\n\t\t\t\tif (getState(FunctionSetting.kqlx, false)) {\n\t\t\t\t\tOffLineManager.request(GoodsCheckView.this,\n\t\t\t\t\t\t\tnew GoodsCheckAction(), url,\n\t\t\t\t\t\t\tNVPairTOMap.nameValuePairTOMap(params), 0);\n\t\t\t\t} else {\n\t\t\t\t\tNetWorkManager.request(GoodsCheckView.this, url, params, 0);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}", "@Override\n public Loader<List<Book>> onCreateLoader(int i, Bundle bundle) {\n return new BookLoader(this, mGBooksRequestUrl);\n }", "public void getRideDetailFromServer(final VolleyJSONResponses callback) {\n\n JSONObject jsonToken = new JSONObject();\n try {\n if (this.bookingId != null) {\n jsonToken.put(\"bookingId\", this.bookingId);\n }\n if (this.driverId != null) {\n jsonToken.put(\"driverId\", this.driverId);\n }\n jsonToken.put(\"key\", Common.API_KEY);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n JsonObjectRequest tokenJsonObjectRequest = new JsonObjectRequest(Request.Method.PATCH, (Common.BASE_URL + Common.REQUEST_URL)\n , jsonToken\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n callback.onSuccess(response);\n }\n }\n , new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n callback.onError(error);\n }\n }\n );\n tokenJsonObjectRequest.setRetryPolicy(new DefaultRetryPolicy(30*1000,DefaultRetryPolicy.DEFAULT_MAX_RETRIES,DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n VolleySingleton.getInstance(context).addToRequestQueue(tokenJsonObjectRequest);\n\n }", "public void sendDataToActivity(Song chosenSong) {\r\n Intent intent = new Intent(this, PlaySongActivity.class);\r\n //.class is the machine-readable form of a java class.\r\n\r\n //2. Store the song information into the Intent object to be sent over to the\r\n //destination screen\r\n intent.putExtra(\"id\", chosenSong.getSong_ID());\r\n intent.putExtra(\"title\", chosenSong.getSong_Title());\r\n intent.putExtra(\"artist\", chosenSong.getSong_Artist());\r\n intent.putExtra(\"fileLink\", chosenSong.getFileLink());\r\n intent.putExtra(\"length\", chosenSong.getSong_Length());\r\n intent.putExtra(\"coverArt\", chosenSong.getCoverArt());\r\n intent.putExtra(\"languageTitle\", genre);\r\n\r\n //3. Launch the destination screen/activity\r\n startActivity(intent);\r\n }", "public void sendnotification(View v){\r\n\t\tRequest req=(Request)v.getTag();\r\n\t\tLog.d(\"selected\", req.getPassenger().getId().toString());\r\n\t\t\r\n//\t\trideresponse=\r\n\t\t\t\trideStart(req, new LatLng(req.getLocation().getLatitude(), req.getLocation().getLongitude()),(Location)this.getIntent().getSerializableExtra(\"mylocation\"));\r\n\t\t\r\n//\t\tIntent intent = new Intent(this, RideStartActivity.class);\r\n// \t \tintent.putExtra(\"ride\", rideresponse);\r\n// \t \tstartActivity(intent);\r\n// \t \tfinish();\r\n\t\t}", "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 }", "public void getBookInfo(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\t\r\n\t}", "public void requestGetMyListItem(String bravoID, final IRequestListener iRequestListener) {\r\n int _loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin _sessionLogin = BravoUtils.getSession(mContext, _loginBravoViaType);\r\n String userId = _sessionLogin.userID;\r\n String accessToken = _sessionLogin.accessToken;\r\n String url = BravoWebServiceConfig.URL_GET_MYLIST_ITEM.replace(\"{User_ID}\", userId).replace(\"{Bravo_ID}\", bravoID);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsGetBravo(userId, accessToken);\r\n AsyncHttpGet getMyListItemRequest = new AsyncHttpGet(mContext, new AsyncHttpResponseProcess(mContext, null) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"requestFollowingCheck:\" + response);\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObGetMylistItem obGetMylistItem;\r\n obGetMylistItem = gson.fromJson(response.toString(), ObGetMylistItem.class);\r\n if (obGetMylistItem == null)\r\n return;\r\n else {\r\n iRequestListener.onResponse(response);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n AIOLog.d(\"response error\");\r\n iRequestListener.onErrorResponse(\"cannot get my list item\");\r\n }\r\n }, params, true);\r\n getMyListItemRequest.execute(url);\r\n }", "public void prepare_intent(int requestCode, long invoking_id){\n Intent intent = new Intent(BilansView.this, BilansAdd.class);\n\n if (invoking_id > 0) {\n HashMap<String, String> map = GetItem(invoking_id);\n intent.putExtra(\"item_id\", invoking_id);\n String timestamp[] = map.get(\"data\").split(\" \");\n intent.putExtra(\"data\", timestamp[0]);\n intent.putExtra(\"time\", timestamp[1]);\n intent.putExtra(\"tytul\", map.get(\"tytul\"));\n } else {\n intent.putExtra(\"data\", Utils.datenow());\n intent.putExtra(\"time\", Utils.timenow());\n intent.putExtra(\"amount\", \"\");\n }\n startActivityForResult(intent, requestCode);\n }", "public void GetUser()\n {\n\n Intent intent = new Intent(this, MainBusiness.class);\n\n\n\n Call<String> call = rtfBase.getUser(ID);\n\n\n call.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response)\n {\n\n if(response.code() == 200)\n {\n\n //success\n intent.putExtra(\"businessUserInGson\",response.body());\n intent.putExtra(\"token\", TOKEN);\n intent.putExtra(\"id\", ID);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); \n startActivity(intent);\n\n\n }\n\n\n if(response.code() == 400 || response.code()==500)\n {\n //failure\n Toast.makeText(RegisterNewBusiness.this, \"this ID do not exist\", Toast.LENGTH_LONG).show();\n\n }\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n Toast.makeText(RegisterNewBusiness.this, t.getMessage(), Toast.LENGTH_LONG).show();\n\n }\n });\n\n\n }", "@Override\n\t\t\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\t\tLog.d(TAG, \"onActivityResult(\" + requestCode + \",\" + resultCode + \",\" + data);\n\t\t\t\tif (mHelper == null) return;\n\t\t\t\tif (!mHelper.handleActivityResult(requestCode, resultCode, data)) {\n\t\t\t\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\t\t\t if (requestCode == RC_REQUEST) { \n\t\t\t\t\t String purchaseData = data.getStringExtra(\"INAPP_PURCHASE_DATA\");\n\t\t\t\t\t \n\t\t\t\t\t if (resultCode == RESULT_OK) {\n\t\t\t\t\t try {\n\t\t\t\t\t JSONObject jo = new JSONObject(purchaseData);\n\t\t\t\t\t String sku = jo.getString(\"productId\");\n\t\t\t\t\t alert(\"Thank you for upgrading to pro! \");\n\t\t\t\t\t \n\t\t\t\t\t SharedPreferences sharedPreferences = MainActivity.this.getSharedPreferences(PREFS_NAME,0); //已经设置密码 \n\t\t\t\t\t\t\t SharedPreferences.Editor meditor = sharedPreferences.edit(); \n\t\t\t\t\t\t\t\t meditor.putBoolean(\"isPaid\",true ); \n\t\t\t\t\t\t\t\t meditor.commit();\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t if (overviewFragment != null) {\n\t\t\t\t\t \t\t\t\t refreshADS = (OnRefreshADS) overviewFragment;\n\t\t\t\t\t \t\t\t\t refreshADS.refreshADS();\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 }\n\t\t\t\t\t catch (JSONException e) {\n\t\t\t\t\t alert(\"Failed to parse purchase data.\");\n\t\t\t\t\t e.printStackTrace();\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 }\n\t\t \n\t\t else {\n\t\t Log.d(TAG, \"onActivityResult handled by IABUtil.\");\n\t\t }\n\t\t\t}" ]
[ "0.6075935", "0.5763881", "0.5496416", "0.54387033", "0.54271823", "0.53723943", "0.5366029", "0.52465934", "0.5215862", "0.5203174", "0.5154906", "0.51434886", "0.5123683", "0.51007515", "0.50949883", "0.50928175", "0.5071752", "0.50374365", "0.50211596", "0.50210065", "0.50038534", "0.4990021", "0.49773625", "0.4972183", "0.4957401", "0.49126485", "0.49016535", "0.4892554", "0.4881489", "0.4874989", "0.48458338", "0.48418826", "0.4828793", "0.47723746", "0.4756711", "0.47514465", "0.47512376", "0.47498548", "0.47492296", "0.4729108", "0.4721979", "0.4716685", "0.4714604", "0.47140136", "0.47138196", "0.47125375", "0.4712414", "0.47116518", "0.47045368", "0.46896896", "0.46885797", "0.46796268", "0.46786472", "0.4678546", "0.46740437", "0.46712953", "0.46708155", "0.4665809", "0.46506143", "0.46495554", "0.46495554", "0.46468264", "0.46443334", "0.46393234", "0.46347666", "0.46288568", "0.46248978", "0.46246475", "0.4623796", "0.46233946", "0.46211135", "0.4620372", "0.46188253", "0.4607131", "0.46019167", "0.459735", "0.4596242", "0.45946136", "0.4589529", "0.45892683", "0.45877928", "0.45824975", "0.45797464", "0.4578662", "0.457681", "0.45618197", "0.45606387", "0.45532927", "0.45478058", "0.45466396", "0.4545677", "0.45319232", "0.45290157", "0.45282367", "0.45277205", "0.4522329", "0.45176515", "0.4512635", "0.45111242", "0.45106784" ]
0.63014203
0
Retrieves a more detailed image of the book from the URL specified. This uses the Volley ImageRequest
public void retrieveDetailedImage(){ //Build request for raw JSON data ImageRequest imageRequest = new ImageRequest(currentBook.thumbnail, new Response.Listener<Bitmap>() { @Override public void onResponse(Bitmap image) { //Image is returned mBackgroundImage.setImageBitmap(image); mBookImage.setImageBitmap(image); // Sets cover in case book was called from context where no cover provided } }, 5000, 5000, ImageView.ScaleType.CENTER, Bitmap.Config.RGB_565, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { //Print error ErrorUtils.errorDialog(BookDetailsActivity.this, "Could not connect to the server", "Could not connect to the server at this time, please try again later."); } }); //Start the JSON request queue.add(imageRequest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Bitmap getImage(JSONObject volumeInfo) throws JSONException {\n Bitmap image = null;\n JSONObject imageLinks = volumeInfo.optJSONObject(\"imageLinks\");\n if (imageLinks == null) {\n Log.e(LOG_TAG, \"No image link for this book\");\n return null;\n }\n String imageLink = imageLinks.optString(\"smallThumbnail\");\n if (imageLink.isEmpty()) {\n imageLink = imageLinks.optString(\"thumbnail\");\n }\n\n URL imageURL = convertStringToURL(imageLink);\n if (imageURL != null) {\n try {\n image = BitmapFactory.decodeStream(imageURL.openConnection().getInputStream());\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Could not get image from the server\");\n e.printStackTrace();\n }\n }\n return image;\n }", "private void getProfilePic()\n {\n String url= LoginActivity.base_url+\"src/users/\"+String.format(\"%s/profilepics/prof_pic\",makeName(Integer.parseInt(userInfo[4])))+\".jpg\";\n ImageRequest request=new ImageRequest(\n url,\n new Response.Listener<Bitmap>()\n {\n @Override\n public void onResponse(Bitmap response)\n {\n ((ImageView)findViewById(R.id.image)).setImageBitmap(response);\n //imageView.setImageBitmap(response);\n Log.d(\"volley\",\"succesful\");\n }\n }, 0, 0, null,\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError e)\n {\n Log.e(\"voley\",\"\"+e.getMessage()+e.toString());\n }\n });\n RequestQueue request2 = Volley.newRequestQueue(getBaseContext());\n request2.add(request);\n }", "Bitmap ObtenerImagen(URL imageUrl){\n HttpURLConnection conn = null;\n Bitmap imagen=null;\n try {\n conn = (HttpURLConnection) imageUrl.openConnection();\n conn.connect();\n imagen = BitmapFactory.decodeStream(conn.getInputStream());\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n return imagen;\n }", "public static void getImageFromUrl(String url, final ImageView imageView,\r\n\t\t\tContext contexte) {\r\n\r\n\t\tVolleySingleton volleyInstance = VolleySingleton.getInstance(contexte);\r\n\t\tImageLoader imageLoader = volleyInstance.getImageLoader();\r\n\t\t\r\n\t\timageLoader.get(url, new ImageListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onErrorResponse(VolleyError error) {\r\n\t\t\t\timageView.setImageResource(R.drawable.ic_launcher);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onResponse(ImageContainer response, boolean arg1) {\r\n\r\n\t\t\t\tLog.i(\"Api\",\r\n\t\t\t\t\t\t\"Get image url reponse :\" + response.getRequestUrl());\r\n\t\t\t\tif (response.getBitmap() != null) {\r\n\t\t\t\t\timageView.setImageBitmap(response.getBitmap());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "private void getDoctorImageRequest(String imageLink, final ImageView imageView) {\n ImageRequest request = new ImageRequest(AppConfig.LIVE_IMAGE_DOCTOR_API_LINK + imageLink,\n new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap bitmap) {\n imageView.setImageBitmap(bitmap);\n// pDialog.hide();\n }\n }, 0, 0, null,\n new Response.ErrorListener() {\n public void onErrorResponse(VolleyError error) {\n imageView.setImageResource(R.drawable.ic_doctor);\n// pDialog.hide();\n }\n });\n // Access the RequestQueue through your singleton class.\n AppController.getInstance().addToRequestQueue(request);\n }", "public void getImage(final String url, final GetImageListener listener) {\n String localFileName = getLocalImageFileName(url);\n final Bitmap image = loadImageFromFile(localFileName);\n if (image == null) { //if image not found - try downloading it from parse\n firebaseModel.getImage(url, new GetImageListener() {\n @Override\n public void onComplete(String url) {\n //2. save the image localy\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n saveImageToFile(image,localFileName);\n //3. return the image using the listener\n listener.onComplete(image.toString());\n }\n\n @Override\n public void fail() {\n listener.fail();\n }\n });\n }else {\n //Log.d(\"TAG\",\"OK reading cache image: \" + localFileName);\n listener.onComplete(image.toString());\n }}", "private Bitmap loadImageFromNetwork(String url) {\n try {\n InputStream is = new DefaultHttpClient().execute(new HttpGet(url))\n .getEntity().getContent();\n return BitmapFactory.decodeStream(is);\n } catch (Exception e) {\n return null;\n }\n }", "protected Bitmap getImage(URL url) {\n\n HttpURLConnection iconConn = null;\n try {\n iconConn = (HttpURLConnection) url.openConnection();\n iconConn.connect();\n int response = iconConn.getResponseCode();\n //if the reponse 200 the successfull\n if (response == 200) {\n return BitmapFactory.decodeStream(iconConn.getInputStream());\n } else {\n return null;\n }\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n } finally {\n if (iconConn != null) {\n iconConn.disconnect();\n }\n }\n }", "private Bitmap downloadImage(String url)\n \t {\n \n \t Bitmap bitmap = null;\n \t InputStream stream = null;\n \t BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n \t bmOptions.inSampleSize = 1;\n \n \t try\n \t {\n \t stream = getHttpConnection(url);\n \t bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n \t stream.close();\n \n \t return bitmap;\n \t }\n \t catch (IOException e1)\n \t {\n \t e1.printStackTrace();\n \t }\n \t return bitmap;\n \t }", "private static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.\n decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "private Bitmap loadImageFromNetwork(String url) {\n Bitmap bm = null;\n try {\n URL urln = new URL(url);\n Log.i(\"load\", url);\n Log.i(\"load\", \"loading Image...\");\n bm = BitmapFactory.decodeStream(urln.openConnection().getInputStream());\n Log.i(\"load\", \"done\");\n } catch (IOException e) {\n Log.e(\"HUE\",\"Error downloading the image from server : \" + e.getMessage().toString());\n } \n return bm;\n }", "private Bitmap LoadImage(String URL, BitmapFactory.Options options) {\r\n Bitmap bitmap = null;\r\n InputStream in = null;\r\n try {\r\n in = OpenHttpConnection(URL);\r\n bitmap = BitmapFactory.decodeStream(in, null, options);\r\n in.close();\r\n } catch (IOException e1) {\r\n }\r\n return bitmap;\r\n }", "private void loadImage(final String url) {\n\t\tnew AsyncTask<Void, Void, Drawable>() {\n\t\t\t@Override\n\t\t\tprotected Drawable doInBackground(Void... none) {\n\t\t\t\treturn NetHelper.getDrawableFromUrl(url);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onPostExecute(Drawable drawable) {\n\t\t\t\tImageView thumbnail = (ImageView) findViewById(R.id.details_image_view_thumbnail);\n\t\t\t\tthumbnail.setImageDrawable(drawable);\n\t\t\t}\n\t\t}.execute();\n\t}", "private static Bitmap downloadImageTask(String src) {\n try {\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n Log.i(LOG_TAG, \"won: \" + myBitmap);\n return myBitmap;\n } catch (IOException e) {\n Log.e(LOG_TAG, \"error while making book cover\", e);\n e.printStackTrace();\n return null;\n }\n }", "public void requestImage(final ImageRequest request) {\n\n // If the request has no URL, abandon it\n if(request.mUrl==null){\n return;\n }\n\n // Create the image download runnable\n final ImageDownloadThread imageDownloadThread = new ImageDownloadThread(){\n\n public void run() {\n\n // Sleep the request for the specified time\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }\n };\n\n // Set the url of the request\n imageDownloadThread.setUrl(request.mUrl);\n\n // Set the creation time of the request\n imageDownloadThread.setCreated(request.mCreated);\n\n // Assign a priority to the request\n if(request.mImageListener==null){\n // If there is no image listener, assign it background priority\n imageDownloadThread.setPriority(BACKGROUND_PRIORITY);\n }else{\n // If there is an image listener, assign it UI priority\n imageDownloadThread.setPriority(UI_PRIORITY);\n }\n\n // If the new request is not a duplicate of an entry of the active and \n // task queues, add the request to the task queue\n if(!mTaskQueue.contains(imageDownloadThread) && \n !mActiveTasks.contains(imageDownloadThread)){\n mThreadPool.execute(imageDownloadThread);\n }\n\n // If the request is a duplicate, add it to the blocked tasks queue\n else{\n mBlockedTasks.add(imageDownloadThread);\n }\n }", "public Bitmap getBitmapfromUrl(String imageUrl) {\r\n try {\r\n URL url = new URL(imageUrl);\r\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\r\n connection.setDoInput(true);\r\n connection.connect();\r\n InputStream input = connection.getInputStream();\r\n Bitmap bitmap = BitmapFactory.decodeStream(input);\r\n return bitmap;\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "public static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n\n InputStream stream = getHttpConnection(url);\n if(stream!=null) {\n bitmap = BitmapFactory.decodeStream(stream);\n try {\n stream.close();\n }catch (IOException e1) {\n Log.d(\"MyDebugMsg\", \"IOException in downloadImage()\");\n e1.printStackTrace();\n }\n }\n\n return bitmap;\n }", "private static Bitmap readImageUrl(String urlString) {\n\n // Create an empty bitmap image\n Bitmap image = null;\n\n try {\n // Create and open an inputStream on the urlString\n InputStream in = new java.net.URL(urlString).openStream();\n\n // Decode the inputStream and set that to the bitmap image\n image = BitmapFactory.decodeStream(in);\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error reading image url: \" + e);\n }\n\n // Return the image\n return image;\n }", "@Override\n protected Bitmap doInBackground(String... params) {\n imageUrl = params[0];\n ImageView thumbnail = imageViewReference.get();\n try {\n InputStream is = (InputStream) new URL(imageUrl).getContent();\n Bitmap bitmap = ImageCommons.decodeSampledBitmapFromInputStream(is, thumbnail.getWidth(), thumbnail.getHeight());\n addBitmapToMemoryCache(imageUrl, bitmap);\n return bitmap;\n } catch (IOException e) {\n e.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n Log.d(\"myLog\", getClass().getSimpleName() + \" Erro ao fazer download de imagem\");\n return ImageCommons.decodeSampledBitmapFromResource(context.getResources(), R.drawable.ic_launcher, 70, 70);\n }", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "public Bitmap loadImage(String coverUrl) {\r\n\t\tBitmap img = null;\r\n\t\t//File file = new File(filePath);\r\n\t\ttry {\r\n\t\t\t// set the download URL, a url that points to a file on the internet\r\n\t\t\t// this is the file to be downloaded\r\n\t\t\tURL url = new URL(coverUrl);\r\n\r\n\t\t\t// create the new connection\r\n\t\t\tHttpURLConnection urlConnection = (HttpURLConnection) url\r\n\t\t\t\t\t.openConnection();\r\n\r\n\t\t\t// set up some things on the connection\r\n\t\t\turlConnection.setRequestMethod(\"GET\");\r\n\t\t\turlConnection.setDoOutput(true);\r\n\r\n\t\t\t// and connect!\r\n\t\t\turlConnection.connect();\r\n\r\n\t\t\t// this will be used in reading the data from the internet\r\n\t\t\tInputStream inputStream = urlConnection.getInputStream();\r\n\t\t\timg = BitmapFactory.decodeStream(inputStream);\r\n\t inputStream.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\r\n\t\t}\r\n\t\treturn img;\r\n\t}", "public static Bitmap getImage(String url){\n\t\tBitmap image = BitmapFactory.decodeStream(\n\t\t\t\topenStream(url));\n\t\tLog.i(\"IMAGE\",\"Cache hit on \"+hashURL(url));\n\t\treturn image;\n\t}", "public static Bitmap getBitmapFromUrl(String imageUrl) {\n\n try {\n\n URL url = new URL(imageUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n return BitmapFactory.decodeStream(input);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public Bitmap downloadImage(String theUrl){ \n\t \t//Log.i(\"ZZ\", \"AppDelegate downloadImage: \" + theUrl); \n\t \tdownloadInProgress = 1;\n\t InputStream in = null; \n\t \tBitmap bitmap = null;\n\t try{\n\t \tin = Obj_Downloader.OpenHttpConnection(theUrl);\n\t\t bitmap = BitmapFactory.decodeStream(in);\n\t }catch (Exception e) {\n \tLog.i(\"ZZ\", \"AppDelegate:downloadImage: ERROR: \" + e.getMessage()); \n\t //return null;\n\t }\n\t downloadInProgress = 0;\n\t return bitmap; \n\t }", "private Bitmap loadImageFromUrl(final String url) {\n try {\n // Addresses bug in SDK :\n // http://groups.google.com/group/android-developers/browse_thread/thread/4ed17d7e48899b26/\n BufferedInputStream bis = new BufferedInputStream(new URL(url).openStream(), BUFFER_IO_SIZE);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n BufferedOutputStream bos = new BufferedOutputStream(baos, BUFFER_IO_SIZE);\n copy(bis, bos);\n bos.flush();\n return BitmapFactory.decodeByteArray(baos.toByteArray(), 0, baos.size());\n } \n catch (IOException e) {\n // handle it properly\n \treturn null;\n }\n }", "private void downloadingImage(Intent intent) {\n Bitmap bitmap = null;\n InputStream in = null;\n int responseCode = -1;\n\n String urlPath = intent.getStringExtra(URL);\n\n String fileName = intent.getStringExtra(FILENAME);\n\n /*7.2 mb on web and 15.85 mb on mobile image file*/\n String s = \"https://upload.wikimedia.org/wikipedia/commons/0/05/Sambro_Island_Lighthouse_%282%29.jpg\";\n\n try {\n\n URL url = new URL(urlPath);//params[0]\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.connect();\n responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n in = httpURLConnection.getInputStream();\n bitmap = BitmapFactory.decodeStream(in);\n in.close();\n\n if (bitmap != null) {\n // successfully finished\n result = Activity.RESULT_OK;\n saveImage(bitmap, fileName);\n } else {\n publishResults(fileName, result);\n }\n }\n\n } catch (MalformedURLException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (Exception e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n Log.v(TAG, \"Exception : \" + e.getMessage());\n }\n }", "public static Bitmap downloadImageBitmap(String imageUrl) {\n Bitmap bitmap = null;\n try {\n InputStream in = new java.net.URL(imageUrl).openStream();\n bitmap = BitmapFactory.decodeStream(in);\n } catch (OutOfMemoryError e) {\n Log.e(TAG, \"Out of Memory Error in image bitmap download\");\n e.printStackTrace();\n } catch (Exception e) {\n Log.e(TAG, \"General exception in image bitmap download\");\n e.printStackTrace();\n }\n return bitmap;\n }", "private void setImage(String downloaderUri, String thubo) {\n blogImageView = mView.findViewById(R.id.postView_image_post);\n\n //request optional to assign temporary image appear before while loading the image from db.\n RequestOptions requestOptions = new RequestOptions();\n requestOptions.placeholder(R.drawable.postlist);\n\n //Glide.with(context).applyDefaultRequestOptions(requestOptions).load(thubo).into(blogImageView);\n Glide.with(context).applyDefaultRequestOptions(requestOptions).load(downloaderUri).thumbnail(\n Glide.with(context).load(thubo)\n ).into(blogImageView);\n\n }", "void downloadImage(String imageURL, ImageView imageView);", "public void getDetailImage(Context mContext, String imageId,\n\t\t\tResponse.Listener<JSONObject> listener,\n\t\t\tResponse.ErrorListener errorListener) {\n\t\tString url = getUrl(\"image/\") + imageId;\n\n\t\tHashMap<String, String> params = new HashMap<String, String>();\n\n\t\tImgurAPI.get(mContext, url, params, listener, errorListener);\n\t}", "public Bitmap getBitmapFromURL(String strURL) {\n try {\n URL url = new URL(strURL);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "private Image establishConnection(String url) throws IOException {\n\n String imgUrl = url;\n URLConnection connection = new URL(imgUrl).openConnection();\n connection.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0\");\n Image image = new Image(connection.getInputStream());\n return image;\n }", "public void getImageFromAlbum() {\n\t\tIntent intent = new Intent();\n\t\tintent.addCategory(Intent.CATEGORY_OPENABLE);\n\t\tintent.setType(\"image/*\");\n\t\t// 根据版本号不同使用不同的Action\n\t\tif (Build.VERSION.SDK_INT < 19) {\n\t\t\tintent.setAction(Intent.ACTION_GET_CONTENT);\n\t\t} else {\n\t\t\tintent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n\t\t}\n\t\tstartActivityForResult(intent, WriteOpinionActivity.RESULT_LOAD_IMAGE);\n\n\t}", "public Bitmap getBitmapFromURL(String src){\n try{\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap bitmap = BitmapFactory.decodeStream(input);\n return bitmap;\n }catch(IOException e){\n e.printStackTrace();\n return null;\n }\n }", "public Image getImage(URL paramURL) {\n/* 276 */ return getAppletContext().getImage(paramURL);\n/* */ }", "private void loadImage(){\n Log.d(getString(R.string.app_name), \"photoURL: \" + photoURL);\n String hash = photoURL.substring(0, photoURL.lastIndexOf(\".\"));\n try {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(hash.getBytes());\n hash = bytesToHex(md.digest());\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n// File cachedFile = new File(getCacheDir(), photoURL.substring(0, photoURL.lastIndexOf(\".\")));\n File cachedFile = new File(getCacheDir(), hash);\n if(cachedFile.exists()) {\n //load image from cache\n Glide.with(getApplicationContext())\n .load(cachedFile)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n// .crossFade()\n .into(picture);\n// TileBitmapDrawable.attachTileBitmapDrawable(picture, getCacheDir() + \"/\" + photoURL.split(\"\\\\.\")[0], null, null);\n setupPictureClickListener();\n\n postImageLoaded();\n } else {\n //download image\n setupReloadButtonListener();\n initImageLoader();\n }\n }", "private Image getImage(String url) {\r\n\t\ttry {\r\n\t\t\treturn ImageIO.read(new URL(url));\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public String getImageUrl();", "public void retrieveDetailedBookInfo(){\n //Check for internet connection\n if(!NetworkJSONUtils.checkInternetConnection(this)) {\n ErrorUtils.errorDialog(BookDetailsActivity.this, \"Network Error\", \"It seems you don't have any network connection. Reset your connection and try again.\");\n return;\n }\n\n //Build Uri that fetches book data\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(SCHEME)\n .authority(BASE_URL)\n .appendPath(PATH0)\n .appendPath(PATH1)\n .appendPath(PATH2)\n .appendQueryParameter(PARAM_ACTION, VALUE_ACTION_RETRIEVE_DETAILED_DATA)\n .appendQueryParameter(PARAM_GID, VALUE_GID)\n .build();\n String urlString = builder.toString();\n\n //Download and parse JSON\n downloadJSON(urlString);\n }", "private void loadImg(final ImageView imageView,String url) {\n OkHttpUtils.get(url)\n .tag(this)\n .execute(new BitmapCallback()\n {\n @Override\n public void onSuccess(Bitmap bitmap, okhttp3.Call call, Response response) {\n imageView.setImageBitmap(bitmap);\n }\n });\n }", "private void getImage()\n {\n Log.d(TAG, \"initImageBitmaps: preparing bitmaps.\");\n db.collection(\"item\")\n .whereEqualTo(\"sellerID\", uid)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n Log.d(TAG, document.getId() + \" => \" + document.getString(\"name\"));\n if (!document.getBoolean(\"soldStatus\")) {\n if (document.getString(\"image1\") != null) {\n urls.add(document.getString(\"image1\"));\n } else {\n urls.add(\"https://firebasestorage.googleapis.com/v0/b/we-sell-491.appspot.com/o/itemImages%2Fdefault.png?alt=media&token=d4cb0d3c-7888-42d5-940f-d5586a4e0a4a\");\n }\n String name = document.getString(\"name\");\n Double price = document.getDouble(\"price\");\n names.add(name);\n prices.add(price);\n id.add(document.getId());\n }\n }\n initRecyclerView();\n } else {\n Log.d(TAG, \"Error getting documents: \", task.getException());\n }\n }\n });\n }", "public Image getImage(URL paramURL, String paramString) {\n/* */ try {\n/* 298 */ return getImage(new URL(paramURL, paramString));\n/* 299 */ } catch (MalformedURLException malformedURLException) {\n/* 300 */ return null;\n/* */ } \n/* */ }", "@Override\n public Bitmap getImage(String url) {\n try {\n if (!taskForUrlAlreadyRunning(url)) {\n imageDownloadTaskMap.put(url, startDownload(url));\n }\n } catch (MalformedURLException e) {\n Log.i(\"ImageDownloadManager\", \"Malformed url\" + url);\n }\n return null;\n }", "private void fetchdriverimg(String result) throws IOException, JSONException {\n\n String url = \"http://www.mucaddam.pk/abdullah/vanapp/\" + result;\n Picasso.with(this).load(url).placeholder(R.drawable.driverico).error(R.drawable.driverico).into(dri_img, new com.squareup.picasso.Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n }\n });\n\n }", "public String getAlbumImage(int x) {\n albumLink = \"https://www.last.fm\" + albumsLinks[x];\n try {\n album = Jsoup.connect(albumLink).get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Document tempA = null;\n Elements temp = album.getElementsByClass(\"cover-art\");\n String linkB = \"https://www.last.fm\" + temp.attr(\"href\");\n try {\n tempA = Jsoup.connect(linkB).get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assert tempA != null;\n Elements elements = tempA.getElementsByClass(\"js-gallery-image\");\n return elements.attr(\"src\");\n }", "private Image getImage(String url) {\n\t\ttry {\n\t\t\treturn ImageIO.read(new URL(url));\n\t\t} catch(IOException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "String getItemImage();", "public static void loadCacheImage(Context context, final ImageView imageView, String imageUrl, String tag) {\n Cache cache = MySingleton.getInstance(context).getRequestQueue().getCache();\n Cache.Entry entry = cache.get(imageUrl);\n if (entry != null) {\n try {\n Bitmap bitmap = BitmapFactory.decodeByteArray(entry.data, 0, entry.data.length);\n imageView.setImageBitmap(bitmap);\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"ERROR\", e.getMessage());\n }\n } else {\n cache.invalidate(imageUrl, true);\n cache.clear();\n ImageRequest request = new ImageRequest(imageUrl,\n new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap bitmap) {\n imageView.setImageBitmap(bitmap);\n }\n }, 0, 0, null,\n new Response.ErrorListener() {\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n Log.e(\"ERROR VOLLY 1\", error.getMessage() + \"\");\n imageView.setImageResource(R.drawable.ic_check_black_24dp);\n }\n });\n request.setTag(tag);\n MySingleton.getInstance(context).addToRequestQueue(request);\n }\n }", "public Bitmap getBitmapFromURL(String src) {\n try {\n Log.i(TAG,\"GetbitmapfromURL src \" + src);\n URL url = new URL(src);\n URLConnection connection = (URLConnection) url.openConnection();\n connection.connect();\n Log.i(TAG,\"bitmap returned\");\n return BitmapFactory.decodeStream(new BufferedInputStream(connection.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(TAG,\"exception thrown getting bitmap url\");\n return null;\n }\n }", "public Bitmap download(String url){\n \tSystem.out.println(url);\n \t//url = \"http://140.115.113.164:8080/wardrobe/wardrobedata/pic/15b0cfe6f85d45b9b09d6cc4f8d139b749f1c58c4c8e4ec6982d843116b70aca-R.PNG\";\n \tBitmap bitmap = null;\n \tbitmap = downloadBitmap(url);\n \tif(bitmap == null)\n \tSystem.out.print(\"bitmap is null!!\");\n \taddBitmapToCache(url, bitmap);\n \treturn bitmap;\n }", "private String describeImage(String url, byte[] imageBytes) {\n Bitmap bitmap = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length);\n\n return describeImage(url, bitmap);\n }", "private void loadImage(URL url) {\n //do resource intensive operation to load image\n }", "public Bitmap getBitmapFromURL(String src) {\n try {\n\n java.net.URL url = new java.net.URL(src);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n\t\t\tprotected Drawable doInBackground(ImageView... params) {\n\t\t\t\timageview = params[0];\n\t\t\t\tDrawable drawable = null;\n\t\t\t\tFile downloadPath = createDownloadsPath(activity, url.split(\"/\"));\n\t\t\t\tdo {\n\t\t\t\t\tdrawable = Utils.LoadImageFromWebOperations(url,\n\t\t\t\t\t\t\tdownloadPath);\n\t\t\t\t\tattempts--;\n\t\t\t\t} while (attempts > 0 && drawable == null);\n\t\t\t\treturn drawable;\n\t\t\t}", "PlaceDetails(JSONObject result) {\n try {\n this.id = result.getString(\"place_id\");\n this.name = result.getString(\"name\");\n this.address = result.getString(\"formatted_address\");\n this.phone = result.getString(\"formatted_phone_number\");\n this.rating = result.getDouble(\"rating\");\n String photoReference = result.getJSONArray(\"photos\")\n .getJSONObject(0)\n .getString(\"photo_reference\");\n // Format URL\n // Photo url example\n // https://maps.googleapis.com/maps/api/place/photo?parameters\n // This URL works but the returned image indicated I'm past my API quota\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"maps.googleapis.com\")\n .appendPath(\"maps\")\n .appendPath(\"api\")\n .appendPath(\"place\")\n .appendPath(\"photo\")\n .appendQueryParameter(\"key\", BuildConfig.GOOGLE_PLACES_API_KEY)\n .appendQueryParameter(\"photoreference\", photoReference)\n .appendQueryParameter(\"maxWidth\", \"600\");\n // This URL works but the returned image indicated I'm past my API quota\n this.photoUrl = builder.build().toString();\n\n } catch (Exception e) {\n Log.d(LOG_TAG, \"There was an error parsing the Song JSONObject.\");\n }\n }", "private static Bitmap readBitmapFromNetwork(URL url)\n {\n InputStream is = null;\n BufferedInputStream bis = null;\n Bitmap bmp = null;\n try\n {\n URLConnection conn = url.openConnection();\n conn.connect();\n is = conn.getInputStream();\n bis = new BufferedInputStream(is);\n bmp = BitmapFactory.decodeStream(bis);\n }\n catch (MalformedURLException e)\n {\n Log.e(TAG, \"Bad ad URL\", e);\n }\n catch (IOException e)\n {\n Log.e(TAG, \"Could not get remote image\", e);\n }\n finally\n {\n try\n {\n if (is != null) is.close();\n if (bis != null) bis.close();\n }\n catch (IOException e)\n {\n Log.w(TAG, \"Error closing stream.\");\n }\n }\n return bmp;\n }", "public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }", "public byte[] getImage(String imageUrl) {\n\t\treturn restTemplate.getForObject(imageUrl, byte[].class);\n\t}", "private Bitmap getBitmap(String url){\n Bitmap result = null;\n try {\n InputStream in = new java.net.URL(url).openStream();\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n // Calculate inSampleSize\n options.inSampleSize = 4;\n options.inJustDecodeBounds = false;\n result = BitmapFactory.decodeStream(in, null, options);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "public void displayImage() {\n RealImage real = new RealImage(url);\n real.displayImage();\n }", "@Override\n protected String doInBackground(String... params) {\n bitmap = DownloadImageBitmap(url);\n return null;\n }", "@BindingAdapter({ \"productimageurl\" })\n public static void loadImage(ImageView imageView, String imageURL) {\n Glide.with(imageView.getContext())\n .load(imageURL)\n .placeholder(R.drawable.bisleri_bottle_img)\n .into(imageView);\n }", "@Override\n public void loadImage(String url, ImageView imageView) {\n ImageLoader.getInstance().displayImage(url, imageView);\n }", "@Override\n //updates view items in recycler view\n public final void onBindViewHolder(ViewHolder holder, int position) {\n Book book = bookList.get(position);\n\n holder.authorName.setText(book.getAuthor());\n holder.bookTitle.setText(book.getTitle());\n\n //takes updated image url to load image inside imageview\n Glide.with(context).load(book.getImageURL()).into(holder.cover);\n\n }", "private Bitmap downloadBitmap(String url) {\n \tFile bufferFolder = new File(MainActivity.image_cache_dir);\n\t\tif(!bufferFolder.exists()) bufferFolder.mkdirs();\n \t//If it is in the local file, get it from there.\n \tFile imageFile = new File(MainActivity.image_cache_dir + getFileName(url));\n\t\tif(imageFile.exists()) {\n\t\t\tSystem.out.println(\"get image from \" + imageFile.getAbsolutePath());\n\t\t\treturn BitmapFactory.decodeFile(imageFile.getAbsolutePath());\t\t\t\t\t\t\n\t\t}else{\n\t\t\tSystem.out.println(\"image \" + imageFile.getAbsolutePath() + \" doesn't exist!\");\n\t\t}\n \n \tfinal int IO_BUFFER_SIZE = 4 * 1024;\n\n // AndroidHttpClient is not allowed to be used from the main thread\n// final HttpClient client = (mode == Mode.NO_ASYNC_TASK) ? new DefaultHttpClient() :\n// AndroidHttpClient.newInstance(\"Android\");\n// final HttpGet getRequest = new HttpGet(url);\n HttpClient client = new DefaultHttpClient();\n HttpGet getRequest = new HttpGet(url);\n try {\n HttpResponse response = client.execute(getRequest);\n final int statusCode = response.getStatusLine().getStatusCode();\n if (statusCode != HttpStatus.SC_OK) {\n Log.w(\"ImageDownloader\", \"Error \" + statusCode +\n \" while retrieving bitmap from \" + url);\n return null;\n }else{\n \tLog.w(\"ImageDownloader\", \"HttpStatus.SC_OK \" + statusCode +\n \" while retrieving bitmap from \" + url);\n }\n\n final HttpEntity entity = response.getEntity();\n if (entity != null) {\n InputStream inputStream = null;\n try {\n inputStream = entity.getContent();\n // return BitmapFactory.decodeStream(inputStream);\n // Bug on slow connections, fixed in future release.\n \n FlushedInputStream flushedInputStream = new FlushedInputStream(inputStream);\n // Need to be fixed: Save the loaded picture directly and transfer into bitmap then.\n FileOutputStream fout = null;\n \t\ttry {\n \t\t\t\tfout = new FileOutputStream(imageFile);\t\t\t\t\n \t\t\t\t /*\n * Read bytes to the Buffer until there is nothing more to read(-1).\n */\n \t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(512);\n int current = 0;\n while ((current = flushedInputStream.read()) != -1) {\n baf.append((byte) current);\n }\n fout.write(baf.toByteArray()); \n \t\t\t\t//System.out.println(\"bitmap.compress \" + imageFile.getAbsolutePath());\n \t\t} catch (FileNotFoundException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}finally{\n \t\t\t\tif(fout != null){\n \t\t\t\t\ttry {\n \t\t\t\t\t\tfout.flush();\n \t\t\t\t\t\tfout.close();\n \t\t\t\t\t} catch (IOException e) {\t\t\t\t\t\t\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\t\t\t\t\t\n \t\t\t\t}\t \n \t\t\t} \t\t \n //return BitmapFactory.decodeStream(flushedInputStream);\n \t\t\treturn BitmapFactory.decodeFile(imageFile.getAbsolutePath());\n } finally {\n if (inputStream != null) {\n inputStream.close();\n }\n entity.consumeContent();\n }\n }\n } catch (IOException e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"I/O error while retrieving bitmap from \" + url, e);\n } catch (IllegalStateException e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"Incorrect URL: \" + url);\n } catch (Exception e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"Error while retrieving bitmap from \" + url, e);\n } finally {\n if ((client instanceof AndroidHttpClient)) {\n ((AndroidHttpClient) client).close();\n }\n }\n return null;\n }", "static String getImageUrl(final FlickrImage flickrImage) {\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"farm\" + flickrImage.getFarm() + \".static.flickr.com\")\n .appendPath(flickrImage.getServer())\n .appendPath(flickrImage.getFlickrId() + \"_\" + flickrImage.getSecret() + \".jpg\");\n\n return builder.build().toString();\n }", "private Bitmap downloadBitmap(final String id, final String url) {\n\n\t\t\ttry {\n\n\t\t\t\t\n\t\t\t\t//Log.e(\"123\", \"inside download -------\"+url+\"------id------\"+id);\n\t\t\t\tURL aURL = new URL(url);\n\t\t\t\tURLConnection conn = aURL.openConnection();\n\t\t\t\tconn.connect();\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\n\t\t\t\t\t\tconn.getInputStream(), 8 * 1024);\n\t\t\t\tBitmap bm = BitmapFactory.decodeStream(bis);\n\n\t\t\t\tif (bm == null) {\n\n\t\t\t\t\tDefaultHttpClient httpclient = new DefaultHttpClient();\n\t\t\t\t\tHttpGet httppost = new HttpGet(url);\n\t\t\t\t\tHttpResponse response;\n\t\t\t\t\tresponse = httpclient.execute(httppost);\n\t\t\t\t\tHttpEntity ht = response.getEntity();\n\t\t\t\t\tBufferedHttpEntity buf = new BufferedHttpEntity(ht);\n\t\t\t\t\tbm = BitmapFactory.decodeStream(buf.getContent());\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresponse = null;\n\t\t\t\t\t\tht = null;\n\t\t\t\t\t\tbuf.consumeContent();\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t//Logs.show(e);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tif (imgView != null\n\t\t\t\t\t\t\t&& imgView.getTag() != null\n\t\t\t\t\t\t\t&& imgView.getTag().toString()\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"fullImage\")) {\n\t\t\t\t\t\tif (bm != null) {\n\t\t\t\t\t\t\tint imgViewWidth = imgView.getWidth();\n\t\t\t\t\t\t\tint bitmapHeight = bm.getHeight();\n\t\t\t\t\t\t\tint bitmapWidth = bm.getWidth();\n\n\t\t\t\t\t\t\tif (imgViewWidth > 0 && bitmapWidth > 0\n\t\t\t\t\t\t\t\t\t&& bitmapWidth < imgViewWidth\n\t\t\t\t\t\t\t\t\t&& bitmapHeight > 0) {\n\t\t\t\t\t\t\t\tbitmapHeight = (int) (((float) imgViewWidth / bitmapWidth) * bitmapHeight);\n\t\t\t\t\t\t\t\tbm = Bitmap.createScaledBitmap(bm,\n\t\t\t\t\t\t\t\t\t\timgViewWidth, bitmapHeight, false);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t//Logs.show(e);\n\t\t\t\t}\n\n\t\t\t\tif (isRoundCornerReq) {\n\t\t\t\t\tImageHelper mImageHelper = new ImageHelper();\n\t\t\t\t\tbm = mImageHelper.getRoundedCornerImage(bm);\n\t\t\t\t}\n\t\t\t\tif (bm != null) {\n\t\t\t\t\taddBitmapToSoftCache(id, bm);\n\t\t\t\t}\n\t\t\t\t//Log.e(\"123\", \"aURL----\"+aURL+\"----bm------\"+bm);\n\t\t\t\tbis.close();\n\t\t\t\tbis = null;\n\t\t\t\tconn = null;\n\t\t\t\taURL = null;\n\t\t\t\treturn bm;\n\t\t\t} catch (IOException e) {\n\n\t\t\t\t\n\n\t\t\t\t//Logs.show(e);\n\n\t\t\t} catch (Exception e) {\n\n\t\t\t\t\n\n\t\t\t\t//Logs.show(e);\n\n\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t//Logs.show(e);\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t}", "public String getImageURL() \r\n\t{\r\n\t\t\r\n\t\treturn imageURL;\r\n\t\t\r\n\t}", "private static Bitmap getBitmap(String imageURL){\n\t\tBitmap bmp = null;\n\n\t\ttry {\n\t\t\tbmp = BitmapFactory.decodeStream((InputStream) new URL(imageURL).getContent());\n\t\t} catch (MalformedURLException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\treturn bmp;\n\t}", "private void fetchBooks(String barcode_number) {\n Log.d(\"fetchBooks\", \"Books being fetched...\");\n client = new BookClient();\n final String error = \"{\\\"start\\\":0,\\\"num_found\\\":0,\\\"numFound\\\":0,\\\"docs\\\":[]}\";\n\n client.getBooks(barcode_number, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n try {\n JSONArray docs = null;\n if(response != null) {\n if (response.toString().equals(error)) {\n // Deal with invalid barcode\n Log.d(\"ReceievedError\", \"received error\");\n errorText.setText(\"Error: Could not find book \" + barcodeID);\n } else {\n Log.d(\"debug\", \"response = \" + response);\n // Get the docs json array\n docs = response.getJSONArray(\"docs\");\n // Parse json array into array of model objects\n final ArrayList<Book> books = Book.fromJson(docs);\n // retrieve first book out of array\n Book myBook = books.get(0);\n String title = \"Title:\";\n String author = \"Author\";\n String barcode = \"Barcode ID:\";\n\n titleText.setText(myBook.getTitle());\n authorText.setText(myBook.getAuthor());\n preTitleText.setText(title);\n preAuthorText.setText(author);\n preBarcodeText.setText(barcode);\n\n Log.d(\"Picasso\", \"getContext() = \" + getContext());\n\n Picasso.with(getContext()).load(Uri.parse(myBook.getLargeCoverUrl())).error(R.drawable.ic_nocover).into(coverImage);\n }\n }\n } catch (JSONException e) {\n // Invalid JSON format\n Log.d(\"ReceievedError\", \"received error\");\n errorText.setText(\"Error: Received invalid JSON format\");\n }\n }\n });\n }", "public void ImageCreate(){\n Picasso.get().load(url).into(imageView);\n }", "@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n\t \tprofile_photo.setVisibility(View.VISIBLE);\n\t \tUri selectedImage = data.getData();\n\t String[] filePathColumn = { MediaStore.Images.Media.DATA };\n\n\t Cursor cursor = getContentResolver().query(selectedImage,\n\t filePathColumn, null, null, null);\n\t cursor.moveToFirst();\n\n\t int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t String picturePath = cursor.getString(columnIndex);\n\t cursor.close();\n\t \n\t ImageView imageView = (ImageView) findViewById(R.id.profile_photo);\n\t imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));\n\t }\n\t }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n int poster_path_index = cursor.getColumnIndex(MovieContract.MovieDetailsEntry.COLUMN_POSTER_PATH);\n String poster_path = cursor.getString(poster_path_index);\n String baseURL = \"http://image.tmdb.org/t/p/w185\" + poster_path;\n ImageView imageView = (ImageView) view.findViewById(R.id.imageView);\n\n\n if (baseURL.contains(\"null\")) {\n Picasso.with(context).load(R.drawable.poster_not_available)\n .resize(185, 200)\n .into(imageView);\n\n } else {\n\n if(isNetworkAvailable()) {\n Picasso.with(context).load(baseURL).into(imageView);\n// Picasso.with(context).load(\"http://i.imgur.com/DvpvklR.png\").into(imageView\n }else{\n Picasso.with(context)\n .load(baseURL)\n .networkPolicy(NetworkPolicy.OFFLINE)\n .placeholder(R.drawable.error_loading)\n .into(imageView);\n\n }\n }\n }", "public void drawImage() {\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n imageView.setVisibility(View.VISIBLE);\n Glide.with(MainActivity.this).load(iURI).fitCenter().into(imageView);\n }", "@Override\n public void onHttpResponseReceived(Bitmap response, Params<Bitmap> params) {\n if(null != mBitmapFetcher && !mBitmapFetcher.isCancelled()){\n final String baseUrl = params.getUrl();\n if (baseUrl.equals(mImageObject.getImageThumbnailUrl())) {\n Utils.updateImageWithDrawable(response, mImageView);\n }\n mBitmapFetcher = null;\n }\n }", "public String getLargeCoverUrl() {\n /*\n By appending ?default=false to the URL, the API will return a 404 message if the book cover\n is not found. This actually works to our benefit because we will be supplying our own image\n in place of missing book covers.\n */\n return \"http://covers.openlibrary.org/b/olid/\" + openLibraryId + \"-L.jpg?default=false\";\n }", "private Bitmap getBitmap(String url) {\n File file = diskCache.getData(url);\n Bitmap bitmap = decode(file);\n if (bitmap == null) {\n // If no then load it\n bitmap = loadAndCacheBitmap(file, url);\n } else {\n Log.d(\"HIHO\", \"bitmap from memory\");\n }\n\n return bitmap;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n picturePath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap bitmap = BitmapFactory.decodeFile(picturePath);\n mItemImageView.setImageBitmap(bitmap);\n }\n }", "public static Bitmap readBitmapFromNetwork(String url) {\n InputStream inputStream = null;\n BufferedInputStream bufferedInputStream = null;\n Bitmap bitmap = null;\n \n try {\n URLConnection conn = new URL(url).openConnection();\n conn.connect();\n inputStream = conn.getInputStream();\n bufferedInputStream = new BufferedInputStream(inputStream, 8192);\n bitmap = BitmapFactory.decodeStream(bufferedInputStream);\n } catch (OutOfMemoryError e) {\n Log.d(TAG, \"Ran out of memory.\", e);\n } catch (Throwable e) {\n if (!e.getClass().equals(UnknownHostException.class)) {\n Log.d(TAG, \"Could not get remote image : \" + e.getClass().getSimpleName(), e);\n }\n } finally {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n if (bufferedInputStream != null) {\n bufferedInputStream.close();\n }\n } catch (IOException e) {\n Log.d(TAG, \"Error closing stream.\", e);\n }\n }\n return bitmap;\n }", "private void storeImage(Boolean hasImage){\n if (hasImage) {\r\n RequestQueue queue = Volley.newRequestQueue(getBaseContext());\r\n final String command = getString(R.string.server_address) + \"/\" + getString(R.string.get_image_server)\r\n + \"username=\" + username;\r\n// Request a string response from the provided URL.\r\n StringRequest stringRequest = new StringRequest(Request.Method.GET, command,\r\n new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String response) {\r\n // Display the first 500 characters of the response string.\r\n //Log.d(\"ddd\", \"command :\" + command);\r\n //Log.d(\"ddd\", \"writing :\" + response);\r\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n //Log.d(\"aaa\", error.toString());\r\n }\r\n\r\n });\r\n\r\n// Add the request to the RequestQueue.\r\n queue.add(stringRequest);\r\n }\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n //everything processed successfully\n if (requestCode == Image_Gallery_Request) {\n //image gallery correctly responds\n Uri imageUri = data.getData(); //address of image on SD Card\n InputStream inputStream; //declaring stream to read data from SD card\n try {\n inputStream = getContentResolver().openInputStream(imageUri);\n Bitmap imagebtmp = BitmapFactory.decodeStream(inputStream); //Puts stream data into bitmap format\n Profile_Picture.setImageBitmap(imagebtmp); //Loads Image to ImageView\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n //error message if image is unavailable\n Toast.makeText(this, \"Unable to open image\", Toast.LENGTH_LONG).show();\n }\n }\n }\n }", "public void getImageBitMap(final String url, final GetImageBitMapListener listener) {\n String localFileName = getLocalImageFileName(url);\n final Bitmap image = loadImageFromFile(localFileName);\n if (image == null) { //if image not found - try downloading it from parse\n firebaseModel.getImageBitMap(url, new GetImageBitMapListener() {\n @Override\n public void onComplete(Bitmap bitMap) {\n //2. save the image localy\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }\n\n @Override\n public void fail() {\n listener.fail();\n }\n });\n } else {\n //Log.d(\"TAG\",\"OK reading cache image: \" + localFileName);\n listener.onComplete(image);\n }}", "public static Bitmap getBitmapFromUrl(String urlString, Context context, boolean shouldSave) {\n try {\n //Set up http connection\n URL url = new URL(urlString);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n\n //Retrieve and decode the input stream\n InputStream input = connection.getInputStream();\n Bitmap mBitmap = BitmapFactory.decodeStream(input);\n\n FileOutputStream fos;\n\n if(shouldSave) {\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.PNG, 100, bytes);\n urlString = urlString.replace(File.separator, \"\");\n\n try {\n fos = context.openFileOutput(urlString, Context.MODE_PRIVATE);\n\n fos.write(bytes.toByteArray());\n fos.close();\n\n } catch (FileNotFoundException e) {\n Log.d(TAG, \"Unable to find required output file\");\n e.printStackTrace();\n\n } catch (IOException e) {\n Log.d(TAG, \"Failed to write to output stream\");\n e.printStackTrace();\n }\n }\n return mBitmap;\n\n } catch (MalformedURLException e) {\n Log.d(TAG, \"Malformed URL Exception thrown, provided URL for image download is invalid:\" +\n urlString);\n e.printStackTrace();\n } catch (IOException i) {\n Log.d(TAG, \"Unable to open URL connection when downloading image\");\n i.printStackTrace();\n }\n\n return null;\n }", "public void run() {\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }", "java.lang.String getProductImageUrl();", "private void cargarImagenWebService(String rutaImagen) {\n\n String url_lh = Globals.url;\n\n String urlImagen = \"http://\" + url_lh + \"/proyecto_dconfo_v1/\" + rutaImagen;\n urlImagen = urlImagen.replace(\" \", \"%20\");\n\n ImageRequest imageRequest = new ImageRequest(urlImagen, new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap response) {\n iv_bank_prueba.setBackground(null);\n iv_bank_prueba.setImageBitmap(response);\n }\n }, 0, 0, ImageView.ScaleType.CENTER, null, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error al cargar la imagen\", Toast.LENGTH_SHORT).show();\n }\n });\n //request.add(imageRequest);\n VolleySingleton.getIntanciaVolley(getApplicationContext()).addToRequestQueue(imageRequest);\n }", "public String getImageUrl() {\n return mImageUrl;\n }", "public String getBandImage(int x) {\n String link = \"https://www.last.fm\" + photosLinks[x];\n try {\n image = Jsoup.connect(link).get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Elements elements = image.getElementsByClass(\"js-gallery-image\");\n return elements.attr(\"src\");\n }", "public void get(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.GetImageRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.containerregistry.v1.ImageOuterClass.Image> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getGetMethod(), getCallOptions()), request, responseObserver);\n }", "private void doNetGetImg() {\n\t\tString url = UploadUtils.PATIENTAPP_FILE_URL + CommonUtils.getTokenParam(activity) +\"&patientId=\"+orderMoreDetails.getPatientId()+\"&reportType=mr\";\n\t\tQJNetUICallback2 callback = new QJNetUICallback2<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>(activity) {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tif (result != null\n\t\t\t\t\t\t&& result.getResults() != null) {\n\t\t\t\t\tList<ImgQiNiuEntity> list = result.getResults().get(\"files\");\n\t\t\t\t\tif (list != null) {\n\n\t\t\t\t\t\tif (list.size()>=9) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.GONE);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 0; i < list.size(); i ++){\n\t\t\t\t\t\t\tImageItem item = new ImageItem();\n\t\t\t\t\t\t\titem.imagePath = list.get(i).getThumbnailUrl();\n\t\t\t\t\t\t\titem.upImagePath = list.get(i).getAbsFileUrl();\n\t\t\t\t\t\t\tdataChoosed.add(item);\n\t\t\t\t\t\t\tnoScrollgridview.setAdapter(adapter);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void onError(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onError(e, result);\n\t\t\t\tToastUtil.showToast(activity, \"获取失败!\",Toast.LENGTH_LONG);\n\t\t\t}\n\n\t\t\tpublic void onCompleted(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onCompleted(e, result);\n\t\t\t}\n\t\t};\n\t\tNetOld.with(activity).fetch( url ,null, new TypeToken<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>() {}, callback);\n\t}", "public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage);", "private Bitmap loadBitmap(String uri, int reqWidth, int reqHeight) {\n Bitmap bitmap = null;\n try {\n bitmap = ImageLoader.getImageDiskLruCache(mContext).get(uri, reqWidth, reqHeight);\n if (bitmap != null) {\n\n ImageLoader.getImageLruCache().put(MD5Utils.hashKeyFromUrl(uri), bitmap);\n return bitmap;\n } else {\n bitmap = loadBitmapFromHttp(uri, reqWidth, reqHeight);\n if (bitmap != null) {\n }\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (bitmap == null && !mIsDiskLruCacheCreated) {\n bitmap = NetworkUtils.downloadBitmapFromUrl(uri);\n }\n return bitmap;\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n SuperCar superCar = superCars.get(position);\n\n //Loading image from url\n imageLoader = CustomVolleyRequest.getInstance(context).getImageLoader();\n imageLoader.get(superCar.getImageUrl(), ImageLoader.getImageListener(holder.imageView1, R.drawable.ic_launcher_background, android.R.drawable.ic_dialog_alert));\n\n //Showing data on the views\n holder.imageView1.setImageUrl(superCar.getImageUrl(), imageLoader);\n\n holder.textViewName.setText(superCar.getName());\n holder.textViewBrand.setText(superCar.getBrand());\n holder.textViewQuantity.setText(superCar.getQuantity());\n holder.textViewPrice.setText(String.valueOf(superCar.getPrice()));\n holder.ratingBar.setRating(superCar.getRating());\n\n\n Log.i(\"image2\", \"[\"+superCar.getImageUrl()+\"]\");\n holder.cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(HorizontalCardAdapter.this.context, ProductDetailPage.class);\n intent.putExtra(\"image\",superCar.getImageUrl().trim());\n intent .putExtra(\"itemId\", superCar.getId());\n intent .putExtra(\"category\", superCar.getCategory().trim());\n intent .putExtra(\"brand\", superCar.getBrand().trim());\n intent.putExtra(\"name\", holder.textViewName.getText().toString());\n intent .putExtra(\"quantity\", superCar.getQuantity().trim());\n intent .putExtra(\"price\", superCar.getPrice());\n intent .putExtra(\"rating\", superCar.getRating());\n context.startActivity(intent);\n }\n });\n\n }", "private void downloadImage(String url, int version) {\n ContextWrapper cw = new ContextWrapper(getApplicationContext());\n // path to /data/data/yourapp/app_data/imageDir\n File directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\n // Create imageDir\n File myPath = new File(directory, \"profile.jpg\");\n try {\n URL downloadURL = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) downloadURL.openConnection();\n int responseCode = conn.getResponseCode();\n if (responseCode != 200) {\n throw new Exception(\"Error in connection\");\n }\n InputStream is = conn.getInputStream();\n FileOutputStream os = new FileOutputStream(myPath);\n byte[] buffer = new byte[1024];\n int byteCount;\n while ((byteCount = is.read(buffer)) != -1) {\n os.write(buffer, 0, byteCount);\n }\n os.close();\n is.close();\n if (version > -1) {\n PrefManager.saveInt(DownloadService.this, \"VERSION\", version);\n }\n Log.d(\"com.ajs.glidetest\", \"download complete \" + version);\n PrefManager.saveBoolean(DownloadService.this, \"DOWNLOAD_OK\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void getSqlDetails() {\n\n String url= String.format(\"http://192.168.2.22/hm/api/urunArar.php?searchQuery=\"+urunAydi);\n pd.show();\n StringRequest stringRequest = new StringRequest(Request.Method.GET,\n url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n pd.hide();\n\n\n try {\n\n JSONArray jsonarray = new JSONArray(response);\n\n for(int i=0; i < jsonarray.length(); i++) {\n\n JSONObject jsonobject = jsonarray.getJSONObject(i);\n\n\n String id = jsonobject.getString(\"id\");\n String brand = jsonobject.getString(\"marka\");\n String isim = jsonobject.getString(\"model\");\n String kucukResim = jsonobject.getString(\"kucuk_resim\");\n String imgURL =\"http://192.168.2.22/hm/\"+kucukResim;\n urunAdi.setText(isim);\n urunID.setText(id);\n urunMarka.setText(brand);\n Picasso.get().load(\"http://192.168.2.22/hm/\"+kucukResim).into(urunResmi);\n\n //new DownLoadImageTask(urunResmi).execute(imgURL);\n\n if(urunAdi.toString()!=\"\") {\n\n adetLbl.setVisibility(View.VISIBLE);\n btnCapturePicture.setVisibility(View.VISIBLE);\n urunResmi.setVisibility(View.VISIBLE);\n }\n\n }\n } catch (JSONException e) {\n e.printStackTrace();\n\n\n }\n\n\n\n\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if(error != null){\n\n Toast.makeText(getApplicationContext(), \"Veri tabanına bağlanılamadı\", Toast.LENGTH_LONG).show();\n }\n }\n }\n\n );\n\n MySingleton.getInstance(getApplicationContext()).addToRequestQueue(stringRequest);\n }", "private void loadProfilePic(final CircleImageView circleImageView, final String url, final boolean sender){\n\n if (url == null)\n {\n circleImageView.setImageResource(R.drawable.ic_profile);\n return;\n }\n\n circleImageView.setTag(url);\n\n VolleyUtils.getImageLoader().get(url, new ImageLoader.ImageListener() {\n @Override\n public void onResponse(final ImageLoader.ImageContainer response, boolean isImmediate) {\n\n // Checking to see that there is no new rewuest on this image.\n if (circleImageView.getTag() != null && !circleImageView.getTag().equals(url))\n return;\n\n if (isImmediate && response.getBitmap() == null)\n {\n circleImageView.setImageResource(R.drawable.ic_profile);\n return;\n }\n\n if (response.getBitmap() != null)\n {\n if (!isScrolling)\n {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n else\n {\n animateSides(circleImageView, !sender, new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n\n circleImageView.getAnimation().start();\n }\n }\n }\n\n @Override\n public void onErrorResponse(VolleyError error) {\n circleImageView.setImageResource(R.drawable.ic_profile);\n }\n }, circleImageView.getWidth(), circleImageView.getWidth());\n }", "public String getImageUrl() {\n return imageUrl;\n }" ]
[ "0.6753828", "0.6697393", "0.6430013", "0.64226454", "0.63410634", "0.63273454", "0.6304073", "0.6301076", "0.6300889", "0.62901074", "0.62629163", "0.6231119", "0.6162356", "0.6145405", "0.6072204", "0.59812224", "0.59540135", "0.593232", "0.5888448", "0.5855414", "0.5853782", "0.5851587", "0.5848198", "0.58365643", "0.5810649", "0.5787789", "0.5786742", "0.5785685", "0.575704", "0.57564443", "0.5738908", "0.5731651", "0.5726906", "0.5715256", "0.57093626", "0.57066816", "0.57010144", "0.5698894", "0.56924766", "0.56847876", "0.56589746", "0.56508607", "0.5646884", "0.5646752", "0.5643202", "0.5638334", "0.5635209", "0.55990654", "0.55957574", "0.5595604", "0.5587784", "0.5586615", "0.5570577", "0.55349135", "0.5526638", "0.55221474", "0.5521845", "0.5513864", "0.55018234", "0.5500672", "0.54668903", "0.54655206", "0.54466695", "0.5446014", "0.5445695", "0.5439696", "0.54356325", "0.54313254", "0.5430543", "0.5417512", "0.5412334", "0.54103756", "0.5408259", "0.54047805", "0.5401496", "0.539882", "0.5397093", "0.5392663", "0.53917986", "0.5385707", "0.53842336", "0.53814024", "0.5372574", "0.5354213", "0.5349855", "0.5348705", "0.5334582", "0.533378", "0.53325695", "0.53197277", "0.53116053", "0.5307737", "0.53053427", "0.5297724", "0.5296353", "0.5290059", "0.52890456", "0.5277703", "0.5275488", "0.52720827" ]
0.79181397
0
Downloads and parses JSON through Volley library
public void downloadJSON(String url){ //Build request for raw JSON data StringRequest jsonRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() { @Override public void onResponse(String response) { try { //When data is received, convert to JSONObject and try to parse jsonResponse = new JSONObject(response); parseJSON(jsonResponse); } catch (JSONException JSONE) { //Print error if there was one JSONE.printStackTrace(); ErrorUtils.errorDialog(BookDetailsActivity.this, "Data Error", "There was an error with the data format. Please try again later."); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { //Print error ErrorUtils.errorDialog(BookDetailsActivity.this, "Could not connect to the server", "Could not connect to the server at this time, please try again later."); } }); //Start the JSON request queue.add(jsonRequest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void downloadJSON() {\n new downloadJsonAsync().execute(Urls.GET_TAGS, Urls.GET_REST);\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 }", "public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}", "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 }", "public void loadJson(){\n new DownloadJsonTask().execute(URL3);\n// new DownloadJsonTask().execute(URL2);\n }", "public void jsonYifyParse(String IMDBId){\n\n RequestQueue mQueue;\n mQueue = Volley.newRequestQueue(this);\n\n //Request aan de hand van de IMDB code\n String yifyUrl = \"https://yts.am/api/v2/list_movies.json?query_term=\" + IMDBId;\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, yifyUrl, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n ArrayList<Torrent> torrentArray = new ArrayList<>();\n\n JSONObject jsonObject = new JSONObject();\n JSONArray jsonArray = new JSONArray();\n String title, year, resolution, size, sitelink, imageLink, magnetlink;\n\n //Parsen van de Yify API Json\n try {\n jsonObject = response.getJSONObject(\"data\");\n\n if (!jsonObject.has(\"movies\")){\n Toast.makeText(MovieOptionActivity.this, \"No Torrents found\", Toast.LENGTH_SHORT).show();\n }\n else{\n jsonArray = jsonObject.getJSONArray(\"movies\");\n\n for(int i=0; i < jsonArray.length(); i++){\n title = jsonArray.getJSONObject(i).getString(\"title\");\n year = jsonArray.getJSONObject(i).getString(\"year\");\n imageLink = jsonArray.getJSONObject(i).getString(\"medium_cover_image\");\n\n JSONArray torrentJsonArray = new JSONArray();\n\n\n torrentJsonArray = jsonArray.getJSONObject(i).getJSONArray(\"torrents\");\n for(int k=0; k < torrentJsonArray.length(); k++){\n resolution = torrentJsonArray.getJSONObject(k).getString(\"quality\");\n size = torrentJsonArray.getJSONObject(k).getString(\"size\");\n sitelink = torrentJsonArray.getJSONObject(k).getString(\"url\");\n magnetlink = torrentJsonArray.getJSONObject(k).getString(\"url\");\n\n Log.i(\"torrent title:\", size + \" - \"+ resolution + \" - \"+ torrentJsonArray.length());\n\n Torrent torrent = new Torrent(title, resolution, size, sitelink, imageLink, magnetlink);\n torrentArray.add(torrent);\n }\n }\n goToTorrent(torrentArray);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n mQueue.add(request);\n\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "public static void ObtenerTutor(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/tutor\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\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 static void ObtenerDatosGustoVerdura(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/GustoVerdura\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public static void ObtenerDatosDetalleReg(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/DetalleReg\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\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 }", "private JsonArrayRequest getDataFromServer(String url, String requestCount) {\r\n\r\n //JsonArrayRequest of volley\r\n return new JsonArrayRequest(url + String.valueOf(requestCount),\r\n new Response.Listener<JSONArray>() {\r\n @Override\r\n public void onResponse(JSONArray response) {\r\n //Calling method to parse the json response\r\n parseData(response, requestCount);\r\n }\r\n },\r\n new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n //If an error occurs that means end of the list has reached\r\n }\r\n });\r\n }", "public static void ObtenerCanjeFi(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/CanjeFi\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "private void getData() {\n final ProgressDialog loading = ProgressDialog.show(this, \"Loading Data\", \"Mohon bersabar\",false,false);\n\n JsonObjectRequest ambildata = new JsonObjectRequest(Request.Method.GET, Config.DATA_URL, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n //kalau berhasil ambil url\n try {\n loading.dismiss();//hilangkan loading\n JSONArray array = response.getJSONArray(\"data\");\n\n for (int i = 0; i < array.length(); i++){\n JSONObject json = array.getJSONObject(i);\n Log.i(\"JSON \",\"\"+json); //nampilin info\n MovieList movie = new MovieList();\n movie.setMovie(json.getString(Config.TAG_MOVIE));\n movie.setPoster(json.getString(Config.TAG_POSTER));\n movie.setGenre(json.getString(Config.TAG_GENRE));\n movie.setDuration(json.getString(Config.TAG_DURATION));\n\n JSONArray arrayjadwal = json.getJSONArray(\"jadwal\");\n for (int ih = 0; ih < arrayjadwal.length(); ih++){\n JSONObject objectJadwal = arrayjadwal.getJSONObject(0);\n Log.i(\"JSON jadwal \",\"\"+objectJadwal); //nampilin info\n movie.setHarga(objectJadwal.getString(Config.TAG_HARGA));\n }\n\n listMovies.add(movie);\n }\n setAdapter(listMovies);\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.i(\"Errornya\",\"\"+e);\n Toast.makeText(MainActivity.this, \"Errornya\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //kalau gagal\n Log.i(\"Errornya\",\"\"+error);\n Toast.makeText(MainActivity.this, \"Errornya\"+error.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n //bikin antrian biar nggak langsung ngeload semua\n RequestQueue antrian = Volley.newRequestQueue(this);\n antrian.add(ambildata);\n }", "public void getJSONArray(String url, final onSuccessCallback callback){\n String uri = Uri.parse(API_URL + url).buildUpon().build().toString();\n\n JsonArrayRequest request = new JsonArrayRequest(uri, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n callback.onSuccess(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n callback.onError(error);\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n headers.put(API_Header, API_KEY);\n headers.put(\"Accept\", \"text/plain\");\n return headers;\n }\n };\n requestQueue.add(request);\n\n\n\n request.setRetryPolicy(new DefaultRetryPolicy(\n 30000,\n DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT\n ));\n }", "public static void ObtenerDatosRecompensas(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n\n String url = \"http://161.35.14.188/Persuhabit/recompensas\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n String descrip = jsonObject.getString(\"descrip\");\n System.out.println(descrip);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public void jsonIMDBParse(){\n\n RequestQueue mQueue;\n mQueue = Volley.newRequestQueue(this);\n\n String tmdbUrl = \"https://api.themoviedb.org/3/movie/\"+ movie.getId() + \"/external_ids?api_key=1e9f1e07ae99796a8c5c9932ada044ab\";\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, tmdbUrl, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n String imdbId = \"\";\n\n try {\n imdbId = response.getString(\"imdb_id\");\n Log.i(\"imdb code\", imdbId);\n jsonYifyParse(imdbId);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n mQueue.add(request);\n\n }", "public void getDetalJson(String url) {\n String kw = \"flag\";\n client = new OkHttpClient();\n final Request request = new Request.Builder()\n .url(url)\n .build();\n Call call = client.newCall(request);\n call.enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n System.out.println(e);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String htmlStr = response.body().string();\n //System.out.println(\"this is json of detail\" + htmlStr);\n try {\n detail_json = new JSONObject(htmlStr);\n //parsePageJson(json);\n //System.out.println(detail_json);\n } catch (Exception e) {\n System.out.println(\"error again\");\n }\n Intent intent = new Intent(getActivity(), FavDetailViewPagerActivity.class);\n intent.putExtra(\"detail_json_str\",htmlStr);\n startActivity(intent);\n }\n });\n }", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "public static void ObtenerDatosRegistro(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/registro\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public void bolParse(){\n\n RequestQueue mQueue;\n mQueue = Volley.newRequestQueue(this);\n\n String bolUrl = \"https://api.bol.com/catalog/v4/search/?q=\" + movie.getTitle() + \"&offset=0&limit=40&dataoutput=products,categories&apikey=C46AD0F51E7D43E2B1EE160AEE827820&format=json\";\n\n Log.i(\"check true:\", movie.getTitle());\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, bolUrl, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n ArrayList<Bol> bolArray = new ArrayList<>();\n\n JSONArray jsonArray, offerArray, linkArray = new JSONArray();\n JSONObject offerData = new JSONObject();\n\n String title, type, price, shopLink, imageLink;\n\n //Parsen van de Json response.\n try {\n if(!response.has(\"products\")){\n Toast.makeText(MovieOptionActivity.this, \"No products found\", Toast.LENGTH_SHORT).show();\n }\n else{\n jsonArray = response.getJSONArray(\"products\");\n\n\n for(int i=0; i < jsonArray.length(); i++){\n\n if(jsonArray.getJSONObject(i).getString(\"gpc\").equals(\"dvdmo\")){\n\n title = jsonArray.getJSONObject(i).getString(\"title\");\n type = jsonArray.getJSONObject(i).getString(\"summary\");\n\n offerData = jsonArray.getJSONObject(i).getJSONObject(\"offerData\");\n offerArray = offerData.getJSONArray(\"offers\");\n price = offerArray.getJSONObject(0).getString(\"price\");\n\n linkArray = jsonArray.getJSONObject(i).getJSONArray(\"urls\");\n shopLink = linkArray.getJSONObject(0).getString(\"value\");\n if(jsonArray.getJSONObject(i).has(\"images\")){\n linkArray = jsonArray.getJSONObject(i).getJSONArray(\"images\");\n if(linkArray.getJSONObject(3).has(\"url\")){\n imageLink = linkArray.getJSONObject(3).getString(\"url\");\n }\n else{\n imageLink = \"https://s.s-bol.com/nl/static/images/main/noimage_124x100default.gif\";\n }\n\n }\n else{\n imageLink = \"https://s.s-bol.com/nl/static/images/main/noimage_124x100default.gif\";\n }\n Bol bol = new Bol(title, type, price, shopLink, imageLink);\n bolArray.add(bol);\n }\n }\n Log.i(\"lenth\", String.valueOf(bolArray.size()));\n if(bolArray.size() == 0){\n Toast.makeText(MovieOptionActivity.this, \"No products found\", Toast.LENGTH_SHORT).show();\n }\n else{\n goToBol(bolArray);\n }\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n mQueue.add(request);\n\n }", "public static void ObtenerDatosHistorial_Autoeficacia(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/HistorialAuto\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "private void jsonParse() {\n String url = \"http://coms-309-sb-4.misc.iastate.edu:8080/getroommembers\";\n url = url + \"/\" + sessionManager.getRoomid() + \"/\" + sessionManager.getID() + \"/\";\n\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n JSONArray jsonArray = response.getJSONArray(\"Users\");\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject List = jsonArray.getJSONObject(i);\n String temp = List.getString(\"Role\");\n if(temp.equals(\"VIEWER\")){\n temp = \"Viewer\";\n }else if(temp.equals(\"ROOMMATE\")){\n temp = \"Editor\";\n } else{\n temp = \"Owner\";\n }\n items.add(List.getString(\"Name\") + \": \" + temp);\n permissions.add(temp);\n users.add(List.getString(\"Name\"));\n usersID.add(List.getString(\"UserId\"));\n }\n adapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n mQueue.add(request);\n }", "public static void ObtenerDatosGustoFrutas(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/GustoFrutas\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public static void ObtenerDatosMensajes_Persuasivos(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/MsgPersuasivo\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public void jsonParse () {\n\n //URL with JSON\n String url = \"https://static-ri.ristack-3.nn4maws.net/v1/plp/en_gb/2506/products.json\";\n\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,\n response -> {\n try {\n JSONArray products = response.getJSONArray(\"Products\");\n\n //Iterating over the list of products in JSON file, using first visible item\n //and last visible item variables from scroll listener\n for(int i = firstItemVisible; i < lastItemVisible; i++){\n JSONObject product = products.getJSONObject(i);\n\n //Extracting the needed data\n String name = product.getString(\"name\");\n String price = product.getString(\"cost\");\n String prodid = product.getString(\"prodid\");\n\n //Extracting the image of product based on its ID from different URL\n String imageURLString = \"http://riverisland.scene7.com/is/image/RiverIsland/\" + product.getString(\"prodid\") + \"_main\";\n URL imageURL = new URL(imageURLString);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 2; //Changing the size of the image\n Bitmap bmp = BitmapFactory.decodeStream(imageURL.openConnection().getInputStream(),null, options);\n\n //Creating new product with necessary parameters\n product newProduct = new product(name,price,prodid,bmp,imageURLString);\n\n //Adding the product to the Array with products\n listOfProducts.add(newProduct);\n }\n\n } catch (JSONException | IOException e) {\n e.printStackTrace();\n }\n\n //Running method to add the adapter\n if(recyclerView.getAdapter()==null) {\n //New adapter if starting\n productAdapter = new Adapter(this, listOfProducts);\n recyclerView.setAdapter(productAdapter);\n }\n else{\n productAdapter.notifyDataSetChanged(); //notifies View reflecting data to refresh\n }\n\n\n }, Throwable::printStackTrace);\n mQueue.add(request);\n }", "private void getData(){\n final ProgressDialog loading = ProgressDialog.show(this, \"Please wait...\",\"Fetching data...\",false,false);\n\n //Creating a json array request to get the json from our api\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(DATA_URL,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n //Dismissing the progressdialog on response\n loading.dismiss();\n\n\n Log.d(\"Data\", String.valueOf(response));\n\n //Displaying our grid\n showGrid(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n }\n );\n\n //Creating a request queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n //Adding our request to the queue\n requestQueue.add(jsonArrayRequest);\n }", "public void retrieveInformation() {\n\n new GetYourJsonTask2().execute(new ApiConnector());\n\n// Retrieve Info from ThingSpeak\n// String lightApi = \"https://api.thingspeak.com/channels/595680/fields/1.json?results=2\";\n// JsonObjectRequest objectRequest =new JsonObjectRequest(Request.Method.GET, lightApi, null,\n// new Response.Listener<JSONObject>() {\n// @Override\n// public void onResponse(JSONObject response) {\n// textView.append(\"lala\");\n// try {\n// JSONArray feeds = response.getJSONArray(\"feeds\");\n// for(int i=0; i<feeds.length();i++){\n// JSONObject jo = feeds.getJSONObject(i);\n// String l=jo.getString(\"field1\");\n// Toast.makeText(getApplicationContext(),l,Toast.LENGTH_SHORT).show();\n// textView.append(l);\n//\n// }\n// } catch (JSONException e) {\n// textView.append(\"error\");\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n//\n// }\n// });\n\n\n\n }", "public static String downloadJSON(String url) {\n String json=null, line;\n\n InputStream stream = getHttpConnection(url);\n if (stream != null) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n StringBuilder out = new StringBuilder();\n try {\n while ((line = reader.readLine()) != null) {\n out.append(line);\n }\n reader.close();\n json = out.toString();\n } catch (IOException ex) {\n Log.d(\"MyDebugMsg\", \"IOException in downloadJSON()\");\n ex.printStackTrace();\n }\n }\n return json;\n }", "private void getFeed(){\n JsonObjectRequest mchannelReq = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\n // hidePDialog();\n pDialog.dismiss();;\n\n try {\n JSONObject response1 = new JSONObject(response.toString());\n JSONArray list = response1.getJSONArray(\"items\"); // you have done this wrong\n\n\n // parsing json\n for(int i = 0; i<list.length();i++) {\n try {\n JSONObject obj = list.getJSONObject(i);\n\n ChannelList mchannel = new ChannelList();\n mchannel.setTitle(obj.getJSONObject(\"snippet\").getString(\"title\")); // this will work, but its not the good way\n\n // the better way will be like this below\n\n JSONObject snippetJSONObject = obj.getJSONObject(\"snippet\");\n mchannel.setDescription(snippetJSONObject.getString(\"description\"));\n mchannel.setDatetime(snippetJSONObject.getString(\"publishedAt\"));\n String img = snippetJSONObject.getJSONObject(\"thumbnails\").getJSONObject(\"default\").getString(\"url\");\n\n mchannel.setThumbnailurl(img);\n\n // adding movie to movies array\n rlist.add(mchannel);\n Log.d(\"rlist\",\"\"+rlist);\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n\n }\n\n\n\n } catch(Exception 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 madapter.notifyDataSetChanged();\n\n /* Gson gson = new Gson();\n String jsonoutput = response.toString();\n Type listType = new TypeToken<List<RoyList>>(){}.getType();\n List<RoyList> posts = gson.fromJson(jsonoutput, listType);\n Log.d(\"gsondd\", \"gsonposts\"+posts);*/\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n // hidePDialog();\n pDialog.dismiss();\n }\n });\n\n RequestQueue requestueue = Volley.newRequestQueue(this);\n requestueue.add(mchannelReq);\n }", "public JSONArray getJSONFromUrl(String url) {\n HttpParams httpParameters = new BasicHttpParams();\n // Set the timeout in milliseconds until a connection is established.\n // The default value is zero, that means the timeout is not used.\n int timeoutConnection = 3000;\n HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n // Set the default socket timeout (SO_TIMEOUT)\n // in milliseconds which is the timeout for waiting for data.\n int timeoutSocket = 5000;\n HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n HttpGet httpget = new HttpGet(url);\n\n // Depends on your web service\n httpget.setHeader(\"Content-type\", \"application/json\");\n InputStream inputStream = null;\n String result = null;\n try {\n HttpResponse response = httpclient.execute(httpget);\n HttpEntity entity = response.getEntity();\n\n inputStream = entity.getContent();\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null)\n {\n sb.append(line).append(\"\\n\");\n }\n result = sb.toString();\n\n } catch (Exception e) {\n // Oops\n Log.i(TAG,e.toString());\n Log.i(TAG,\"reader read line didn't work\");\n }\n finally {\n try{\n if(inputStream != null)inputStream.close();\n }\n catch(Exception squish){\n Log.i(TAG,squish.toString());\n Log.i(TAG,\"sqish! inputstream did not work!\");\n }\n }\n\n if(result == null){\n Log.i(TAG,\"result was NULL\");\n return null;\n }\n try {\n Log.i(TAG,\"WE fetched this data \"+result);\n\n // Send the url along with article data\n return new JSONArray(result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }", "public static void ObtenerDatosUsuarios(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/usuarios\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "@Override\n public void onResponse(String response) {\n parseData(url, response);\n }", "public void getJSONrequest()\r\n {\r\n SharedPreferences preferences=getSharedPreferences(Util.USER_NAME, MODE_PRIVATE);\r\n\r\n user_name=preferences.getString(Util.USER_NAME, \"\");\r\n String url=Util.getAllUsersUrl+\"?name=\"+user_name;\r\n Log.i(\"SOURAV\", url);\r\n requestQueue= Volley.newRequestQueue(this);\r\n JsonObjectRequest request=new JsonObjectRequest(Request.Method.GET, url, new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n allUsers=parseJSON(response);\r\n mRecyclerView = (RecyclerView) findViewById(R.id.friend_recycler_view);\r\n mRecyclerView.setHasFixedSize(true);\r\n mLayoutManger = new LinearLayoutManager(getApplicationContext());\r\n mRecyclerView.setLayoutManager(mLayoutManger);\r\n mAdapter = new sendEventInviteAdapter(allUsers,getApplicationContext(),requestQueue,event_id);\r\n mRecyclerView.setAdapter(mAdapter);\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Toast.makeText(getApplicationContext(),\"Failed to load list of friends\",Toast.LENGTH_SHORT).show();\r\n finish();\r\n\r\n }\r\n });\r\n requestQueue.add(request);\r\n }", "public static void ObtenerDatosHistorial_Nutricion(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/HistorialNutri\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "@Override\n public void run() {\n try{\n //3.2.1) URL url = new...\n URL url = new URL(\"http://api.androidhive.info/json/movies.json\");\n //3.2.2)URLConnection con = url.openConnection\n URLConnection con = url.openConnection();\n //3.2.3)InputStream in = con.getInputStream\n InputStream in = con.getInputStream();\n\n //3.2.4) String json IO.getString(in)\n String json = IO.getString(in);\n\n //3.2.5) parse the json\n List<Movie> movies = parseJson(json);\n\n //3.2.6) notify the listener\n listener.onMoviesArrived(movies, null);\n }catch (Exception e){\n e.printStackTrace();\n listener.onMoviesArrived(null, e);\n }\n\n }", "private void parseJSONResponse(String response) {\n try {\n JSONObject volume = new JSONObject(response);\n String title = volume.getJSONObject(\"volumeInfo\").optString(\"title\");\n String desc = volume.getJSONObject(\"volumeInfo\").optString(\"description\");\n if(desc == \"\"){\n desc = \"no description\";\n }\n JSONObject imageLinks = volume.getJSONObject(\"volumeInfo\").optJSONObject(\"imageLinks\");\n String imageUrl = \"\";\n if(imageLinks != null) {\n imageUrl = imageLinks.optString(\"medium\");\n if(imageUrl == \"\"){\n imageUrl = imageLinks.optString(\"thumbnail\");\n }\n }\n String authors = \"\";\n JSONArray arr = volume.getJSONObject(\"volumeInfo\").optJSONArray(\"authors\");\n\n if(arr != null) {\n for (int i = 0; i < arr.length(); i++) {\n authors += arr.getString(i);\n }\n }\n\n // Save these details in a Volume object.\n currentVolume = new Volume(title, authors, id, desc, imageUrl);\n\n updateViews();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n parseData(response);\n }", "public void getJsonRequest() {\n String url = Constants.PLAY_LIST_ITEM_URL+\"?part=\"+Constants.PART+\"&playlistId=\"+playlistId+\"&maxResults=50&key=\"+Constants.API_KEY;\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonObject = new JSONObject(response);\n JSONArray jsonArray = jsonObject.getJSONArray(\"items\");\n for (int i = 0; i < jsonArray.length(); i++){\n JSONObject jsonObject1 = jsonArray.getJSONObject(i);\n\n\n /*\n *------------------Creating Snippet Object for fetching items like title, description, thumbnail Object etc---------------\n */\n JSONObject snippetObject = jsonObject1.getJSONObject(\"snippet\");\n String title = snippetObject.getString(\"title\");\n String description = snippetObject.getString(\"description\");\n\n\n /*\n *------------------Creating thumbnail Object for fetching thumbnail url----------------\n */\n\n JSONObject thumbnailObject = snippetObject.getJSONObject(\"thumbnails\").getJSONObject(\"high\");\n String thumbnail = thumbnailObject.getString(\"url\");\n\n\n /*\n *-----------------creating resource Json Object for fetching videoId here----------\n */\n\n JSONObject resourceObject = snippetObject.getJSONObject(\"resourceId\");\n String videoId = resourceObject.getString(\"videoId\");\n\n mSubjectDetailList.add(new SubjectDetailsDataModel(title,description,thumbnail,videoId));\n }\n mShimmerViewContainer.stopShimmer();\n mShimmerViewContainer.setVisibility(View.GONE);\n setAdapter(mSubjectDetailList);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(),\"error\"+error.getMessage(),Toast.LENGTH_SHORT).show();\n }\n });\n MySingleton.getInstance(getApplicationContext()).addTORequestQueue(stringRequest);\n }", "private void getDataFromServer(final String TAG) {\n queue = customVolley.Rest(Request.Method.GET, getUrlToDownload(), null, TAG);\n\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n HttpURLConnection urlConnection = null;\n\n try {\n URL data = new URL(url);\n urlConnection = (HttpURLConnection) data.openConnection();\n\n int responseCode = urlConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n\n readJsonStream(urlConnection.getInputStream());\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n urlConnection.disconnect();\n return null;\n }", "private void makeJsonObjReq(JSONObject json,String url,final String file) {\n\t\t showProgressDialog();\n\t\t\tRequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext());\n\t\t\tJsonUTF8Request jsonObjReq = new JsonUTF8Request(Method.POST,\n\t\t\t\turl, json,\n\t\t\t\tnew Response.Listener<JSONObject>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResponse(JSONObject response) {\n\t\t\t\t\t\tLog.d(TAG, response.toString());\n\t\t\t\t\t // Dismiss the progress dialog\n\t\t\t\t\t\t \t JSONObject jsonObjSend = null;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tjsonObjSend = new JSONObject(response.toString());\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\t\t\tparseJsonFeed(response, file);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t \t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} \n \n\t\t\t\t\t\thideProgressDialog();\n\t\t\t\t\t}\n\t\t\t\t}, new Response.ErrorListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\t\t\tVolleyLog.d(TAG, \"Error: \" + error.getMessage());\n\t\t\t\t\t\tif(incrConnexion<=Const.count)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpublier();\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\tToast.makeText(getBaseContext(),getString(R.string.st_connection_failled), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\thideProgressDialog();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrConnexion++;\n\t\t\t\t\t}\n\t\t\t\t}) {\n\n\t\t\t/**\n\t\t\t * Passing some request headers\n\t\t\t * */\n\t\t\t@Override\n\t\t\tpublic Map<String, String> getHeaders() throws AuthFailureError {\n\t\t\t\tHashMap<String, String> headers = new HashMap<String, String>();\n\t\t\t\theaders.put(\"Content-Type\", \"application/json;charset=UTF-8\");\n\t\t\t\treturn headers;\n\t\t\t}\n \n\n\t\t};\n\t\t/*\n\t\tint socketTimeout = Const.timer_connection_request;//30 seconds - change to what you want\n\t\tRetryPolicy policy = new DefaultRetryPolicy(socketTimeout, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);\n\t\tjsonObjReq.setRetryPolicy(policy);\n\t\tmRequestQueue.add(jsonObjReq);\n\t\t*/\n\t\t// Adding request to request queue\n\t\tAppController.getInstance().addToRequestQueue(jsonObjReq,\n\t\t\t\ttag_json_obj);\n \t}", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "private void getData() {\n loading = new ProgressDialog(ScoreActivity.this);\n loading.setIcon(R.drawable.wait_icon);\n loading.setTitle(\"Loading\");\n loading.setMessage(\"Please wait....\");\n loading.show();\n\n String URL = Key.WRITTEN_MARK+mid;\n\n StringRequest stringRequest = new StringRequest(URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n loading.dismiss();\n showJSON(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Intent intent = new Intent(ScoreActivity.this,ExaminationActivity.class);\n startActivity(intent);\n loading.dismiss();\n Toast.makeText(ScoreActivity.this, \"Network Error!\", Toast.LENGTH_SHORT).show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(ScoreActivity.this);\n requestQueue.add(stringRequest);\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 }", "public static void ObtenerCuestionario_Nutricion(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/CuestionarioNutri\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "@Nullable\n static public JSONObject readJson(final @NotNull String url) {\n\n StringBuilder builder = new StringBuilder();\n HttpClient client = new DefaultHttpClient();\n HttpGet httpGet = new HttpGet(url);\n JSONObject finalResult = null;\n try {\n HttpResponse response = client.execute(httpGet);\n StatusLine statusLine = response.getStatusLine();\n int statusCode = statusLine.getStatusCode();\n if (statusCode == 200) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), \"UTF-8\"));\n String line;\n while ((line = reader.readLine()) != null) {\n builder.append(line).append(\"\\n\");\n }\n finalResult = new JSONObject(new JSONTokener(builder.toString()));\n } else {\n Logger.e(TAG, \"Failed to download status file.\");\n }\n } catch (JSONException e) {\n Logger.e(TAG, e.getMessage());\n } catch (ClientProtocolException e) {\n Logger.e(TAG, e.getMessage());\n } catch (IOException e) {\n Logger.e(TAG, e.getMessage());\n }\n return finalResult;\n }", "public JSONLoader( LoadingManager manager ) {}", "private void loadBuyer() {\n swipeLayout.setRefreshing(true);\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, apiUrl, null, response -> {\n\n try {\n if(!response.getBoolean(\"status\")) {\n alert.setMessage(response.getJSONObject(\"data\").getString(\"message\"))\n .show();\n } else {\n JSONObject buyer = response.getJSONObject(\"data\");\n fieldName.setText(buyer.getString(\"name\"));\n fieldPhone.setText(buyer.getString(\"phone\"));\n fieldAddress.setText(buyer.getString(\"address\"));\n fieldVillage.setText(buyer.getString(\"village\"));\n fieldDistrict.setText(buyer.getString(\"district\"));\n fieldCity.setText(buyer.getString(\"city\"));\n fieldProvince.setText(buyer.getString(\"province\"));\n fieldPos.setText(buyer.getString(\"postal_code\"));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n alert.setMessage(e.getMessage()).show();\n }\n\n swipeLayout.setRefreshing(false);\n\n }, error -> {\n swipeLayout.setRefreshing(false);\n }) {\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return RequestGlobalHeaders.get(getApplicationContext());\n }\n };\n\n requestQueue.add(request);\n }", "private void songList() {\n String tag_json_obj = \"json_login_req\";\n final ProgressDialog pbDialog = new ProgressDialog(context);\n pbDialog.setMessage(\"Loading Data...\");\n pbDialog.setCancelable(true);\n pbDialog.show();\n //mPbLoading.setVisibility(View.VISIBLE);\n final StringRequest jsonObjReq = new StringRequest(Request.Method.POST,\n \"http://refrain.electrotouch.in/json_song.php\",\n new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n if (Utility.isNotNull(response)) {\n JSONObject jsonResponse;\n\n try {\n jsonResponse = new JSONObject(response);\n\n\n if (1 == jsonResponse.optInt(\"success\")) {\n pbDialog.dismiss();\n JSONArray jsonLoginData = jsonResponse.optJSONArray(\"song\");\n for (int i = 0; i < jsonLoginData.length(); i++) {\n JSONObject jsonObject = jsonLoginData.optJSONObject(i);\n strURL1.add(\"http://refrain.electrotouch.in/upload/\" + jsonObject.optString(\"banner\"));\n strSongName.add(jsonObject.optString(\"songname\"));\n strSongNameFinal.add(jsonObject.optString(\"selectsong\"));\n }\n layoutArtist = (LinearLayout) findViewById(R.id.layout_allotted_artist5);\n for (int i = 0; i < strURL1.size(); i++) {\n layoutArtist.addView(addMyCourses(i, strURL1.get(i), strSongName.get(i), strSongNameFinal.get(i)));\n }\n } else {\n Utility.alertDialogShow(context, jsonResponse.optString(\"message\"));\n pbDialog.dismiss();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Utility.alertDialogShow(context, \"Your Number is not valid for verification.\");\n pbDialog.dismiss();\n }\n\n\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n\n return params;\n }\n };\n\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(AppResources.CONNECTION_TIMEOUT, DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n // Adding request to request queue\n Analytics.getInstance().addToRequestQueue(jsonObjReq, tag_json_obj);\n\n }", "public void requestNews(int skip, int num){\n String tag_json = \"json_object_req\";\n\n String url = \"http://lighthauz.herokuapp.com/api/news/\";\n\n JsonObjectRequest req = new JsonObjectRequest(url + user.get(SessionManager.KEY_ID) + \"/\" + Integer.toString(skip) + \"/\" + Integer.toString(num),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n JSONArray myArray;\n try{\n if (previousTotal==0){\n news.clear();\n }\n\n myArray = response.getJSONArray(\"news\");\n for(int i=0;i<myArray.length();i++){\n\n JSONObject author = myArray.getJSONObject(i).getJSONObject(\"author\");\n JSONObject idea = myArray.getJSONObject(i).getJSONObject(\"idea\");\n News newNews = new News(myArray.getJSONObject(i).getString(\"type\"),author.getString(\"id\"),idea.getString(\"id\"),author.getString(\"name\"),author.getString(\"pic\"),idea.getString(\"title\"),idea.getString(\"category\"),idea.getString(\"description\"),idea.getString(\"pic\"),myArray.getJSONObject(i).getLong(\"timestamp\"));\n news.add(newNews);\n\n }\n\n if(previousTotal==0){\n recView.setAdapter(adapter);\n } else {\n adapter.swap(news);\n }\n\n pb.setVisibility(View.GONE);\n recView.setVisibility(View.VISIBLE);\n\n }\n catch (JSONException e){\n Log.e(\"MYAPP\", \"unexpected JSON exception\", e);\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n }\n });\n\n// Adding request to request queue\n AppSingleton.getInstance(getContext()).addToRequestQueue(req, tag_json);\n }", "private void getData(){\n\n\n String url= URLS.BaseUrl+URLS.getAllAdsUrl+startIndex+\"/\"+endIndex;\n\n\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n try {\n JSONArray rootArr= new JSONArray(response);\n\n\n\n\n\n } catch (JSONException e) {\n Constraints.MyToast(getActivity(),getString(R.string.errorParsing), Toast.LENGTH_SHORT);\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n String errorMsg =\"حدث خطأ,برجاء المحاولة مرة اخرى\" ;\n\n NetworkResponse response = error.networkResponse;\n if(response != null && response.data != null){\n errorMsg = new String(response.data);\n }\n\n Constraints.MyToast(getActivity(),errorMsg,Toast.LENGTH_SHORT);\n\n }\n });\n\n\n AppController.getInstance().addToRequestQueue(request);\n\n }", "public JSONDownloader(Context c, String jsonURL, RecyclerView rv) {\n this.c = c;\n this.jsonURL = jsonURL;\n this.rv = rv;\n }", "public void getJsonAndParse(String url){\n\n class GetJSON extends AsyncTask<String, Void, String> {\n\n ProgressDialog loading;\n\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n loading = ProgressDialog.show(Registration.this, \"Please Wait...\", null, true, true);\n }\n\n /**\n * automatically called method\n * this the function which will run the background to retrive json string in the background and return the json string\n * @param params\n * @return string (if not found null)\n */\n @Override\n protected String doInBackground(String... params) {\n\n String uri = params[0];\n\n BufferedReader bufferedReader = null;\n try {\n URL url = new URL(uri);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();//creating connection\n StringBuilder sb = new StringBuilder();\n\n bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));// getting the json string\n\n String json;\n json = bufferedReader.readLine();\n\n return json.trim(); //returning the json string\n\n }catch(Exception e){\n return null;\n }\n\n }\n\n /**\n * automatically called method\n * this method is getting the returned string from the doInBackground method and passing the value to the parseAndShow method\n * @param s\n */\n\n @Override\n protected void onPostExecute(String s) {\n\n super.onPostExecute(s);\n loading.dismiss();\n parseAndShow(s);\n //startTime = SystemClock.uptimeMillis();\n //handler.postDelayed(updateTimerThread, 0);\n //startTimer();\n\n }\n }\n\n /**\n * creating the object of GetJSON class to start aysnctask\n */\n GetJSON gj = new GetJSON();\n gj.execute(url);\n\n\n\n }", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "private void getData1() {\n loading1 = new ProgressDialog(ScoreActivity.this);\n loading1.setIcon(R.drawable.wait_icon);\n loading1.setTitle(\"Loading\");\n loading1.setMessage(\"Please wait....\");\n loading1.show();\n\n String URL = Key.MCQ_MARK+mid;\n\n StringRequest stringRequest = new StringRequest(URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n loading1.dismiss();\n showJSON1(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Intent intent = new Intent(ScoreActivity.this,ExaminationActivity.class);\n startActivity(intent);\n loading1.dismiss();\n Toast.makeText(ScoreActivity.this, \"Network Error!\", Toast.LENGTH_SHORT).show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(ScoreActivity.this);\n requestQueue.add(stringRequest);\n }", "public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }", "private JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\r\n\t\tInputStream is = new URL(url).openStream();\r\n\t\ttry {\r\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\r\n\t\t\tString jsonText = readAll(rd);\r\n\t\t\tJSONObject json = new JSONObject(jsonText);\r\n\t\t\treturn json;\r\n\t\t} finally { //finally will always execute, if an try block exists. Doesnt matter if there is an Exception or not.\r\n\t\t\tis.close();\r\n\t\t}\r\n\t}", "@Override\n public void downloadData() throws ApiException, BadRequestException, DataNotSetException, AuthRequiredException {\n\n try {\n result = Constructors.constructJSONArray(url);\n message = new String[result.length()];\n creator = new String[result.length()];\n created = new String[result.length()];\n for(int i = 0; i < result.length(); i++){\n String mes = result.getJSONObject(i).getString(\"message\");\n String user = result.getJSONObject(i).getString(\"creator\");\n String date = result.getJSONObject(i).getString(\"created\");\n message[i] = mes;\n creator[i] = user;\n created[i] = date;\n\n }\n } catch (Exception e) {\n throw new ApiException(\"API Error: \" + result.toString());\n }\n\n }", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "public static String getJSON(String url){\n \t\t\n \t\tStringBuilder builder = new StringBuilder();\n \t HttpClient client = new DefaultHttpClient();\n \t HttpGet httpGet = new HttpGet(url);\n \t try {\n \t HttpResponse response = client.execute(httpGet);\n \t HttpEntity entity = response.getEntity();\n \t InputStream content = entity.getContent();\n \t BufferedReader reader = new BufferedReader(new InputStreamReader(content));\n \t \n \t String line;\n \t while ((line = reader.readLine()) != null) {\n \t builder.append(line);\n \t }\n \t } catch (Exception e) {}\n \t\t\n \t\treturn builder.toString(); \n \t}", "public static void ObtenerDatosEnvia_Msg(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/EnviaMsg\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "private void getData()\n {\n\n String url =search_url+USER_NAME;\n\n StringRequest stringRequest = new StringRequest(url, new Response.Listener<String>()\n {\n @Override\n public void onResponse(String response)\n {\n\n showJSON(response);\n }\n },\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError error)\n {\n String message = null;\n if (error instanceof NetworkError)\n {\n message = \"Cannot connect to Internet...Please check your connection!\";\n Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();\n }\n else if (error instanceof ServerError)\n {\n message = \"The server could not be found. Please try again after some time!!\";\n Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();\n }\n else if (error instanceof AuthFailureError)\n {\n message = \"Cannot connect to Internet...Please check your connection!\";\n Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();\n }\n else if (error instanceof ParseError)\n {\n message = \"Parsing error! Please try again after some time!!\";\n Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();\n }\n else if (error instanceof NoConnectionError)\n {\n message = \"Cannot connect to Internet...Please check your connection!\";\n Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();\n }\n else if (error instanceof TimeoutError)\n {\n message = \"Connection TimeOut! Please check your internet connection.\";\n Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();\n }\n else\n {\n message = \"Connection TimeOut! Please check your internet connection.\";\n Toast.makeText(MainActivity.this,message,Toast.LENGTH_LONG).show();\n }\n\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());\n requestQueue.add(stringRequest);\n }", "public AsyncFlickrJSONData(String httpUrl){\n this.httpUrl = httpUrl;\n }", "public String[] readJson(String url) {\n InputStream is = null;\n String[] strArray ={\"\"} ;\n try {\n is = NetworkUtils.OpenHttpConnection(url, this);\n //leitura\n streamReader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n jsonStrBuilder = new StringBuilder();\n Log.i(\"1° aqui\", \"ok\");\n String inputStr;\n //add ao StringBuilder\n while ((inputStr = streamReader.readLine()) != null) {\n jsonStrBuilder.append(inputStr);\n Log.i(\"@@@JSON :\", jsonStrBuilder.toString());\n }\n //transformado em JSONObject\n// JSONObject jObj = new JSONObject(jsonStrBuilder.toString());\n//\n// JSONArray jArray = jObj.getJSONArray(\"tasks\");\n// strArray = new String[jArray.length()];\n\n// for(int i = 0; i < jArray.length(); i++){\n// JSONObject jObject = jArray.getJSONObject(i);\n// strArray[i] = jObject.getString(\"title\");\n// }\n strArray[0] = jsonStrBuilder.toString();\n\n Log.i(\"@@@strArray :\", strArray.toString());\n }catch(IOException ie){\n Log.i(\"readJson\", ie.getLocalizedMessage());\n }\n\n return strArray;\n }", "@Override\n protected String doInBackground(String... params) {\n\n String uri = params[0];\n\n BufferedReader bufferedReader = null;\n try {\n URL url = new URL(uri);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();//creating connection\n StringBuilder sb = new StringBuilder();\n\n bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));// getting the json string\n\n String json;\n json = bufferedReader.readLine();\n\n return json.trim(); //returning the json string\n\n }catch(Exception e){\n return null;\n }\n\n }", "private void loadRepositoriesData() {\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setMessage(\"Loading repositories...\");\n progressDialog.show();\n //End\n\n StringRequest stringRequest = new StringRequest(Request.Method.GET, GIT_API_URL,\n new Response.Listener<String>() {\n //On success, the code inside this method will be executed;\n @Override\n public void onResponse(String response) {\n\n progressDialog.dismiss();\n\n try {\n JSONObject jsonObject = new JSONObject(response);\n JSONArray array = jsonObject.getJSONArray(\"items\");\n\n for (int i=0; i<array.length(); i++)\n {\n JSONObject repoObject = array.getJSONObject(i);\n JSONObject repoOwnerObject = repoObject.getJSONObject(\"owner\");\n Repository repo = new Repository(repoObject.getString(\"name\"),\n repoObject.getString(\"description\"),\n repoOwnerObject.getString(\"avatar_url\"),\n repoOwnerObject.getString(\"login\"),\n repoObject.getString(\"stargazers_count\"),\n repoObject.getString(\"html_url\"));\n\n reposList.add(repo);\n }\n\n repoAdapter = new RepositoryAdapter(reposList,getApplicationContext());\n reposRecyclerView.setAdapter(repoAdapter);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n },\n //On failure, this code will be executed instead.\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n// progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG);\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(stringRequest);\n\n }", "public void makeJsonArrayRequest() {\n JsonArrayRequest req = new JsonArrayRequest(url,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n if (response.length() == hla.adapter.getItemCount()){\n\n }\n else{\n try {\n // Parsing json array response\n // loop through each json object\n jsonResponse = \"\";\n for (int i = 0; i < response.length(); i++) {\n\n JSONObject heroes = (JSONObject) response.get(i);\n\n name = heroes.getString(\"PrimaryName\");\n imageurl = heroes.getString(\"ImageURL\");\n tgroup = heroes.getString(\"Group\");\n stgroup = heroes.getString(\"SubGroup\");\n\n jsonResponse += name;\n jsonResponse += imageurl;\n jsonResponse += tgroup;\n jsonResponse += stgroup;\n addItem(createheroes(i, name));\n completepicurl = \"http://d1i1jxrdh2kvwy.cloudfront.net/Images/Heroes/Portraits/\"+ imageurl + \".png\";\n VolleyLog.d(completepicurl);\n addItemPic(createheroepics(i, completepicurl));\n\n VolleyLog.d(\"Loaded No. \" + i);\n int check = hla.adapter.getItemCount();\n VolleyLog.d(\"Items = \" + check);\n hla.adapter.notifyItemInserted(check);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }}\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(\"Error:\");\n addItem(createheroes(1, \"yolo\"));\n }\n });\n\n AppController.getInstance().addToRequestQueue(req);\n VolleyLog.d(\"Requestqueue Job added\");\n }", "protected JSONObject doInBackground(String...url){\n String MYURL = \" http://thevisitapp.com/api/destinations/read?identifiers=10011\";\n\n HttpRequest request = new HttpRequest();\n return request.getJSONFromUrl(MYURL);\n }", "void onRequestCompleted(JSONArray result);", "public void fetchHeadLocations(String url, final VolleyResponseListener volleyResponseListener){\r\n try {\r\n final RequestQueue queue = Volley.newRequestQueue(mContext);\r\n\r\n StringRequest req = new StringRequest(Request.Method.GET, url,\r\n new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String s) {\r\n volleyResponseListener.onSuccess(s);\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError volleyError) {\r\n volleyResponseListener.onError(volleyError);\r\n Log.v(\"see error responce\",volleyError.toString());\r\n }\r\n })\r\n\r\n {\r\n\r\n\r\n @Override\r\n protected Response<String> parseNetworkResponse(NetworkResponse response) {\r\n Log.v(\"see error responce\",response.toString());\r\n return super.parseNetworkResponse(response);\r\n\r\n\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams(){\r\n HashMap<String, String> params = new HashMap<String, String>();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n return params;\r\n }\r\n };\r\n queue.add(req);\r\n\r\n\r\n\r\n }catch (Exception e){\r\n Log.v(\"see error responce\",e.toString());\r\n\r\n }\r\n\r\n }", "private Response.Listener<JSONObject> onSuccessListener() {\n return new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n\n\n JSONArray jarray = response.getJSONArray(\"timeline\");\n for (int i = 0; i < jarray.length(); i++) {\n try {\n JSONObject obj = jarray.getJSONObject(i);\n Curgas curgas = new Curgas();\n curgas.setNo(obj.getString(\"no\"));\n curgas.setKode(obj.getString(\"kode\"));\n curgas.setUrl_pp(obj.getString(\"url_pp\"));\n curgas.setNama(obj.getString(\"nama\"));\n curgas.setUsername(obj.getString(\"username\"));\n curgas.setWaktu(obj.getString(\"waktu\"));\n curgas.setJudul(obj.getString(\"judul\"));\n curgas.setIsiSingkat(obj.getString(\"isi_singkat\"));\n curgas.setGambar(obj.getString(\"gambar\"));\n curgas.setKomentarTerakhir(obj.getString(\"komentar_terakhir\"));\n curgas.setJumlahKomentar(obj.getString(\"jumlah_komentar\"));\n curgasList.add(curgas);\n\n Log.d(\"Response\", \"Curgas = \"+curgas.getNo());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n adapter.notifyDataSetChanged();\n } catch (Exception e) {\n Toast.makeText(getActivity(), \"No Data Received\", Toast.LENGTH_LONG).show();\n }\n }\n };\n }", "private void fetchTag() {\n String url = URL_TO_TAG;\n // Volley's json array request object\n JsonArrayRequest req = new JsonArrayRequest(url,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n //Log.d(TAG, response.toString());\n tagList.clear();\n if (response.length() > 0 && response != null) {\n // looping through json and adding to event list\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject json_data = response.getJSONObject(i);\n tagList.add(json_data.getString(\"tag_name\"));\n\n } catch (JSONException e) {\n Log.e(\"Error\", \"JSON Parsing error: \" + e.getMessage());\n }\n }\n\n tagadapter.notifyDataSetChanged();\n }\n\n // stopping swipe refresh\n //swipeRefreshLayout.setRefreshing(false);\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error\", \"Server Error: \" + error.getCause());\n if (error.getClass().getName().equals(\"com.android.volley.ParseError\")){\n Toast.makeText(AdQuestionActivity.this, \"No tag yet\", Toast.LENGTH_SHORT).show();\n }else\n Toast.makeText(AdQuestionActivity.this, \"No Internet Connection or Service Unavailable Right Now\"\n + error.getMessage(), Toast.LENGTH_SHORT).show();\n\n // stopping swipe refresh\n //swipeRefreshLayout.setRefreshing(false);\n }\n });\n\n // Adding request to request queue\n MyApplication.getInstance().addToRequestQueue(req);\n }", "public void download() {\n // Attempt to perform the download\n Log.d(TAG, \"download\");\n try {\n // Open a connection to the PHP server.\n // Get the response code\n // Open an input stream as well as a buffered input reader\n try {\n // if (responseCode == HttpURLConnection.HTTP_OK) {\n // Attempt to parse the data from the server\n\n /* Add the crumb objects, but only add the coordinates, the rating,\n * the name, and the number of visits to the local database structure.\n */\n\n // Perhaps add a post method to add the crumbs to the hashmap\n\n // Post: Notify the UI thread that the markers are ready to be loaded.\n\n } catch (Exception e) {\n\n } finally {\n // Close the input streams\n }\n } catch(Exception e) {\n\n }\n }", "public void getJSONObject(String request_url, JSONObject paramArray,\n Response.Listener<JSONObject> listener,\n Response.ErrorListener errorListener){\n\n try {\n JsonObjectRequest jsonArrayRequest = new JsonObjectRequest (Request.Method.GET,\n request_url, paramArray, listener, errorListener);\n mReqQueue = GlobalRequestQueue.getInstance();\n mReqQueue.addToRequestQueue(jsonArrayRequest,\"get\");\n\n } catch(Exception e) {\n\n }\n }", "public JSONObject getJSONFromUrl(String url) {\n\n\t\t// Making HTTP request\n\t\ttry {\n\t\t\t// defaultHttpClient\n\t\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\t\tHttpPost httpPost = new HttpPost(url);\n\n\t\t\tHttpResponse httpResponse = httpClient.execute(httpPost);\n\t\t\tHttpEntity httpEntity = httpResponse.getEntity();\n\t\t\tis = httpEntity.getContent();\t\t\t\n\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tis, \"iso-8859-1\"), 8);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = null;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t\tis.close();\n\t\t\tjson = sb.toString();\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Buffer Error\", \"Error converting result \" + e.toString());\n\t\t}\n\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(json);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\n\t\t// return JSON String\n\t\treturn jObj;\n\n\t}", "public JSONArray request(String url) throws IOException, JSONException {\r\n\r\n\t\t// request method is GET\r\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\r\n\t\tHttpGet httpGet = new HttpGet(url);\r\n\r\n\t\tHttpResponse httpResponse = httpClient.execute(httpGet);\r\n\t\tHttpEntity httpEntity = httpResponse.getEntity();\r\n\t\tis = httpEntity.getContent();\r\n\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tis, \"iso-8859-1\"), 8);\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\r\n\t\t\tis.close();\r\n\t\t\tjson = sb.toString();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"Buffer Error\", \"Error converting result \" + e.toString());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tjArr = new JSONArray(json);\r\n\t\t} catch (JSONException e) {\r\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// return JSON String\r\n\t\treturn jArr;\r\n\r\n\t}", "private void loadMovies(String uri){\n showNothing();\n progressBar.setVisibility(View.VISIBLE);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, uri,\n null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n progressBar.setVisibility(View.INVISIBLE);\n\n movieArrayList = Movie.getAllMovies(response.toString());\n\n loadRecyclerViewWithMovies(movieArrayList);\n\n showMovies();\n } catch (JSONException | NullPointerException e) {\n if(sortBy == Order.TOP_RATED || sortBy == Order.POPULARITY)\n showError();\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if(sortBy == Order.TOP_RATED || sortBy == Order.POPULARITY)\n showError();\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"getDataFromUrl.onErrorResponse: \" + error);\n\n }", "private void downloadAndParseJSON() throws InterruptedException {\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n long startTime = System.currentTimeMillis();\n changeButtonClickable(false);\n String url;\n String jsonURL = \"https://pixabay.com/api/?key=5516663-dc2322454a65418c44907a054&q=dog&image_type=photo&pretty=true&per_page=\" + getSize() / 2;\n try {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"JSON DOWNLOADING...\", Toast.LENGTH_SHORT).show();\n }\n });\n json = readJsonFromUrl(jsonURL);\n jsonArray = json.getJSONArray(\"hits\");\n\n for (int i = 0; i < getSize() / 2; ++i) {\n JSONObject record;\n record = jsonArray.getJSONObject(i);\n url = record.getString(\"previewURL\");\n urlList.add(i,url);\n }\n for(int i = getSize() / 2; i < getSize(); ++i) {\n JSONObject record;\n record = jsonArray.getJSONObject(i-(getSize() / 2));\n url = record.getString(\"previewURL\");\n urlList.add(i,url);\n }\n jsonFlag = true;\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n Log.i(TAG, \"JSON download and parse duration \" + elapsedTime + \" ms.\");\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n toNexLevel = 2*getSize();\n String prompt = \"You Have \"+ toNexLevel + \" Chance to Go Next Level!\";\n chanceText.setText(prompt);\n String s = \"\" + mistake;\n mistakeText.setText(s);\n s = \"\" + score;\n scoreText.setText(s);\n }\n });\n } catch (IOException | JSONException e) {\n e.printStackTrace();\n }\n }\n }).start();\n }", "@Override\n protected void onPostExecute(Object o) {\n super.onPostExecute(o);\n\n Toast.makeText(JSONParserActivity.this,\"Response: \"+response.toString(),Toast.LENGTH_LONG).show();\n\n // Parse JSON Data as Java Objects\n\n /*try {\n\n JSONObject jsonObject = new JSONObject(response.toString());\n JSONArray jsonArray = jsonObject.getJSONArray(\"bookstore\");\n\n for(int i=0;i<jsonArray.length();i++){\n JSONObject jObj = jsonArray.getJSONObject(i);\n\n Book book = new Book();\n book.price = jObj.getString(\"price\");\n book.name = jObj.getString(\"name\");\n book.author = jObj.getString(\"author\");\n\n bookList.add(book);\n }\n\n\n // Code here to add data in adapter\n for(Book book : bookList){\n Log.i(\"BOOK\",book.toString());\n adapter.add(book.toString());\n }\n\n\n\n\n listView.setAdapter(adapter);\n\n\n\n\n progressDialog.dismiss();\n\n }catch (Exception e){\n e.printStackTrace();\n }*/\n\n parseNewsApiResponse();\n\n\n }", "private void fetchPersonsDetailsFromServer() {\n\n if (UtilFunctions.isNetworkAvailable(context)) {\n\n mProgressDialog.setVisibility(View.VISIBLE);\n\n final JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, Constants.persons_api_url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(final JSONObject response) {\n\n Log.d(TAG, \"Response : \" + response.toString());\n final Gson gson = new Gson();\n if (response != null) {\n try {\n\n /**\n * parsing json into Objects using gson library\n */\n PersonsApiResponse personsApiResponse = gson.fromJson(String.valueOf(response), PersonsApiResponse.class);\n /**\n * inserting persons data in local database\n */\n AppDatabase.getInstance(context).insertListOfPersons(personsApiResponse.getResults());\n\n /**\n * downloading profile pics to store them in database\n */\n downloadingIssueHistoryImages(personsApiResponse.getResults());\n\n mProgressDialog.setVisibility(View.GONE);\n\n /**\n * fetching data from database\n */\n fetchDataFromDatabase();\n\n } catch (Exception e) {\n e.printStackTrace();\n Log.d(TAG, \"Exception in api call :\" + e.toString());\n mProgressDialog.setVisibility(View.GONE);\n }\n\n } else {\n\n mProgressDialog.setVisibility(View.GONE);\n\n Toast.makeText(context, \"Connection Error\", Toast.LENGTH_LONG).show();\n return;\n\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n mProgressDialog.setVisibility(View.GONE);\n Toast.makeText(context, \"Connection Error :\" + error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }) {\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\";\n }\n };\n\n jsonObjectRequest.setRetryPolicy(new DefaultRetryPolicy(20000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n RequestQueue requestQueue = Volley.newRequestQueue(context, null);\n requestQueue.add(jsonObjectRequest);\n\n } else {\n Snackbar snackbar = Snackbar.make(mMainLayout, \"No Connections\", Snackbar.LENGTH_LONG);\n View sbView = snackbar.getView();\n TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.YELLOW);\n snackbar.setAction(\"RETRY\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n fetchPersonsDetailsFromServer();\n }\n }).setActionTextColor(getResources().getColor(R.color.white));\n snackbar.show();\n }\n }", "private void cargarDetalleStory(String idStory) {\n\n HashMap<String, String> data = new LinkedHashMap<>();\n data.put(\"story_id\", idStory);\n\n JSONObject jsonObject = new JSONObject (data);\n\n System.out.print(jsonObject.toString());\n\n VolleySingleton.getInstance(getContext()).addToRequestQueue(\n new JsonObjectRequest(\n Request.Method.POST,\n Constantes.GET_STORY,\n jsonObject,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n obtenerStorybyId(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity().getApplicationContext(), \"An error has occur. Please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n ) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }\n\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\" + getParamsEncoding();\n }\n }\n );\n\n }", "private void makeSampleHttpRequest(String url) {\r\n\r\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String response) {\r\n texto_a_imprimir = response.toString();\r\n //showToast(texto_a_imprimir);\r\n vistaprevia.setText(texto_a_imprimir);\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n // Handle your error types accordingly.For Timeout & No connection error, you can show 'retry' button.\r\n // For AuthFailure, you can re login with user credentials.\r\n // For ClientError, 400 & 401, Errors happening on client side when sending api request.\r\n // In this case you can check how client is forming the api and debug accordingly.\r\n // For ServerError 5xx, you can do retry or handle accordingly.\r\n if( error instanceof NetworkError) {\r\n } else if( error instanceof ClientError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof ServerError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof AuthFailureError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof ParseError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof NoConnectionError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof TimeoutError) {\r\n texto_a_imprimir = error.toString();\r\n }\r\n showToast(error.getMessage());\r\n }\r\n });\r\n /*\r\n //Set a retry policy in case of SocketTimeout & ConnectionTimeout Exceptions. Volley does retry for you if you have specified the policy.\r\n jsonObjRequest.setRetryPolicy(new DefaultRetryPolicy(5000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjRequest.setTag(TAG_REQUEST);\r\n mVolleyQueue.add(jsonObjRequest);\r\n */\r\n stringRequest.setShouldCache(true);\r\n stringRequest.setTag(TAG_REQUEST);\r\n mVolleyQueue.add(stringRequest);\r\n }", "private JSONObject getJSONFromUrl(String url) {\n\t\tInputStream inputStream = null;\n\t\tString jsonString = \"\";\n\t\tJSONObject jsonObject = null;\n\t\tboolean sendMessageError = false;\n\t\t\n\t\ttry {\n DefaultHttpClient httpClient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(url);\n\n HttpResponse httpResponse = httpClient.execute(httpPost);\n HttpEntity httpEntity = httpResponse.getEntity();\n inputStream = httpEntity.getContent();\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (IOException e) {\n e.printStackTrace();\n sendMessageError = true;\n }\n\t\t\n\t\ttry {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n \t\tinputStream, \"iso-8859-1\"), 8);\n StringBuilder stringbuilder = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n \tstringbuilder.append(line + \"\\n\");\n }\n jsonString = stringbuilder.toString();\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\ttry {\n\t\t\tinputStream.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tsendMessageError = true;\n\t\t}\n\n\t\ttry {\n\t\t\tjsonObject = new JSONObject(jsonString);\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\tif (sendMessageError)\n\t\t\tsendMessageToObservers(new MessageErrorOccurred());\n\t\t\n\t\treturn jsonObject;\n\t}", "public void getResponse(final VolleyCallback callback) {\n JsonObjectRequest request = new JsonObjectRequest\n (Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n callback.onSuccess(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"MYMOVIES\", error.getMessage());\n }\n });\n\n queue.add(request);\n }", "@Nullable\n protected JSONObject fetchObjectForURL(URL url) throws IOException, JSONException {\n HttpURLConnection conn = getConnection(url);\n BufferedReader in = null;\n if (conn == null) return null;\n try {\n in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n StringBuilder buffer = new StringBuilder();\n String line;\n while ((line = in.readLine()) != null) {\n buffer.append(line);\n }\n return new JSONObject(buffer.toString());\n } finally {\n if (in != null) try { in.close(); } catch (IOException ex) {\n Log.e(\"aqx1010\", \"can not close input stream\", ex);\n }\n }\n\n }", "TorrentJsonParser getJsonParser();", "public HashMap<String,Trail> getJSONData() {\n\t\tHashMap<String,Trail> trailList1 = new HashMap<String,Trail>();\n\t\tString jsonStr;\n\t\tint counter=0;\n\t\n\t\t\ttry {\n\t\t\t\tInputStream is = getResources().openRawResource(\n\t\t\t\t\t\tgetResources().getIdentifier(\"trail_detail\", \"raw\",\n\t\t\t\t\t\t\t\tgetPackageName()));\n\t\t\t\tint size = is.available();\n\t\t\t\tbyte[] buffer = new byte[size];\n\t\t\t\tis.read(buffer);\n\t\t\t\tis.close();\n\t\t\t\tjsonStr = new String(buffer, \"UTF-8\");\n\n\t\t\t\tLog.d(\"Response: \", \"> \" + jsonStr);\n\n\t\t\t\tJSONArray jsonArray = new JSONArray(jsonStr);\n\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\t\t\tJSONObject jsonObj = jsonArray.getJSONObject(i);\n counter++;\n\t\t\t\t\tString name =jsonObj.getString(TAG_NAME);\n\t\t\t\t\tDouble length = Double.parseDouble(jsonObj.getString(TAG_LENGTH));\n\t\t\t\t\tString type = jsonObj.getString(TAG_TYPE);\n\t\t\t\t\tString surface = jsonObj.getString(TAG_SURFACE);\n\t\t\t\t\tString amenities = jsonObj.getString(TAG_AMENITIES);\n\t\t\t\t\tString parking = jsonObj.getString(TAG_PARKING);\n\t\t\t\t\tString season = jsonObj.getString(TAG_SEASON);\n\t\t\t\t\tString lighting = jsonObj.getString(TAG_LIGHTING);\n\t\t\t\t\tString maintenance = jsonObj.getString(TAG_MAINTENANCE);\n\t\t\t\t\tString pets = jsonObj.getString(TAG_PETS);\n\t\t\t\t\tString notes = jsonObj.getString(TAG_NOTES);\n\t\t\t\t\tString city = jsonObj.getString(TAG_CITY);\n\n\t\t\t\t\ttrailList1.put(name, new Trail(name, length, type, surface,\n\t\t\t\t\t\t\tamenities, parking, season, lighting, maintenance,\n\t\t\t\t\t\t\tpets, notes, city));\n//\t\t\t trailList.add(new Trail(name, length, type, surface,\n//\t\t\t\t\t\t\tamenities, parking, season, lighting, maintenance,\n//\t\t\t\t\t\t\tpets, notes, city));\n\n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\treturn trailList1;\n\t}", "public void actorParse(){\n\n RequestQueue mQueue;\n mQueue = Volley.newRequestQueue(this);\n\n String tmdbUrl = \"https://api.themoviedb.org/3/movie/\" + movie.getId() + \"/credits?api_key=1e9f1e07ae99796a8c5c9932ada044ab\";\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, tmdbUrl, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n txtStory.append(\"\\n\\n\");\n txtStory.append(Html.fromHtml( \"<b>Actors:</b>\" ));\n txtStory.append(\"\\n\");\n\n String actor;\n JSONArray jsonArray = new JSONArray();\n\n //JSON wordt geparst gelijk in de textview gestopt\n try {\n jsonArray = response.getJSONArray(\"cast\");\n\n for(int i=0; i<jsonArray.length(); i++){\n actor = jsonArray.getJSONObject(i).getString(\"name\");\n Log.i(\"ID:\", actor);\n txtStory.append(actor);\n if(i == 5){\n break;\n }\n txtStory.append(\", \");\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n mQueue.add(request);\n\n }", "private static JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\n\t\tInputStream is = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAll(rd);\n\t\t\tJSONObject json = new JSONObject(jsonText);\n\t\t\treturn json;\n\t\t} finally {\n\t\t\tis.close();\n\t\t}\n\t}", "@Override\r\n public void onResponse(JSONArray response) {\n parseData(response, requestCount);\r\n }", "@Override\n public void onResponse(String response) {\n\n try {\n JSONObject jsonObject = new JSONObject(response);\n JSONArray array = jsonObject.getJSONArray(\"items\");\n\n for (int i=0; i<array.length(); i++)\n {\n JSONObject repoObject = array.getJSONObject(i);\n JSONObject repoOwnerObject = repoObject.getJSONObject(\"owner\");\n Repository repo = new Repository(repoObject.getString(\"name\"),\n repoObject.getString(\"description\"),\n repoOwnerObject.getString(\"avatar_url\"),\n repoOwnerObject.getString(\"login\"),\n repoObject.getString(\"stargazers_count\"),\n repoObject.getString(\"html_url\"));\n\n reposList.add(repo);\n }\n\n progressBar.setVisibility(View.GONE);\n repoAdapter.notifyDataSetChanged();\n\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "public JSONObject readJsonFromUrl() throws IOException, JSONException {\n\t\tInputStream inputStream = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(inputStream, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAllBytes(bufferedReader);\n\t\t\tJSONObject jsonObject = new JSONObject(jsonText);\n\t\t\treturn jsonObject;\n\t\t} finally {\n\t\t\tinputStream.close();\n\t\t}\n\n\t}", "@Override\n public ArrayList<Recept> loadInBackground() {\n\n\n URL receptRequestUrl = NetworkUtils.buildUrl();\n\n try {\n String jsonWeatherResponse = NetworkUtils\n .getResponseFromHttpUrl(receptRequestUrl);\n\n\n System.out.println(jsonWeatherResponse);\n return ReceptJsonParser.getReceptDataFromJson(jsonWeatherResponse);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void getData(){\n class GetDataJSON extends AsyncTask<String, Void, String> {\n\n @Override\n protected String doInBackground(String... params) {\n DefaultHttpClient httpclient = new DefaultHttpClient(new BasicHttpParams());\n\n HttpPost httppost = new HttpPost(\"http://192.168.0.3/MRTS/patient/\"+\"Images/\"+\"http://192.168.0.3/MRTS/patient/\"+\"/Reports/\"+\"/script.php?list_files\");\n /* HttpPost httppost = new HttpPost(\"http://192.168.0.104/Paper/\"+\n Url.scheme.replace(\" \",\"%20\")+\"/\"+\n Url.diploma_g_dipartment.replace(\" \",\"%20\")+\"/\"+\n Url.diploma_g_sem.replace(\" \",\"%20\")+\"/\"+\n subjectNameSend_server.replace(\" \",\"%20\")+\"/script.php?list_files&p_id=\");\n*/\n // Depends on your web service\n httppost.setHeader(\"Content-type\", \"application/json\");\n\n InputStream inputStream = null;\n String result = null;\n try {\n HttpResponse response = httpclient.execute(httppost);\n HttpEntity entity = response.getEntity();\n\n inputStream = entity.getContent();\n // json is UTF-8 by default\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n while ((line = reader.readLine()) != null)\n {\n sb.append(line + \"\\n\");\n }\n result = sb.toString();\n Toast.makeText(context, \"dd\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n // Oops\n\n }\n finally {\n try{if(inputStream != null)inputStream.close();}catch(Exception squish){}\n }\n return result;\n }\n\n @Override\n protected void onPostExecute(String result){\n try {\n\n myJSON=result;\n // State_and_City.homeTabFlg=2;\n // Toast.makeText(context, \"k \"+myJSON, Toast.LENGTH_SHORT).show();\n showList();\n\n }catch (Exception f){\n\n Toast.makeText(getApplicationContext(), \"error recive ::\"+f, Toast.LENGTH_SHORT).show();\n }\n }\n }\n GetDataJSON g = new GetDataJSON();\n g.execute();\n }", "@Override\n protected String[] doInBackground(String... params) {\n\n if(params.length == 0){\n return null;\n }\n\n\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n\n // Will contain the raw JSON response as a string.\n String moviesJsonStr = null;\n\n //String my api Key\n String apiKey = \"\";\n\n\n try {\n\n // Construct the URL for the Themoviedb query\n // http://api.themoviedb.org/3/discover/movie?sort_by=popularity.desc&api_key=\n\n Uri.Builder uriBuild = Uri.parse(Constants.THEMOVIEDB_BASE_URL).buildUpon()\n .appendQueryParameter(Constants.SORT_BY_PARAM, params[0])\n .appendQueryParameter(Constants.API_KEY_PARAM, apiKey);\n\n URL url = new URL(uriBuild.toString());\n\n\n // Create the request to Movie Api, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuffer buffer = new StringBuffer();\n if (inputStream == null) {\n // Nothing to do.\n return null;\n }\n reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n // Since it's JSON, adding a newline isn't necessary (it won't affect parsing)\n // But it does make debugging a *lot* easier if you print out the completed\n // buffer for debugging.\n buffer.append(line + \"\\n\");\n }\n\n if (buffer.length() == 0) {\n // Stream was empty. No point in parsing.\n return null;\n }\n moviesJsonStr = buffer.toString();\n\n jsonAddress = moviesJsonStr;\n\n //Log.v(TAG, \"Themomovies JSON String: \" + moviesJsonStr);\n } catch (IOException e) {\n Log.e(TAG, \"Error \", e);\n // If the code didn't successfully get the movies data, there's no point in attemping\n // to parse it.\n return null;\n } finally{\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (reader != null) {\n try {\n reader.close();\n } catch (final IOException e) {\n Log.e(TAG, \"Error closing stream\", e);\n }\n }\n }\n\n try {\n return movielistStr = mMovies.getPosterAddress(moviesJsonStr);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n //This will only happen if there was an error getting or parsing the movies.\n return null;\n }", "public void parseJsonResponse(String result) {\n Log.i(TAG, result);\n\n try {\n JSONArray jsonArray = new JSONArray(result);\n\n for(int i=0; i<jsonArray.length(); i++){\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n Song song = new Song();\n\n song.setSongName(jsonObject.getString(\"song\"));\n song.setSongUrl(jsonObject.getString(\"url\"));\n song.setArtists(jsonObject.getString(\"artists\"));\n song.setCoverUrl(jsonObject.getString(\"cover_image\"));\n\n songList.add(song);\n }\n songsAdapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n progressBar.setVisibility(View.INVISIBLE);\n\n\n try {\n //getting the whole json object from the response\n JSONObject obj = new JSONObject(response);\n\n //we have the array named tutorial inside the object\n //so here we are getting that json array\n JSONArray tutorialsArray = obj.getJSONArray(\"tutorials\");\n\n //now looping through all the elements of the json array\n for (int i = 0; i < tutorialsArray.length(); i++) {\n //getting the json object of the particular index inside the array\n JSONObject tutorialsObject = tutorialsArray.getJSONObject(i);\n\n //creating a tutorial object and giving them the values from json object\n Tutorial tutorial = new Tutorial(tutorialsObject.getString(\"name\"), tutorialsObject.getString(\"imageurl\"),tutorialsObject.getString(\"description\"));\n\n //adding the tutorial to tutoriallist\n tutorialList.add(tutorial);\n }\n\n //creating custom adapter object\n MyAdapter adapter = new MyAdapter(tutorialList, getApplicationContext());\n\n //adding the adapter to listview\n listView.setAdapter(adapter);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }" ]
[ "0.69161284", "0.6649655", "0.6648988", "0.6596745", "0.6552257", "0.64729166", "0.6455205", "0.640234", "0.63776064", "0.62981457", "0.62895745", "0.62823886", "0.62189627", "0.61950505", "0.61843705", "0.61675525", "0.6155836", "0.6151264", "0.6145477", "0.6137609", "0.6112387", "0.6100337", "0.60930073", "0.60586363", "0.6054509", "0.6047492", "0.60342234", "0.6027017", "0.6017648", "0.60109377", "0.60007083", "0.6000632", "0.5996412", "0.5996053", "0.5988923", "0.59815645", "0.5976119", "0.5976012", "0.59734297", "0.5967515", "0.59636986", "0.5962446", "0.5949085", "0.5946606", "0.5942144", "0.5920663", "0.5916298", "0.58949476", "0.5886414", "0.5884347", "0.58668864", "0.5852106", "0.58513314", "0.5843751", "0.5832562", "0.5827438", "0.58079016", "0.5796558", "0.57956517", "0.5787081", "0.57860196", "0.578248", "0.5774162", "0.5771155", "0.576226", "0.5757241", "0.57516503", "0.5750257", "0.57443047", "0.5724163", "0.57165885", "0.5711888", "0.5699014", "0.5698233", "0.5695506", "0.56902367", "0.56835085", "0.56798786", "0.56711733", "0.5668484", "0.56662595", "0.56558967", "0.56551665", "0.56531024", "0.5637147", "0.5634792", "0.5623613", "0.56173193", "0.5613466", "0.5601944", "0.5594659", "0.55938643", "0.5589593", "0.5587586", "0.5586392", "0.55838263", "0.55698884", "0.55688876", "0.55651826", "0.55588937" ]
0.77497786
0
Parses a JSON object based on differing types of success codes. With a success of 0, the error message is parsed and displayed as a toast. With a success of 1, the detailed book information is parse and the book information is updated. With a success of 11, the comment was successfully added and a a message from the server is parsed and displayed as a toast. With a success of 14, a book was successfully checked out and a message from the server is parsed and displayed as a toast. With a success of 15, a book was successfully added to a wait list and a message from the server is parsed and displayed as a toast.
public void parseJSON(JSONObject json){ try { int success = json.getInt(KEY_SUCCESS); if(success == 0){ //An error occurred - Server will handle message String message = json.getString(KEY_MESSAGE); Toast.makeText(this, message, Toast.LENGTH_LONG).show(); }else if(success == 1){ //Book Info successfully retrieved //Get detailed book info JSONObject jsonResponse = json.getJSONObject(KEY_JSON); String title = jsonResponse.getString(KEY_TITLE); String subTitle = jsonResponse.getString(KEY_SUB_TITLE); String subject = jsonResponse.getString(KEY_SUBJECT); String description = jsonResponse.getString(KEY_DESCRIPTION); String authors = jsonResponse.getString(KEY_AUTHORS); //String bookDetails = jsonResponse.getString(KEY_BOOK_DETAILS); String thumbnail = jsonResponse.getString(KEY_THUMBNAIL); int copies = jsonResponse.getInt(KEY_COPIES); String ISBN10 = jsonResponse.getString(KEY_ISBN10); String ISBN13 = jsonResponse.getString(KEY_ISBN13); int numberRatings = jsonResponse.getInt(KEY_NUMBER_RATINGS); String averageRating = jsonResponse.getString(KEY_AVG_RATING); int availableCopies = jsonResponse.getInt(KEY_AVAILABLE_COPIES); JSONArray copyDetails = jsonResponse.getJSONArray(KEY_COPY_DETAILS); JSONArray reviews = jsonResponse.getJSONArray(KEY_REVIEWS); //Create book object currentBook = new Book(Float.valueOf(averageRating), numberRatings, copies, availableCopies, VALUE_GID, title, subTitle, null, subject, description, authors, thumbnail, null, ISBN10, ISBN13); //Get UID to check if there are comments by current user. Also assume that there are no reviews initially SharedPreferences sharedPref = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE); VALUE_UID = sharedPref.getInt("UID", -2); //Loop through copy details for(int i = 0; i < copyDetails.length(); i++){ JSONObject currentCopy = (JSONObject)copyDetails.get(i); int BID = currentCopy.getInt(KEY_BID); String checkoutTime = currentCopy.getString(KEY_CHECKOUT_TIME); String returnTime = currentCopy.getString(KEY_RETURN_TIME); int waitingListSize = currentCopy.getInt(KEY_WAITLIST_SIZE); int UID = currentCopy.getInt(KEY_UID); Copy curCopy = new Copy(BID, waitingListSize, checkoutTime, returnTime); currentBook.copies.add(curCopy); if (VALUE_UID == UID) { mCheckout.setText("Return"); checkedOut = true; mCopy = curCopy; break; }else{ checkedOut = false; mCheckout.setText(getResources().getString(R.string.checkout)); } } //Loop through Reviews for(int i = 0; i < reviews.length(); i++){ JSONObject currentReview = (JSONObject)reviews.get(i); int CID = currentReview.getInt(KEY_CID); int rating = currentReview.getInt(KEY_RATING); String timestamp = currentReview.getString(KEY_COMMENT_TIME); String commentTitle = currentReview.getString(KEY_COMMENT_TITLE); String comment = currentReview.getString(KEY_COMMENT); String name = currentReview.getString(KEY_NAME); int UID = currentReview.getInt(KEY_UID); Review curReview = new Review(CID, UID, rating, comment, commentTitle, timestamp, name); //If the current user already added a review, display it at the top. if(UID == VALUE_UID) { currentBook.reviews.add(0, curReview); }else { currentBook.reviews.add(curReview); } } retrieveDetailedImage(); displayBookInfo(); }else if(success == 11){ //Comment successfully added boolean authSuccess = json.getBoolean(KEY_AUTH_SUCCESS); Log.i("LoginActivity", "AUTH SUCCESS: " + authSuccess); if(authSuccess){ String message = json.getString(KEY_MESSAGE); Toast.makeText(this, message, Toast.LENGTH_SHORT).show(); //Updates new info Log.i("LoginActivity", "UPDATE INITIATED"); retrieveDetailedBookInfo(); }else{ ErrorUtils.errorDialog(this, "Authentication Error", "The user's credentials could not be authenticated, so the review was not uploaded. Please try logging out and baack in."); } }else if(success == 14){ //Book successfully checked out int BID = json.getInt(KEY_BID); SharedPreferences.Editor prefEditor = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE).edit(); prefEditor.putInt("BOOK" + BID, BID); prefEditor.commit(); String message = json.getString(KEY_MESSAGE); Toast.makeText(this, message, Toast.LENGTH_LONG).show(); checkedOut = true; mCheckout.setText("Return"); configureReturnAlarm(BID); if(restartOnFinished){ restartOnFinished = false; refreshScreen(); } }else if(success == 15){ //Successfully added to wait list int BID = json.getInt(KEY_BID); SharedPreferences.Editor prefEditor = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE).edit(); prefEditor.putInt("WAITLIST" + BID, BID); prefEditor.commit(); String message = json.getString(KEY_MESSAGE); Toast.makeText(this, message, Toast.LENGTH_LONG).show(); if(restartOnFinished) { restartOnFinished = false; refreshScreen(); } }else if(success == 16){ //Successfully returned int BID = json.getInt(KEY_BID); SharedPreferences pref = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE); SharedPreferences.Editor prefEditor = pref.edit(); prefEditor.remove("BOOK" + BID); prefEditor.commit(); String message = json.getString(KEY_MESSAGE); Toast.makeText(this, message, Toast.LENGTH_LONG).show(); checkedOut = false; mCheckout.setText("Checkout"); if(restartOnFinished) { restartOnFinished = false; refreshScreen(); } Log.i("LoginActivity", "SUCCESS RETURNED"); } }catch(JSONException JSONE){ JSONE.printStackTrace(); ErrorUtils.errorDialog(this, "Malformed JSON Error", "A malformed response was recieved from the server. Please try again later."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void parseStatus(JSONObject statusObject) throws JSONException\n {\n String message = statusObject.getString(\"message\");\n\n // Other example not related to Winnipeg Transit\n //int likelihood = object.getInt(\"likelihood\");\n\n TextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n tvStatus.setText(message);\n }", "private void showSuccess(JSONObject jsonObject) {\n try {\n JSONObject response = new JSONObject();\n response.put(\"success\", true);\n mResponse.setValue(response);\n } catch (JSONException e) {\n Log.e(\"JSON PARSE\", \"JSON Parse Error in handleError\");\n }\n }", "@Override\n\t\t\t\t\tpublic void onSuccess(Object t) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject jsonObject = new JSONObject(t.toString());\n\t\t\t\t\t\t\tString code = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"code\");\n\t\t\t\t\t\t\tString msg = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"msg\");\n\t\t\t\t\t\t\tif (!\"\".equals(msg)) {\n\t\t\t\t\t\t\t\tToast.makeText(SaveReceipptActivity.this, msg,\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\"1\".equals(code)) {\n\t\t\t\t\t\t\t\tsetResult(1);\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuper.onSuccess(t);\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty=response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test5\", \"5555555555--->\"+response.toString());\r\n\t\t\t\t\t\t\tif(\"no\".equals(empty)){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes1111111111111\");\r\n\t\t\t\t\t\t\t}else if(\"ok\".equals(empty)){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tJSONObject Json = new JSONObject(response);\n\t\t\tprogress.dismiss();\n\t\t\tif (Json.has(\"success\")) {\n\n\t\t\t\tint value = Json.getInt(\"success\");\n\t\t\t\tif (value == 0) {\n\n\t\t\t\t\tthrow new JSONException(\"Failed to Update \");\n\t\t\t\t} else if (value == 1) {\n\t\t\t\t\talert.setTitle(R.string.refertitle)\n\t\t\t\t\t\t\t.setMessage(\n\t\t\t\t\t\t\t\t\tact.getResources().getString(R.string.refermessage)\n\t\t\t\t\t\t\t\t\t\t\t+ Json.getInt(\"count\")+\" \"\n\t\t\t\t\t\t\t\t\t\t\t+ act.getResources().getString(R.string.refermessagecontinue))\n\t\t\t\t\t\t\t.setNeutralButton(R.string.ok,\n\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\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(\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).show();\n\t\t\t\t} else if (value == 2) {\n\n\t\t\t\t\talert.setTitle(R.string.refertitle)\n\t\t\t\t\t\t\t.setMessage(R.string.refersuccessmessage)\n\t\t\t\t\t\t\t.setNeutralButton(R.string.ok,\n\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\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(\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).show();\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new JSONException(\n\t\t\t\t\t\t\"success keyword is missing in response\");\n\t\t\t}\n\t}\n\t\tcatch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(\n\t\t\t\t\tcontext,\n\t\t\t\t\t\"Unexpected Response from Server!! Please Try after Some time\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\te.printStackTrace();\n\t\t}\n}", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty = response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test4\", \"444444444--->\"+empty);\r\n\t\t\t\t\t\t\tif(empty.equals(\"no\")){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");//已完成 和未完成都为空\r\n\t\t\t\t\t\t\t}else if(empty.equals(\"ok\")){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "protected void tijiaoListInfo(String result) {\n\t\ttry {\n\t\t\tJSONObject object = new JSONObject(result);\n\t\t\tString code = object.getString(\"code\");\n\t\t\tif (\"200\".equals(code)) {\n\t\t\t\trzid = object.getString(\"id\");\n\t\t\t\thandler.sendEmptyMessage(HANDLER_TIJIAO_SUCCESS);\n\t\t\t} else if (\"700\".equals(code)) {\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendMessage(handler.obtainMessage(\n\t\t\t\t\t\tHANDLER_TOKEN_FAILURE, message));\n\t\t\t} else {\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendMessage(handler.obtainMessage(\n\t\t\t\t\t\tHANDLER_GETINFO_FAILURE, message));\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\thandler.sendEmptyMessage(HANDLER_NN_FAILURE);\n\t\t}\n\t}", "private static Result parseCard(String json) throws Exception{\n\t\tLogUtils.e(Parser.class, json);\n\t\tResult result = new Result();\n\t\tJSONObject jObj = new JSONObject(json);\n\t\tint code = jObj.getInt(\"code\");\n\t\tswitch(code){\n\t\tcase 0:\n\t\t\tJSONObject data = jObj.getJSONObject(\"obj\");\n\t\t\tint coin = data.getInt(\"Coin\");\n\t\t\tresult.setData(coin);\n\t\t\tbreak;\n\t\tcase 1://card khong hop le\n\t\t\tresult.setError(Error.CARD_NOT_VALID);\n\t\t\tbreak;\n\t\tcase 2://card da duoc su dung\n\t\t\tresult.setError(Error.CARD_USED);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tresult.setError(Error.UNKNOWN_ERROR);\n\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\t\t\tpublic void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\t\t\t\ttry {\n\n\t\t\t\t\tif (statusCode == 200) {\n\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\tif (response.has(\"status\")) {\n\t\t\t\t\t\t\t\tif (response.getInt(\"status\") == 1) {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\n\t\t\t\t\t\t\t\t\tmhandle.postDelayed(runnbale, 1000);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tshowCustomToast(R.string.toast1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\tdismissLoadingDialog();\n\t\t\t}", "@Override\n\t\t\tpublic void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\t\t\t\ttry {\n\n\t\t\t\t\tif (statusCode == 200) {\n\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\tif (response.has(\"status\")) {\n\t\t\t\t\t\t\t\tif (response.getInt(\"status\") == 1) {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tshowCustomToast(response.getString(\"message\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tshowCustomToast(R.string.toast1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\tdismissLoadingDialog();\n\t\t\t}", "@Override\n\t\t\t\tpublic void onBizSuccess(String responseDescription, JSONObject data, final String all_data) {\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tString status = data.getString(\"status\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (status != null && status.equals(\"1\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tT.showToast(VoteDetailActivity.this, com.rs.mobile.wportal.R.string.kr_vote_complete);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tT.showToast(VoteDetailActivity.this, data.getString(\"msg\"));\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} catch (Exception e) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tL.e(e);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}", "public void processResult(String json){\n Result res = gson.fromJson(json, Result.class);\n\n // Jika tidak terdapat error, maka lakukan pemrosesan data\n // dan ditampilkan pada TextView.\n res.getError();\n MainActivity mainActivity = new MainActivity();\n mainActivity.tvHasil.setText(res.getResult().toString());\n\n }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif(resp.contains(\"success\"))\n\t\t\t{\n\t\t\t\tparsingmethod();\n\t\t\t\tToast.makeText(getApplicationContext(), resp, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tToast.makeText(getApplicationContext(), resp, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONObject jsonObj2) {\n try{\n if(jsonObj2.getString(\"result\").equals(\"Failed\")){\n Toast.makeText(context, \"\"+jsonObj2.getString(\"message\"), Toast.LENGTH_SHORT).show();\n }else if(jsonObj2.getString(\"result\").equals(\"Successful\")){\n Toast.makeText(context, \"\"+jsonObj2.getString(\"message\"), Toast.LENGTH_SHORT).show();\n balance_view.setText(\"Hello \"+jsonObj2.get(\"fromuser\")+\", your balance is : \"+jsonObj2.getString(\"from_user_updated_balance\"));\n\n } }catch(Exception e){}\n }", "@Override\n public void onSucces(String result) {\n JSONObject object = new JSONObject();\n boolean isSuccess = object.optBoolean(result);\n Log.hb(\"orderDetailBean.order_info.status after::\"+orderDetailBean.order_info.status);\n finish();\n }", "@Override\r\n\t\t\t\t\t\tpublic void result(ResposneBundle b) {\n\t\t\t\t\t\t\tLog.e(\"result\", b.getContent());\r\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tJSONObject job = new JSONObject(b.getContent());\r\n\t\t\t\t\t\t\t\tif (job.getInt(\"code\") == -1) {\r\n\t\t\t\t\t\t\t\t\tact.showToast(job.getString(\"msg\"));\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tf.refreshFriendList();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUpFromSrv-ERROR->\"+e.getMessage());\r\n\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n // Hide Progress Dialog\n prgDialog.hide();\n // try {\n // JSON Object\n// String str=new String(response);\n// JSONObject obj = new JSONObject(str);\n // When the JSON response has status boolean value assigned with true\n if(statusCode==200){\n\n // Display successfully registered message using Toast\n Toast.makeText(getApplicationContext(), \"Thanks for the Donation.Our representative will contact you shortly :)\", Toast.LENGTH_LONG).show();\n navigateToHomeActivity();\n }\n\n }", "@Override\n\t\t\tpublic void handlerSuccess(String response) {\n\t\t\t\t Log.d(TAG, response); \n\t\t\t\t isStart = false;\n\t\t\t\t try {\n\t\t\t\t\tif(!TextUtils.isEmpty(response)){\n\t\t\t\t\t\t JSONObject obj = new JSONObject(response);\n\t\t\t\t\t\t if(obj.has(\"code\")){\n\t\t\t\t\t\t\tString code = obj.getString(\"code\");\n\t\t\t\t\t\t\t if(\"10006\".equals(code)){\n\t\t\t\t\t\t\t\t final String msg = obj.getString(\"message\");\n\t\t\t\t\t\t\t\t runOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, msg+\"\", Toast.LENGTH_SHORT).show();\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 }else if(\"0\".equals(code)){\n\t\t\t\t\t\t\t\t JSONObject json2 = obj.getJSONObject(\"data\");\n\t\t\t\t\t\t\t\t Config.setUserId(context, json2.getString(\"user_id\"));\n\t\t\t\t\t\t\t\t Config.setUserToken(context, json2.getString(\"token\"));\n\t\t\t\t\t\t\t\t runOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\ttoLoginActivity();\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\t \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}", "private int returnParsedJsonObject(String result){\n\n JSONObject resultObject = null;\n int returnedResult = 0;\n try {\n resultObject = new JSONObject(result);\n returnedResult = resultObject.getInt(\"success\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Log.d(\"PRUEBA\",\"se obtubo en el JSON: \"+returnedResult);\n return returnedResult;\n }", "protected void onPostExecute(String result) {\n pDialog.dismiss();\n\n Log.d(\"workshop onPostExecute:\",result);\n\n try {\n // Checking for SUCCESS TAG\n // Check your log cat for JSON reponse\n jObj_result = new JSONObject(result);\n v_success = jObj_result.getInt(TAG_SUCCESS);\n v_msg = jObj_result.getString(TAG_MSG);\n\n } catch (JSONException e) {\n v_success = 0;\n e.printStackTrace();\n }\n\n Log.d(\"workshop v_msg:\",v_msg);\n if (v_success == 1) {\n Toast.makeText(myContext, v_msg, Toast.LENGTH_SHORT).show();\n } //else msg Erro\n\n }", "protected void onPostExecute(String result) {\n pDialog.dismiss();\n\n Log.d(\"workshop onPostExecute:\",result);\n\n try {\n // Checking for SUCCESS TAG\n // Check your log cat for JSON reponse\n jObj_result = new JSONObject(result);\n v_success = jObj_result.getInt(TAG_SUCCESS);\n v_msg = jObj_result.getString(TAG_MSG);\n\n } catch (JSONException e) {\n v_success = 0;\n e.printStackTrace();\n }\n\n Log.d(\"workshop v_msg:\",v_msg);\n if (v_success == 1) {\n Toast.makeText(myContext, v_msg, Toast.LENGTH_SHORT).show();\n } //else msg Erro\n\n }", "protected void erweimaJsonInfo(String result) {\n\t\ttry {\n\t\t\tJSONObject object = new JSONObject(result);\n\t\t\tString status = object.getString(\"code\");\n\t\t\tif (\"200\".equals(status)) {\n\t\t\t\tmember_qrcode = object.getString(\"member_qrcode\");\n\t\t\t\tJSONObject jo = object.getJSONObject(\"data\");\n\t\t\t\tmember_name = jo.getString(\"member_name\");\n\t\t\t\tString avator = jo.getString(\"avator\");\n\t\t\t\thandler.sendEmptyMessage(HANDLER_ERWEIMA_SUCCESS);\n\t\t\t} else if (\"700\".equals(status)){\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendEmptyMessage(HANDLER_TOKEN_FAILURE);\n\t\t\t}else {\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendMessage(handler.obtainMessage(\n\t\t\t\t\t\tHANDLER_GETINFO_FAILURE, message));\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\thandler.sendEmptyMessage(HANDLER_NN_FAILURE);\n\t\t}\n\t}", "@Override\n public void onSuccess(JSONObject response) {\n try {\n Log.d(TAG,response.toString());\n String message = response.getString(\"message\");\n // When tag is added\n if(\"tag added\".equals(message)){\n Intent intent = new Intent(ScanHint.this, GameHints.class);\n intent.putExtra(\"Game\", (Parcelable) game);\n intent.putExtra(\"Team\", (Serializable) team);\n intent.putExtra(\"Hint\", (Serializable) gm.getTagsByGameID(game.getId()));\n intent.putExtra(\"username\", username);\n tagHitSound.playTagHitSound();\n startActivity(intent);\n }\n // Tag that has already been scanned, notify the user\n else if(message.equals(\"tag already found\")){\n\n LayoutInflater inflater = getLayoutInflater();\n View layoutToast = inflater.inflate(R.layout.toast,\n (ViewGroup) findViewById(R.id.toast_layout));\n TextView textToast = (TextView) layoutToast.findViewById(R.id.toast_text);\n textToast.setText(\"Tag Already Found\");\n Toast tagFoundToast = new Toast(getApplicationContext());\n tagFoundToast.setGravity(Gravity.CENTER, 0, 0);\n tagFoundToast.setDuration(Toast.LENGTH_SHORT);\n tagFoundToast.setView(layoutToast);\n tagFoundToast.show();\n tagFoundSound.playAlreadyTaggedSound();\n }\n // Wrong tag, notify the user\n else{\n LayoutInflater inflater = getLayoutInflater();\n View layoutToast = inflater.inflate(R.layout.toast,\n (ViewGroup) findViewById(R.id.toast_layout));\n TextView textToast = (TextView) layoutToast.findViewById(R.id.toast_text);\n textToast.setText(\"Wrong Tag!\");\n Toast wrongTagToast = new Toast(getApplicationContext());\n wrongTagToast.setGravity(Gravity.CENTER, 0, 0);\n wrongTagToast.setDuration(Toast.LENGTH_SHORT);\n wrongTagToast.setView(layoutToast);\n wrongTagToast.show();\n }\n } catch(JSONException e){\n e.printStackTrace();\n Toast toast=Toast.makeText(getApplicationContext(),\"Something went wrong\",Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n }\n }", "@Override\n\t\t\tpublic void onSuccess(Object t) {\n\t\t\t\tString s=(String) t;\n\t\t\t\tJiancheResp resp=(JiancheResp)\tReqJsonUtil.changeToObject(s, JiancheResp.class);\n\t\t\t\tif(resp!=null){\n\t\t\t\t\tif(resp.getData()!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(resp.getData().size()==0){\n\t\t\t\t\t\t\tDialogUtil.toast(context, \"项目为空:\");\n\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\tString[] arr=new String[resp.getData().size()+1];\n\t\t\t\t\t\t\tarr[0]=\"正常\";\n\t\t\t\t\t\t\tfor(int i=0;i<resp.getData().size();i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarr[i+1]=resp.getData().get(i).getItname();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\td(title,arr);\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}\n\t\t\t\t}else{\n\t\t\t\t\tDialogUtil.toast(context, \"项目为空\");\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n\n //obj.getstring(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(profile.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(Object object) {\n String strJson = (String) object;\n try {\n JSONObject json = new JSONObject(strJson);\n if (json.getString(WebServiceConfig.KEY_STATUS)\n .equals(WebServiceConfig.KEY_STATUS_SUCCESS)) {\n if (paymentMethod != BANKING_METHOD) {\n CustomToast.showCustomAlert(\n self,\n self.getString(R.string.message_success),\n Toast.LENGTH_SHORT);\n } else {\n showBankInfo(json.getString(\"message\"));\n }\n GlobalValue.arrMyMenuShop.clear();\n shopAdapter.notifyDataSetChanged();\n refreshContent();\n } else {\n CustomToast.showCustomAlert(\n self,\n self.getString(R.string.message_order_false),\n Toast.LENGTH_SHORT);\n }\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void onSuccess(String t) {\n\t\t\t\tsuper.onSuccess(t);\n\t\t\t\tTools.DismissLoadingActivity(context);\n\t\t\t\tLogUtils.i(t);\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject jsonObject = new JSONObject(t);\n\t\t\t\t\tif (jsonObject.getInt(\"result\") == 1) {\n\t\t\t\t\t\tJSONArray array = jsonObject.getJSONArray(\"list\");\n\t\t\t\t\t\tif (array.length() > 0) {\n\t\t\t\t\t\t\tString version_number = array.getJSONObject(0)\n\t\t\t\t\t\t\t\t\t.getString(\"version_number\");\n\t\t\t\t\t\t\tMessage msg = handle.obtainMessage(\n\t\t\t\t\t\t\t\t\tGlobalVars.VERSION_UPDATE, version_number);\n\t\t\t\t\t\t\tmsg.sendToTarget();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tTools.showTextToast(context, \"获取失败 \");\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "private void updatestatuscode() {\r\n String error = null;\r\n if (inValidStatus()) {\r\n error = getJson(\"msg\");\r\n }\r\n if (error != null) {\r\n if (error.equals(\"Cannot login Check your username or pass\")) {\r\n statuscode = 1;\r\n } else if (error.equals(\"Your account is not premium\")) {\r\n statuscode = 2;\r\n } else {\r\n /* TODO: Enable code below once all known errors are correctly handled */\r\n // statuscode = 666;\r\n }\r\n } else {\r\n if (inValidStatus() && \"null\".equalsIgnoreCase(getJson(\"link\"))) {\r\n statuscode = 3;\r\n } else {\r\n /* Everything should be ok */\r\n statuscode = 0;\r\n }\r\n }\r\n }", "private static Result parseNotify(String reader) throws Exception {\n\t\tResult result = new Result();\n\t\tJSONObject jObj = new JSONObject(reader);\n\t\tint code = jObj.getInt(\"code\");\n\t\tif (code == 0) {\n\t\t\tJSONArray datas = jObj.getJSONArray(\"obj\");\n\t\t\tObject[][] notifies = new Object[datas.length()][];\n\t\t\tfor (int j = 0; j < datas.length(); j++) {\n\t\t\t\tJSONObject data = datas.getJSONObject(j);\n\t\t\t\tint type = data.getInt(\"Type\");\n\t\t\t\tint id = data.getInt(\"Id\");\n\t\t\t\tObject[] notify = null;\n\t\t\t\tswitch (type) {\n\t\t\t\tcase 0:\n\t\t\t\t\t// payment\n\t\t\t\t\tnotify = new Object[3];\n\t\t\t\t\tnotify[1] = type;\n\t\t\t\t\tJSONArray arr = data.getJSONArray(\"Content\");\n\t\t\t\t\tPayment[] payment = new Payment[arr.length()];\n\t\t\t\t\tfor (int i = 0; i < arr.length(); i++) {\n\t\t\t\t\t\tJSONObject idx = arr.getJSONObject(i);\n\t\t\t\t\t\tpayment[i] = new Payment();\n\t\t\t\t\t\tpayment[i].setCode(idx.getString(\"Code\"));\n\t\t\t\t\t\tpayment[i].setSyntax(idx.getString(\"Syntax\"));\n\t\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\t\tpayment[i].setType(SMSUtils.SMS_2K);\n\t\t\t\t\t\t} else if(i== 1){\n\t\t\t\t\t\t\tpayment[i].setType(SMSUtils.SMS_5k);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpayment[i].setType(SMSUtils.SMS_15k);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnotify[2] = payment;\n\t\t\t\t\tnotify[0] = id;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t// message\n\t\t\t\t\tnotify = new Object[3];\n\t\t\t\t\tnotify[1] = type;\n\t\t\t\t\tnotify[2] = data.getString(\"Content\");\n\t\t\t\t\tnotify[0] = id;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t// open web\n\t\t\t\t\tnotify = new Object[4];\n\t\t\t\t\tnotify[1] = type;\n\t\t\t\t\tnotify[2] = data.getString(\"Link\");\n\t\t\t\t\tnotify[3] = data.getString(\"Content\");\n\t\t\t\t\tnotify[0] = id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tnotifies[j] = notify;\n\t\t\t}\n\t\t\tresult.setData(notifies);\n\t\t} else\n\t\t\tresult.setError(Error.SERVER_ERROR);\n\t\treturn result;\n\t}", "@Override\n\t\tpublic void onSuccess(ResponseInfo<String> arg0)\n\t\t{\n\t\t\tHealthUtil.LOG_D(getClass(), \"result=\" + arg0.result);\n\t\t\tif (dialog.isShowing())\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t\tswitch (responseCode)\n\t\t\t{\n\t\t\tcase GET_LIST:\n\t\t\t\treturnMsg(arg0.result, GET_LIST);\n\t\t\t\tbreak;\n\t\t\tcase GET_LIST_MORE:\n\t\t\t\treturnMsg(arg0.result, GET_LIST_MORE);\n\t\t\t\tbreak;\n\t\t\tcase ADD_REGISTER_ORDER:\n\t\t\t\treturnMsg(arg0.result, ADD_REGISTER_ORDER);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n public void onSuccessResponse(String result) {\n LatestDetailBean detailBean = JSON.parseObject(result, LatestDetailBean.class);\n Log.e(\"TAG\", \"detailBean \" + detailBean.toString());\n initUI(detailBean);\n }", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int arg0, Header[] arg1,\r\n\t\t\t\t\t\t\t\tbyte[] arg2) {\n\t\t\t\t\t\t\tsuper.onSuccess(arg0, arg1, arg2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString response;\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tresponse = new String(arg2,\"UTF-8\");\r\n\t\t\t\t\t\t\t\tresponse=response.substring(response.indexOf(\"{\"));\r\n\t\t\t\t\t\t\t\tMyLog.i(\"发送短信信息返回\", response);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tBaseModel<String> result = new Gson().fromJson(\r\n\t\t\t\t\t\t\t\t\t\tresponse,\r\n\t\t\t\t\t\t\t\t\t\tnew TypeToken<BaseModel<String>>() {\r\n\t\t\t\t\t\t\t\t\t\t}.getType());\r\n\t\t\t\t\t\t\t\tif (result.isSuccess()) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tnew Thread(){ \r\n\r\n\t\t\t\t\t\t\t\t\t\tpublic void run(){ \r\n\t\t\t\t\t\t\t\t\t\t while(time>0){ \r\n\t\t\t\t\t\t\t\t\t\t \tMessage msg =Message.obtain();\r\n\t\t\t\t\t\t\t\t\t\t\t\ttime--;\r\n\t\t\t\t\t\t\t\t\t\t\t\thandler.sendEmptyMessage(MessageWhat.SENDCODE);\r\n\t\t\t\t\t\t\t\t\t\t try {\r\n\t\t\t\t\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t } \r\n\t\t\t\t\t\t\t\t\t\t currentThread().interrupt();\r\n\t\t\t\t\t\t\t\t\t\t time=60;\r\n\t\t\t\t\t\t\t\t\t\t } \r\n\t\t\t\t\t\t\t\t\t\t}.start();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tcode=result.getData();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tback.sms(code);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tToastUtil.show(context,result.getMsg());\r\n\t\t\t\t\t\t\t\t\t((Button) v).setClickable(true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}catch (JsonSyntaxException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\tMyLog.i(\"json解析错误\", \"解析错误\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray timeline) {\n try {\n JSONArray jAr = timeline;\n if (jAr.getJSONObject(0).getString(\"retval\") == \"0\") {\n Utils.USER = sUsername;\n if (chkFull == 1) {\n Intent ir = new Intent(HomeScreen.this, TableSelection.class);\n ir.putExtra(\"tbl\", 2);\n startActivity(ir);\n } else if (chkFull == 2)\n startActivity(new Intent(HomeScreen.this, MainActivity.class));\n else if (chkFull == 3) {\n startActivity(new Intent(HomeScreen.this, FliterActivity.class));\n overridePendingTransition(R.anim.left_right, R.anim.right_left);\n } else if (chkFull == 4) {\n alertT();\n } else\n alertT();\n } else {\n Utils.alertDialogShow(HomeScreen.this, getString(R.string.auth), getString(R.string.aut_alert), 0);\n\n }\n } catch (JSONException exception) {\n Log.d(\"this error\", \"\" + exception);\n }\n System.out.println(timeline);\n }", "@Override\r\n public void onSuccess(String t) {\n super.onSuccess(t);\r\n MyLog.i(\"YUY\", \"车辆违章信息 = \" + t);\r\n\r\n try {\r\n JSONObject jo = new JSONObject(t.toString());\r\n if (jo.getInt(\"result\") == 1) {\r\n mViolationDate = ViolationDate.parse(jo\r\n .getString(\"data\"));\r\n if (Integer.parseInt(mViolationDate.getCount()) == 0) {\r\n ToastUtil.toastShow(\r\n IllegalQueryActivity.this,\r\n \"暂未查到您的违章信息\");\r\n return;\r\n }\r\n if (mViolationDate != null\r\n && mViolationDate.getItem().size() > 0) {\r\n getScoreByIllegalDe();\r\n }\r\n\r\n }\r\n } catch (JSONException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(EditProfile.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n\n finish();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\tcRequesttype = true;\r\n//\t\t\t\t\t\tmaddapter.notifyDataSetChanged();\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void success(Object result) {\n super.success(result);\n if (null == result) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n JSONObject json = JSON.parseObject(result.toString());\n if (200 != json.getIntValue(\"code\")) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n\n String number = \"0.00\";\n if (!Util.isNull(json.getString(\"shopping_voucher\"))) {\n number = json.getString(\"shopping_voucher\");\n }\n gowuquan.setText(number);\n gowuquan.setVisibility(View.VISIBLE);\n\n\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray timeline) {\n try {\n if (timeline.length() == 0) {\n filMthd();\n //progressDialog.dismiss();\n return;\n\n } else {\n if (keyVlue.equalsIgnoreCase(\"Meal Timing\")) {\n Calendar cal = Calendar.getInstance();\n int hour = cal.HOUR_OF_DAY;\n timingHere = new ArrayList<String>();\n for (int i = 0; i < timeline.length(); i++) {\n timingHere.add(timeline.getJSONObject(i).getString(\"start_time\"));\n }\n Utils.writeList(BackgrodBaseActivity.this, timingHere, \"timingarraylist\");\n if (Utils.getString(BackgrodBaseActivity.this, \"Malid\").equalsIgnoreCase(\"T2\")) {\n MealID = timeline.getJSONObject(1).getString(\"meal_id\");\n } else\n MealID = timeline.getJSONObject(0).getString(\"meal_id\");\n\n\n String urlTr = Utils.INTIALSTRI + Utils._POSCLIENT + Utils.COMPCODE + \"&regcode=\" + tsdArr.get(4) + \"&outlet=\" + tsdArr.get(6);\n // urlMethods(urlTr, \"POS\");\n } else if (keyVlue.equalsIgnoreCase(\"Meal GROUP\")) {\n MealGroup = timeline.getJSONObject(0).getString(\"MealGroup\");\n\n } else if (keyVlue.equalsIgnoreCase(\"FULL DETAILS\")) {\n addObj = new JSONArray();\n addObj = timeline;\n }\n\n\n //startActivity(new Intent(BackgrodBaseActivity.this, ServerConfig.class));\n }\n\n\n } catch (Exception exception) {\n //progressDialog.dismiss();\n return;\n\n // handleError(exception);\n } // Do something with the response\n System.out.println(timeline);\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void onResponse(JSONObject response) {\n try {\n String status = response.optString(\"status\");\n String msg = response.optString(\"msg\");\n\n String update_status = response.optString(\"update_status\");\n String totallike = response.optString(\"totallike\");\n if ((update_status.equalsIgnoreCase(\"1\") || update_status == \"1\") && (status == \"success\" || status.equalsIgnoreCase(\"success\"))) {\n tv_tlike.setTextColor(Color.RED);\n //ivLike.setBackgroundColor(Color.RED);\n tv_tlike.setText(totallike);\n } else {\n tv_tlike.setTextColor(Color.BLACK);\n tv_tlike.setText(totallike);\n }\n Toast.makeText(mContext, msg, Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(mContext, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n mCustomers = new ArrayList<>();\n mCustomers = LoganSquare.parseList(response.getString(\"customers\"), User.class);\n queueCountTV.setText(\"(\" + mCustomers.size() + \")\");\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\n\t\t\t// json success tag\n\t\t\tString success1;\n\n\t\t\ttry {\n\t\t\t\tsuccess1 = json.getString(TAG_SUCCESS);\n\t\t\t\tSystem.out.println(\"tag\" + success1);\n\t\t\t\tJSONObject data = json.getJSONObject(\"data\");\n\t\t\t\t// String Data_Success = data.getString(TAG_SUCCESS);\n\t\t\t\t// System.out.println(\"Data tag\" + Data_Success);\n\t\t\t\t// ******** data succsess\n\n\t\t\t\tif (success1.equals(\"true\")) {\n\t\t\t\t\tif (data.length() != 0) {\n\n\t\t\t\t\t\tString open_time = data.getString(\"open_time\");\n\t\t\t\t\t\tString close_name = data.getString(\"close_time\");\n\n\t\t\t\t\t\tnew TableGrabOrder().execute();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// **** invalid output\n\t\t\t\telse {\n\t\t\t\t\tif (success1.equalsIgnoreCase(\"false\")) {\n\t\t\t\t\t\tJSONObject Data_Error = data.getJSONObject(\"errors\");\n\t\t\t\t\t\tSystem.out.println(\"Data_Error\" + Data_Error);\n\n\t\t\t\t\t\tif (Data_Error.has(\"rest_id\")) {\n\t\t\t\t\t\t\tJSONArray Array_rest_id = Data_Error\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"rest_id\");\n\t\t\t\t\t\t\tSystem.out.println(\"Array_rest_id\" + Array_rest_id);\n\t\t\t\t\t\t\tString Str_rest_id = Array_rest_id.getString(0);\n\t\t\t\t\t\t\tSystem.out.println(\"Str_rest_id\" + Str_rest_id);\n\t\t\t\t\t\t\tif (Str_rest_id != null) {\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\tStr_rest_id, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Data_Error.has(\"type\")) {\n\t\t\t\t\t\t\tJSONArray Array_type = Data_Error\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"type\");\n\t\t\t\t\t\t\tSystem.out.println(\"Array_type\" + Array_type);\n\t\t\t\t\t\t\tString Str_type = Array_type.getString(0);\n\t\t\t\t\t\t\tSystem.out.println(\"Str_type\" + Str_type);\n\t\t\t\t\t\t\tif (Str_type != null) {\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\tStr_type, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Data_Error.has(\"date\")) {\n\t\t\t\t\t\t\tJSONArray Array_date = Data_Error\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"date\");\n\t\t\t\t\t\t\tSystem.out.println(\"Array_date\" + Array_date);\n\t\t\t\t\t\t\tString Str_date = Array_date.getString(0);\n\t\t\t\t\t\t\tSystem.out.println(\"Str_date\" + Str_date);\n\t\t\t\t\t\t\tif (Str_date != null) {\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\tStr_date, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Data_Error.has(\"time\")) {\n\t\t\t\t\t\t\tJSONArray Array_time = Data_Error\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"time\");\n\t\t\t\t\t\t\tSystem.out.println(\"Array_time\" + Array_time);\n\t\t\t\t\t\t\tString Str_time = Array_time.getString(0);\n\t\t\t\t\t\t\tSystem.out.println(\"Str_time\" + Str_time);\n\t\t\t\t\t\t\tif (Str_time != null) {\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\tStr_time, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Data_Error.has(\"sessid\")) {\n\t\t\t\t\t\t\tJSONArray Array_sessid = Data_Error\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"sessid\");\n\t\t\t\t\t\t\tSystem.out.println(\"Array_sessid\" + Array_sessid);\n\t\t\t\t\t\t\tString Str_sessid = Array_sessid.getString(0);\n\t\t\t\t\t\t\tSystem.out.println(\"Str_email\" + Str_sessid);\n\t\t\t\t\t\t\tif (Str_sessid != null) {\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\tStr_sessid, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tif (dialog.isShowing()) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\n\t\t}", "@Override\n\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgetJsonObj(response);\n\t\t\t\t\t\tLog.e(\"lory.....\", \"\"+fans.toString());\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t}", "public void setAsSuccessful_OK(){\n setStatus(200);\n }", "public void showOpinionCreatedMessage(int success) {\n if (success == 2) { // Update Opinion\n Toast.makeText(getBaseContext(), \"Opinión actualizada con éxito\", Toast.LENGTH_LONG).show();\n } else if (success == 1) { // Insert Opinion\n Toast.makeText(getBaseContext(), \"Opinión enviada con éxito\", Toast.LENGTH_LONG).show();\n } else { // Insert & Update Failed\n Toast.makeText(getBaseContext(), \"Intentelo más tarde\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\n\t\t\t\t}", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tmDialog.dismiss();\n\t\ttry {\n\t\t\tJSONObject jsonObject = new JSONObject(result);\n\t\t\t// {\"message\":\"sukses\"}\n\t\t\tString status = jsonObject.getString(\"message\");\n\n\t\t\tif (status.equalsIgnoreCase(\"sukses\")) {\n\t\t\t\tnew AlertDialog.Builder(mContext)\n\t\t\t\t\t\t.setTitle(\"Success\")\n\t\t\t\t\t\t.setMessage(\"Edit Success \")\n\t\t\t\t\t\t.setPositiveButton(\"Ok\",\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\t\t// pop to previous fragment\n\t\t\t\t\t\t\t\t\t\tmFragmentActivity\n\t\t\t\t\t\t\t\t\t\t\t\t.getSupportFragmentManager()\n\t\t\t\t\t\t\t\t\t\t\t\t.popBackStack();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}).create().show();\n\t\t\t} else {\n\t\t\t\tGeneral.showDialogError(mContext, mContext.getResources()\n\t\t\t\t\t\t.getString(R.string.failed_edit_to_server)\n\t\t\t\t\t\t+ \". Please Check Your Connection.\", \"Attention\");\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\tGeneral.showDialogError(mContext, mContext.getResources()\n\t\t\t\t\t.getString(R.string.failed_edit_to_server)\n\t\t\t\t\t+ \". Please Check Your Connection.\", \"Attention\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\t\n\t\t\tif(response2.contains(\"success\"))\n\t\t\t{\n\t\t\t\tapr_parsingmethod();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tToast.makeText(getApplicationContext(), \"No users approved yet.\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}", "private boolean handleData(String serverMessage){\r\n\t\t// Separating the message STATUS + TOKEN\r\n\t\tString[] messageParts = serverMessage.split(SEPARATOR);\r\n\r\n\t\t// Get status code from message\r\n\t\tint error = Integer.parseInt(messageParts[0]);\r\n\r\n\t\t//Process status\r\n\t\tswitch (error) {\r\n\t\tcase REQUEST_OK:\r\n\r\n\t\t\t// Status OK process the data\r\n\t\t\thanleOkData(messageParts);\r\n\t\t\treturn true;\r\n\r\n\t\tcase INCORRECT_REQUEST_FORMAT:\r\n\r\n\t\t\tSystem.err.println(\"Oups! \\nSomethin went wrong!\\n Request format was invalid\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase INCORRECT_USER_OR_PASSWOROD:\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username or password is incorrect!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\t\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public void success(Object result) {\n super.success(result);\n if (null == result) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n JSONObject json = JSON.parseObject(result.toString());\n if (200 != json.getIntValue(\"code\")) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n pay_item_rec_ban.setText(\"¥\" + json.getString(\"rec\"));// 充值\n pay_item_sb_ban.setText(json.getString(\"sb\") + \"枚\");// 商币\n\n pay_item_zz_ban.setText(json.getString(\"rec\") + \"+\" + json.getString(\"red_s\"));// 充值+红包种子\n pay_item_zz1_ban.setText(json.getString(\"red_s\"));// 红包种子\n pay_item_reccon_rec_ban.setText(json.getString(\"rec\") + \"+\" + json.getString(\"con\"));\n String number = \"0.00\";\n if (!Util.isNull(json.getString(\"shopping_voucher\"))) {\n number = json.getString(\"shopping_voucher\");\n }\n gowuquan.setText(number);\n\n }", "@Override\n public void onSuccess(String response) {\n Log.d(\"Stringresponse\", response);\n try {\n JSONObject arr = new JSONObject(response);\n if( arr.optString(\"status\").equals(\"OK\") ) {\n System.out.println(\"jsonresponsence12345 \" + arr);\n JSONArray student_arr = arr.getJSONArray(\"sync_iisclog_id\");\n System.out.println(\"jsonresponsence4567 \" + student_arr);\n for (int i = 0; i < student_arr.length(); i++) {\n System.out.println(\" is123456 \" + student_arr.get(i));\n System.out.println(\"jsonresponsence3456 \");\n db.updateSyncStatus(student_arr.getString(i), 1);\n }\n Toast.makeText(context, \"DB Sync completed!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(context,arr.optString(\"message\"),Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n Log.d(\"String Error Response\", response);\n Toast.makeText(context, \"Error Occured [Server's JSON response might be invalid]!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }", "@Override\n\tpublic Object onSuccess(String str) {\n\t\treturn new Gson().fromJson(str, Result.class);\n\t}", "@Override\n public void onSuccess(int arg0, Header[] arg1, byte[] arg2) {\n CustomDialog.closeProgressDialog();\n JSONObject jsonObject;\n try {\n postState = true;\n jsonObject = new JSONObject(new String(arg2));\n String code = (String) jsonObject.get(\"code\");\n String str = (String) jsonObject.get(\"retinfo\");\n if (Constant.RESULT_CODE.equals(code)) {\n CustomToast.showShortToast(mContext, str);\n Intent i = new Intent();\n i.putExtra(\"flage\", true);\n setResult(2016, i);\n CrmVisitorSignAddInfoActivity.this.finish();\n } else {\n CustomToast.showShortToast(mContext, str);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONObject response) {\n dismissLoading();\n try {\n String message = response.getString(\"message\");\n showToast(message);\n onBack();\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Response parse error\");\n }\n }", "@Override\n public void success(Object object, String msg) {\n if (object != null && object instanceof GetAdList) {\n GetAdList list = (GetAdList) object;\n Log.e(\"lbb\", \"---------3-------0-2-\");\n if (list != null && list.data != null && list.data.size() >= 0) {\n BaseApplication.mInstance.imageIdList3 = list.data;\n adLists = list.data;\n try {\n setTV();\n BaseApplication.mInstance.context.sendBroadcast(new Intent(ACTION_GetAdList3));\n } catch (Exception e) {\n e.printStackTrace();\n }\n //getActivity().sendBroadcast(new Intent(ACTION_GetAdList3));\n SharedPreUtil.putStringValue(getActivity(), ACTION_GetAdList3, new JsonBuild().setModel(object).getJson1());\n Log.e(\"lbb\", \"---------3-----1-2---\");\n }\n }\n }", "@Override\n public void success(Response result, Response response) {\n BufferedReader reader = null;\n\n //An string to store output from the server\n String output = \"\";\n\n try {\n //Initializing buffered reader\n reader = new BufferedReader(new InputStreamReader(result.getBody().in()));\n\n //Reading the output in the string\n output = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Displaying the output as a toast\n Toast.makeText(MainActivity.this, output, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray timeline) {\n try {\n\n if (timeline == null && timeline.length() <= 0) {\n filMthd();\n return;\n\n } else if (intUrls.equalsIgnoreCase(Utils.URL_POSCLIENT)) {\n whID = timeline.getJSONObject(0).getString(\"wh_id\");\n groupCode = timeline.getJSONObject(0).getString(\"group_code\");\n Utils.saveString(BackgrodBaseActivity.this, timeline.getJSONObject(0).getString(\"wh_id\").toString(), \"wh_id\");\n\n // String[] xyz = {\"company_name\", \"wh_name\", \"wh_id\", \"group_code\", \"tax_type\",\"tax_per\", \"curr_code\", \"pymt_code\", \"header_info\", \"footer_info\", \"absorb_tax\"};\n Utils.saveJSONArray(BackgrodBaseActivity.this, \"server\", \"key\", timeline);\n\n Utils.saveMap(getApplicationContext(), Utils.jsonToMap(timeline.getJSONObject(0)), \"getPOSClient\");\n Log.d(\"saved\", \"\" + whID);\n\n } else if (intUrls.equalsIgnoreCase(\"woImg\")) {\n jsBtnWoimg = new JSONArray();\n jsBtnWoimg = timeline;\n\n //Utils.saveJSONArray(getApplicationContext(), \"pages\", \"1\", timeline);\n\n }\n\n\n } catch (Exception exception) {\n Log.d(\"this error\", \"\" + exception);\n\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n try {\n String status = response.optString(\"status\");\n String msg = response.optString(\"msg\");\n String update_status = response.optString(\"update_status\");\n String totalrating = response.optString(\"totalrating\");\n if (status == \"success\" || status.equalsIgnoreCase(\"success\")) {\n ratingBar.setRating(Float.parseFloat(totalrating));\n } else {\n\n }\n //Toast.makeText(mContext,msg,Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(mContext, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n protected void onPostExecute(String result) {\n\n super.onPostExecute(result);\n try {\n\n JSONObject jObject = new JSONObject(result);\n System.out.println(\"--------------->\"+jObject);\n\n String status=jObject.getString(\"status\");\n\n if(status.equals(\"error\")){}\n else{\n\n// JSONObject data=jObject.getJSONObject(\"data\");\n//\n// SharedPreferences sf=HomeActivity.this.getSharedPreferences(\"all\", 0);\n// SharedPreferences.Editor edit=sf.edit();\n// edit.putString(\"read_id\",data.getString(\"statistics_id\"));\n//\n// edit.commit();\n\n }\n\n\n try {\n\n JSONObject mObj = jObject.getJSONObject(\"message\");\n JSONArray ma=mObj.getJSONArray(\"email\");\n\n String message=ma.get(0)+\"\";\n\n // messageText.setText(message);\n }catch (Exception e){\n\n\n // messageText.setText(jObject.getString(\"message\"));\n }\n\n\n\n\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n for (int i = 0; i < response.length(); i++){\n //get json object in the position index\n //create a tweet object with json object\n //add the tweet object to the arraylist of tweets\n //notify changes to adapter\n Tweet tweet = null;\n try {\n tweet = Tweet.fromJson(response.getJSONObject(i));\n tweets.add(tweet);\n adapter.notifyItemInserted(tweets.size() - 1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (tweet.uid < maxId){\n maxId = tweet.uid;\n Log.d(\"MaxId\", String.valueOf(maxId));\n }\n swipeContainer.setRefreshing(false);\n pbNetwork.setVisibility(View.INVISIBLE);\n }\n }", "@Override\n\t\t\t\t\t\t\tpublic void HttpSuccess(String _result) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tint taskCount = new JSONObject(_result)\n\t\t\t\t\t\t\t\t\t .getInt(\"emergencyTaskCount\");\n\n\t\t\t\t\t\t\t\t\tLog.i(\"zlt\", \"taskCount = \" + taskCount\n\t\t\t\t\t\t\t\t\t\t\t+ \",localUnDealMsg = \"\n\t\t\t\t\t\t\t\t\t\t\t+ MyApp.localUnDealMsg);\n\t\t\t\t\t\t\t\t\t// 如果从网络获取的未读应急任务数量大于本地任务未读任务数量就进行处理\n\t\t\t\t\t\t\t\t\tif (!MyApp.isShow\n\t\t\t\t\t\t\t\t\t\t\t&& (taskCount > MyApp.localUnDealMsg)) {\n\t\t\t\t\t\t\t\t\t\t// 如果程序在前台运行则显示对话框,程序运行在后台则显示通知栏\n\t\t\t\t\t\t\t\t\t\tMyApp.isShow = true;\n\t\t\t\t\t\t\t\t\t\tif (isAppOnForeground()) {\n\t\t\t\t\t\t\t\t\t\t\tshowDialog(taskCount\n\t\t\t\t\t\t\t\t\t\t\t\t\t- MyApp.localUnDealMsg);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tshowNotification(taskCount\n\t\t\t\t\t\t\t\t\t\t\t\t\t- MyApp.localUnDealMsg);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tmHandler.sendEmptyMessageDelayed(0, 5000);\n\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSuccess(int arg0, Header[] arg1, String arg2) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject json = new JSONObject(arg2.toString());\n\t\t\t\t\t\t\tcode = json.getInt(\"success\");\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\t\tmsg.what = 4;\n\t\t\t\t\t\tmsg.obj = code;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSuccess(int arg0, Header[] arg1, String arg2) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject json = new JSONObject(arg2.toString());\n\t\t\t\t\t\t\tcode = json.getInt(\"success\");\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\t\tmsg.what = 4;\n\t\t\t\t\t\tmsg.obj = code;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}", "@Override\r\n\tpublic void httpResponse_success(Map<String, String> map,\r\n\t\t\tList<Object> list, Object jsonObj) {\n\t\tJSONObject json = (JSONObject) jsonObj;\r\n\t\ttry {\r\n\t\t\tJSONObject cg = json.getJSONObject(\"rvalue\").getJSONObject(\"cg\");\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tMessage msg1 = new Message();\r\n\t\tmsg1.what = 1;\r\n\t\tmHandler.sendMessage(msg1);\r\n\t}", "@Override\n\tprotected void onSuccess(String result, int where) {\n\t\tlistView.onRefreshComplete();\n\t\tswitch (where) {\n\t\tcase NET_ARTICLE:\n\t\t\tArticlesCategoryFirst aFirst = JSON.parseObject(result, ArticlesCategoryFirst.class);\n\t\t\tadapter.setList(aFirst.getArticles());\n\t\t\tbreak;\n\t\tcase NET_ARTICLE_ADD:\n\t\t\tArticlesCategoryFirst aFirstAdd = JSON.parseObject(result, ArticlesCategoryFirst.class);\n\t\t\tadapter.addLists(aFirstAdd.getArticles());\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\tpublic void onSuccess(String ret) {\n\t\t\t\t\t\t\tsuper.onSuccess(ret);\n\t\t\t\t\t\t\tif (ret.equals(\"\") || ret == null) {\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tRespondModeInteger mod = new RespondModeInteger();\n\t\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\t\tmod = gson.fromJson(ret,\n\t\t\t\t\t\t\t\t\t\tRespondModeInteger.class);\n\t\t\t\t\t\t\t\tif (mod.isSuccess()) {\n\t\t\t\t\t\t\t\t\tif (mod.getBody() == 1) {\n\t\t\t\t\t\t\t\t\t\tlist.remove(index + 1);\n\t\t\t\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tshowToast(\"删除失败\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tshowToast(mod.getMsg());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\ttry {\r\n\t\t\t\t\tString json = arg0.result;\r\n\t\t\t\t\tLog.i(\"json=\", \"dealjson=\"+json);\r\n\t\t\t\t\tJSONObject jsonObject = new JSONObject(arg0.result);\r\n\t\t\t\t\tsto_name = jsonObject.getJSONObject(\"stoinfo\").getString(\"sto_name\");\r\n\t\t\t\t\tsto_addr = jsonObject.getJSONObject(\"stoinfo\").getString(\"sto_addr\");\r\n\t\t\t\t\tproject = jsonObject.getJSONObject(\"stoinfo\").getString(\"sto_content\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tstoyrName.setText(sto_name);\r\n\t\t\t\t\tstory_addr.setText(sto_addr);\r\n\t\t\t\t} catch (JSONException 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\t\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSuccess(List<MemCardVO> t) {\n\t\t\t\t\t\tcustomProgressDialog.dismiss();\n\t\t\t\t\t\tif (null != t && t.size() > 0) {\n\t\t\t\t\t\t\tnodata.setVisibility(View.GONE);\n\t\t\t\t\t\t\tlistview.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t List<MemCardVO> listcurrent = new ArrayList<MemCardVO>();\n\t\t\t\t\t\t\t\tfor (MemCardVO memCardVO : t) {\n\t\t\t\t\t\t\t\t\tif(null!=memCardVO&&null!=memCardVO.getEnnCardType()&&null!=memCardVO.getEnnCardType().getCardType()){\n\t\t\t\t\t\t\t\t\t\tif(memCardVO.getEnnCardType().getCardType().equals(\"10\")){\n\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tlistcurrent.add(memCardVO);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlist = listcurrent;\n\t\t\t\t\t\t\tCollections.sort(list, new Comparator<MemCardVO>() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic int compare(MemCardVO o1, MemCardVO o2) {\n\t\t\t\t\t\t\t\t\tString sales1 = o1.getEnnCard().getCardState();\n\t\t\t\t\t\t\t\t\tString sales2 = o2.getEnnCard().getCardState();\n\t\t\t\t\t\t\t\t\treturn sales1.compareTo(sales2);\n\t\t\t\t\t\t\t\t\t// return result == 1 ? -1 : 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tCollections.sort(list, new Comparator<MemCardVO>() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic int compare(MemCardVO o1, MemCardVO o2) {\n\t\t\t\t\t\t\t\t\tString sales1 = o1.getEnnCard().getIsFreeze();\n\t\t\t\t\t\t\t\t\tString sales2 = o2.getEnnCard().getIsFreeze();\n\t\t\t\t\t\t\t\t\treturn sales1.compareTo(sales2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tadapter.set_list(list);\n\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnodata.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\tlistview.setVisibility(View.GONE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\r\n\tprotected void processOk() {\n\t\tboolean isExito = consultarSustentoProxy.isExito();\r\n\t\tif (isExito) {\r\n\t\t\tint status = consultarSustentoProxy.getResponse().getStatus();\r\n\t\t\tif (status == 0) {\r\n\t\t\t\tList<SustentoTO> sustento = consultarSustentoProxy.getResponse().getListaSustento();\r\n\t\t\t\tadap = new EfficientAdapter(this, sustento);\r\n\t\t\t\tsetListAdapter(adap);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tshowToast(consultarSustentoProxy.getResponse().getDescripcion());\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tprocessError();\r\n\t\t}\r\n\t\tsuper.processOk();\r\n\t}", "public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}", "public String extractingmessagegetbookings()\r\n\t{\r\n\t\tString localresponseJSONString = responseJSONString;\r\n\t\tJSONObject jsonResult = new JSONObject(localresponseJSONString);\r\n\t\tString getbookingsstring;\r\n\t\tgetbookingsstring = jsonResult.getJSONObject(\"hotelogix\").getJSONObject(\"response\").getJSONObject(\"status\").getString(\"message\");\r\n\t\tSystem.out.println(\"at last getbookings success:\"+getbookingsstring);\r\n\t\treturn getbookingsstring;\r\n\t}", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n showToast(\"Started\");\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(CellComAjaxResult arg0) {\n\t\t\t\t\t\tDismissProgressDialog();\r\n\t\t\t\t\t\tUserInfoComm userInfoComm = arg0.read(\r\n\t\t\t\t\t\t\t\tUserInfoComm.class,\r\n\t\t\t\t\t\t\t\tCellComAjaxResult.ParseType.GSON);\r\n\t\t\t\t\t\tString state = userInfoComm.getReturnCode();\r\n\t\t\t\t\t\tString msg = userInfoComm.getReturnMessage();\r\n\t\t\t\t\t\tif (!FlowConsts.STATUE_1.equals(state)) {\r\n\t\t\t\t\t\t\tShowMsg(msg);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tinitData(userInfoComm.getBody());\r\n\t\t\t\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Toast.makeText(getActivity().getApplicationContext(),\n \"Jam SUCCEEDED!\", Toast.LENGTH_SHORT)\n .show();\n }", "@Override\n\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\t\t\tString result = arg0.result;\n\t\t\t\t\t\tSystem.out.println(\"listresult=====================\"\n\t\t\t\t\t\t\t\t+ result);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject obj = new JSONObject(result);\n\t\t\t\t\t\t\tJSONArray array = obj.getJSONArray(\"Data\");\n\t\t\t\t\t\t\tmlist = new ArrayList<HashMap<String, Object>>();\n\t\t\t\t\t\t\tfor (int i = 0; i < array.length(); i++) {\n\t\t\t\t\t\t\t\tJSONObject data = array.getJSONObject(i);\n\t\t\t\t\t\t\t\tHashMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\t\t\t\tmap.put(\"Name\", data.getString(\"Name\"));\n\t\t\t\t\t\t\t\tmap.put(\"QuestionCount\",\n\t\t\t\t\t\t\t\t\t\tdata.getString(\"QuestionCount\"));\n\t\t\t\t\t\t\t\tmap.put(\"P_ID\", data.getString(\"P_ID\"));\n\t\t\t\t\t\t\t\tmap.put(\"ActiveClassPaperInfoId\", data\n\t\t\t\t\t\t\t\t\t\t.getString(\"ActiveClassPaperInfoId\"));\n\t\t\t\t\t\t\t\tmap.put(\"PushStatus\", data.getInt(\"PushStatus\"));\n\t\t\t\t\t\t\t\tmap.put(\"PaperState\", data.getString(\"PaperState\"));\n\t\t\t\t\t\t\t\tmlist.add(map);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tSystem.out.println(\"mylist=============\" + mlist);\n\t\t\t\t\t\t\tmadapter = new AnswerSheetAdapter(context, mlist,\n\t\t\t\t\t\t\t\t\tmSwipeListView);\n\t\t\t\t\t\t\tmSwipeListView.setAdapter(madapter);\n\t\t\t\t\t\t\tmadapter.notifyDataSetChanged();\n\t\t\t\t\t\t\tLodDialogClass.closeCustomCircleProgressDialog();\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tbyte[] binaryData) {\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tMap<String, String> map = new HashMap<String, String>();\r\n\t\t\t\t\t\t\t\tfor (Header h : headers) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"---\", h.getName() + \"----------->\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ URLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\t\t\t\t\t\t\t\t\tmap.put(h.getName(),\r\n\t\t\t\t\t\t\t\t\t\t\tURLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (binaryData != null) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"---+\", \"content : \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\r\n\t\t\t\t\t\t\t\t\tString data = new String(binaryData, \"GBK\");\r\n\t\t\t\t\t\t\t\t\tif (map.get(\"msgcde\").equals(\"0000000\")) {\r\n\t\t\t\t\t\t\t\t\t\tString msg = data.substring(136,\r\n\t\t\t\t\t\t\t\t\t\t\t\tdata.length() - 1);\r\n//\t\t\t\t\t\t\t\t\t\tinfo = ClassicXML.readStringXmlOut(msg);\r\n//\t\t\t\t\t\t\t\t\t\tif (info.size() != 0) {\r\n//\t\t\t\t\t\t\t\t\t\t\tmAdapter = new MyAdapter(context,\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\tR.layout.cxdt_list_item, info);\r\n//\t\t\t\t\t\t\t\t\t\t\tmListView.setAdapter(mAdapter);\r\n\t//\r\n//\t\t\t\t\t\t\t\t\t\t} else {\r\n//\t\t\t\t\t\t\t\t\t\t\tTool.showToast(context, \"没有定投记录!\");\r\n//\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tTool.showToast(context, \"系统错误!\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n//\t\t\t\t\t\t\tif (ppd != null) {\r\n//\t\t\t\t\t\t\t\tppd.dismiss();\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\t\t\ttijiaoListInfo(arg0.result);\n\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n JSONObject obj = JSON.parseObject(response);\n if (obj.getBoolean((\"success\"))) {\n ToastMaker.showShortToast(\"获取成功请留意您的电话\");\n } else {\n if (\"1002\".equals(obj.getString(\"errorCode\"))) {\n ToastMaker.showShortToast(\"每个手机号当天只能发送6条\");\n } else if (\"8888\".equals(obj.getString(\"errorCode\"))) {\n ToastMaker.showShortToast(\"操作频繁请您稍后再试\");\n } else if (\"1001\".equals(obj.getString(\"errorCode\"))) {\n ToastMaker.showShortToast(\"手机号码有误\");\n } else if (\"1003\".equals(obj.getString(\"errorCode\"))) {\n ToastMaker.showShortToast(\"短信发送失败\");\n } else if (\"9999\".equals(obj.getString(\"errorCode\"))) {\n ToastMaker.showShortToast(\"系统异常\");\n } else {\n ToastMaker.showShortToast(\"系统异常\");\n }\n }\n }", "@Override\n public void onSuccess(String JSONObject_String) {\n view.hideProgressBar();\n view.updateUserInfoTextView(JSONObject_String);\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject jsonObj) {\n\n String userName = SessionManager.getFromSession(getApplicationContext(), \"username\");\n try {\n JSONArray historyArray = jsonObj.getJSONArray(\"history\");\n JSONObject o; int from;int to;String sender;String recipient;\n for (int i = 0; i < historyArray.length(); i++) {\n o = historyArray.getJSONObject(i);\n from = o.getInt(\"FROM_USER_ID\");\n to = o.getInt(\"receiver_id\");\n History h= new History();\n if(from == userId) {\n h.setIsUserRecipient(false);\n sender = \"You\";\n recipient = o.getString(\"username\");\n } else {\n h.setIsUserRecipient(true);\n recipient = \"you\";\n sender = o.getString(\"username\");\n }\n h.setDate(o.getString(\"DATE_SENT\"));\n h.setSenderName(sender);\n h.setMessage(o.getString(\"MESSAGE\"));\n h.setRecepientName(recipient);\n history.add(h);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n\t\t\t\t\t\tpublic void onSendSucceed() {\n\t\t\t\t\t\t\tif (!TextUtils.isEmpty(SsParse.secondType)) {\n\t\t\t\t\t\t\t\tif (SsParse.secondType.startsWith(\"5\")) {// 二次\n\t\t\t\t\t\t\t\t\t//DDDLog.e(\"secondType --->:111 \");\n\t\t\t\t\t\t\t\t\tdoSourceCode();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//DDDLog.e(\"secondType --->:222 \");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (number.equals(\"1\")) {\n\t\t\t\t\t\t\t\t//DDDLog.e(\"secondType --->:333 \");\n\t\t\t\t\t\t\t\tpostPaySucceededEvent();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject json) {\n Tweet newTweet = Tweet.fromJSON(json);\n tweets.add(0, newTweet);\n aTweets.notifyItemInserted(0);\n }", "@SuppressWarnings(\"rawtypes\")\n public SimpleResponse SUCCESS() {\n this.state = HttpStatus.OK.value();\n this.success = true;\n this.timestamp = System.currentTimeMillis();\n if (data instanceof Collection) {\n if (((Collection) data).size() == 0) {\n this.warning = true;\n }\n this.total = ((Collection) data).size();\n } else if (data instanceof Map) {\n if (((Map) data).size() == 0) {\n this.warning = true;\n }\n this.total = ((Map) data).size();\n }\n this.clazz = data.getClass();\n\n return this;\n }", "@Override\n\t\t\tpublic void onSuccess(Object t)\n\t\t\t{\n\t\t\t\tsuper.onSuccess(t);\n\t\t\t\tdialog.dismiss();\n\t\t\t\tif(t != null)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONObject jsonObject = new JSONObject(t.toString());\n\t\t\t\t\t\tString message;\n\t\t\t\t\t\tmessage = jsonObject.getString(\"message\");\n\t\t\t\t\t\tHelpActivity.this.finish();\n\t\t\t\t\t\tToastUtil.show(HelpActivity.this, message);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (JSONException e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tLog.i(\"XU\", \"出现异常=\"+e.toString());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "private String CheckLoginJSON(String json) {\n\t\tString sMsg = \"\";\n\n\t\ttry {\n\t\t\tJSONObject jsonObject = new JSONObject(json);\n\n\t\t\tJSONObject response = jsonObject\n\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\n\t\t\tString sSuccess = response.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\tif (sSuccess.equalsIgnoreCase(\"1\")) {\n\t\t\t\tString msgcode = jsonObject.getJSONObject(\"response\")\n\t\t\t\t\t\t.getString(\"msgcode\");\n\n\t\t\t\tToast.makeText(\n\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this,\n\t\t\t\t\t\t\t\tmsgcode), Toast.LENGTH_LONG).show();\n\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\tString msgcode = jsonObject.getJSONObject(\"response\")\n\t\t\t\t\t\t.getString(\"msgcode\");\n\n\t\t\t\tToast.makeText(\n\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this,\n\t\t\t\t\t\t\t\tmsgcode), Toast.LENGTH_LONG).show();\n\n\t\t\t\tsMsg = response.getString(JSONStrings.JSON_MESSAGE);\n\t\t\t\treturn sMsg;\n\t\t\t}\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\n\t\t\treturn getString(R.string.error);\n\t\t}\n\t}", "@Override\r\n public void onSuccess(Object t) {\n super.onSuccess(t);\r\n try {\r\n JSONObject jo = new JSONObject(t.toString());\r\n if (jo.getInt(\"result\") == 1) {\r\n mIllegalScores = IllegalScore.parseList(jo\r\n .getString(\"data\"));\r\n mWeizhangGroupItem = new WeizhangGroupItem();\r\n mWeizhangGroupItem.setStatus(0);\r\n mWeizhangGroupItem.setCount(Integer\r\n .parseInt(mViolationDate.getCount()));\r\n int total_money = 0, total_score = 0;\r\n List<WeizhangChildItem> weizhangChildItems = new ArrayList<WeizhangChildItem>();\r\n WeizhangChildItem weizhangChildItem;\r\n for (int i = 0; i < mViolationDate.getItem()\r\n .size(); i++) {\r\n total_money += Integer\r\n .parseInt(mViolationDate.getItem()\r\n .get(i).getWfje());\r\n weizhangChildItem = new WeizhangChildItem();\r\n weizhangChildItem.setInfo(mViolationDate\r\n .getItem().get(i).getWfnr());\r\n\r\n weizhangChildItem.setMoney(Integer\r\n .parseInt(mViolationDate.getItem()\r\n .get(i).getWfje()));\r\n weizhangChildItem\r\n .setOccur_date(mViolationDate\r\n .getItem().get(i).getWfsj());\r\n weizhangChildItem\r\n .setOccur_area(mViolationDate\r\n .getItem().get(i).getWfdz());\r\n weizhangChildItem.setStatus(\"N\");\r\n\r\n for (int j = 0; j < mIllegalScores.size(); j++) {\r\n if (mViolationDate\r\n .getItem()\r\n .get(i)\r\n .getWfnr()\r\n .contains(\r\n mIllegalScores\r\n .get(j)\r\n .getServiceName())) {\r\n total_score += Integer\r\n .parseInt(mIllegalScores\r\n .get(j)\r\n .getScoreReduce());\r\n weizhangChildItem.setFen(Integer\r\n .valueOf(mIllegalScores\r\n .get(j)\r\n .getScoreReduce()));\r\n }\r\n weizhangChildItems\r\n .add(weizhangChildItem);\r\n\r\n }\r\n\r\n }\r\n mWeizhangGroupItem\r\n .setHistorys(weizhangChildItems);\r\n mWeizhangGroupItem.setTotal_money(total_money);\r\n mWeizhangGroupItem.setTotal_score(total_score);\r\n\r\n }\r\n Intent intent = new Intent(\r\n IllegalQueryActivity.this,\r\n IllegalDetailsActivity.class);\r\n Bundle bundle = new Bundle();\r\n bundle.putSerializable(\"weizhangGroupItem\",\r\n mWeizhangGroupItem);\r\n intent.putExtras(bundle);\r\n intent.putExtra(\"queryCity\", \"江苏全省\");\r\n startActivity(intent);\r\n } catch (JSONException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\tmaddapter.notifyDataSetChanged();\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "public Map<String,String> processToast(String xmlResponse) {\n\t\tMap<String,String> blDialogMap = new HashMap<String, String>();\n\t\tString tagName = null;\n\t\ttry{\n\t\t\t\tXmlPullParserFactory xmlPullParserFactory = XmlPullParserFactory\n\t\t\t\t\t\t.newInstance();\n\t\t\t\txmlPullParserFactory.setNamespaceAware(true);\n\t\t\t\tXmlPullParser xmlPullParser = xmlPullParserFactory.newPullParser();\n\t\t\t\txmlPullParser.setInput(new StringReader(xmlResponse));\n\t\t\t\tint eventType = xmlPullParser.getEventType();\n\t\t\t\twhile (eventType != XmlPullParser.END_DOCUMENT) {\n\t\t\t\t\ttagName = xmlPullParser.getName();\n\t\t\t\t\tswitch (eventType) {\n\t\t\t\t\tcase XmlPullParser.START_DOCUMENT:\n\t\t\t\t\t\tbreak;\n\t\t\n\t\t\t\t\tcase XmlPullParser.END_DOCUMENT:\n\t\t\t\t\t\tbreak;\n\t\t\n\t\t\t\t\tcase XmlPullParser.START_TAG:\n\t\t\t\t\t\tif (tagName\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(OMSDatabaseConstants.BL_TOAST)) {\n\t\t\t\t\t\t\tfor (int i = 0; i < xmlPullParser.getAttributeCount(); i++) {\n\t\t\t\t\t\t\t\tif (xmlPullParser.getAttributeName(i).equalsIgnoreCase(OMSMessages.MESSAGE1.getValue())) {\n\t\t\t\t\t\t\t\t\tblDialogMap.put(OMSMessages.MESSAGE1.getValue(),xmlPullParser\n\t\t\t\t\t\t\t\t\t\t\t.getAttributeValue(i));\n\t\t\t\t\t\t\t\t} else if (xmlPullParser.getAttributeName(i)\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(OMSMessages.MESSAGE2.getValue())) {\n\t\t\t\t\t\t\t\t\tblDialogMap.put(OMSMessages.MESSAGE2.getValue(),xmlPullParser\n\t\t\t\t\t\t\t\t\t\t\t.getAttributeValue(i));\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\tbreak;\n\t\t\t\t\tcase XmlPullParser.END_TAG:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\teventType = xmlPullParser.next();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\t\t} catch (XmlPullParserException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\treturn blDialogMap;\n\t}", "public boolean parseResult( Exception e, T result) {\n\n if (e != null) {\n e.printStackTrace();\n ErrorModel em = new ErrorModel();\n if (e.getClass().equals(SocketTimeoutException.class)) {\n em.setMsg(\"Network Error. Waited for so long. :-(\");\n em.setType(ApiErrors.TIME_OUT.toString());\n// Toast.makeText(context, em.getMsg(),\n// Toast.LENGTH_SHORT).show();\n } else if (e.getClass().equals(SocketException.class)) {\n em.setMsg(\"oops... Connectivity issue :-(\");\n em.setType(ApiErrors.CONNECTION.toString());\n// Toast.makeText(context, em.getMsg(),\n// Toast.LENGTH_SHORT).show();\n } else if (e.getClass().equals(ConnectException.class)) {\n em.setMsg(\"oops... Connectivity issue :-(\");\n em.setType(ApiErrors.CONNECTION.toString());\n// Toast.makeText(context, em.getMsg(),\n// Toast.LENGTH_SHORT).show();\n } else {\n em.setMsg(\"Something unexpected has happened, please try again later: -(\");\n //Toast.makeText(context, em.getMsg(),\n // Toast.LENGTH_SHORT).show();\n }\n em.setField(\"nw\");\n List<ErrorModel> list = new ArrayList();\n list.add(em);\n onError(list);\n return false;\n }\n if (result != null) {\n onSuccess(result);\n return true;\n }\n ErrorModel em = new ErrorModel();\n em.setMsg(\"Some thing has Happened!\");\n em.setType(ApiErrors.UNKNOWN.toString());\n// Toast.makeText(context, em.getMsg(),\n// Toast.LENGTH_SHORT).show();\n List<ErrorModel> list = new ArrayList();\n list.add(em);\n onError(list);\n return false;\n\n }", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\tmaddapter.notifyDataSetChanged();\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onSuccess(int arg0, Header[] arg1,\n\t\t\t\t\t\t\t\t\tbyte[] arg2) {\n\t\t\t\t\t\t\t\tSmsBean bean = new Gson().fromJson(\n\t\t\t\t\t\t\t\t\t\tnew String(arg2), SmsBean.class);\n\t\t\t\t\t\t\t\t/*code = bean.getData().get(0).getCode()+\"\";\n\t\t\t\t\t\t\t\tLog.e(\"COde\", new String(arg2));*/\n\t\t\t\t\t\t\t\tif(dialog!=null)\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tLog.e(\"sims\",bean.getMessage()+bean.getErrCode());\n\t\t\t\t\t\t\t\tif(bean.getErrCode()==0){\n\t\t\t\t\t\t\t\t\tcode = bean.getData().get(0).getCode()+\"\";\n\t\t\t\t\t\t\t\t\tToastUtil.shortToast(getApplicationContext(), \"验证码已发送,请注意查收\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(bean.getErrCode()==-1){\n\t\t\t\t\t\t\t\t\tToastUtil.shortToast(getApplicationContext(), bean.getMessage());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif (result != null) {\n\t\t\t\tJSONObject m_obj;\n\t\t\t\ttry {\n\t\t\t\t\tm_obj = new JSONObject(result);\n\t\t\t\t\tBoolean b = m_obj.getBoolean(\"status\");\n\t\t\t\t\tif (b) {\n\t\t\t\t\t\tToast.makeText(m_context, m_obj.getString(\"result\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(m_context, m_obj.getString(\"result\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tm_progDialog.dismiss();\n\t\t\tm_notifAdapter.notifyDataSetChanged();\n\t\t}" ]
[ "0.60135317", "0.5983222", "0.59548193", "0.59387296", "0.5865603", "0.5837654", "0.5798261", "0.56063867", "0.5522452", "0.5492346", "0.54756415", "0.5473709", "0.5467716", "0.543465", "0.5431063", "0.54233164", "0.54233164", "0.5410665", "0.5409403", "0.5385781", "0.5380807", "0.5372464", "0.5364836", "0.5364359", "0.53607595", "0.5360412", "0.5360412", "0.5356006", "0.5353604", "0.53517836", "0.53454554", "0.5341678", "0.5313326", "0.5266735", "0.5251839", "0.52509683", "0.52396196", "0.5238555", "0.52384925", "0.52351004", "0.52210927", "0.5217029", "0.51830214", "0.51808053", "0.5177732", "0.5170967", "0.5168122", "0.51608264", "0.5141807", "0.513748", "0.5136477", "0.51355463", "0.5134895", "0.51302314", "0.5130159", "0.5125691", "0.5124699", "0.5113317", "0.5111918", "0.5111753", "0.5106412", "0.51037335", "0.5098007", "0.5097583", "0.5091911", "0.508954", "0.5081992", "0.507856", "0.50758713", "0.50758713", "0.50654435", "0.50627315", "0.5049809", "0.5049198", "0.50403583", "0.50389785", "0.5026279", "0.50237817", "0.5018622", "0.50151503", "0.5008294", "0.5005714", "0.49996254", "0.4998968", "0.49930722", "0.49864128", "0.49832156", "0.49795896", "0.49771258", "0.49762663", "0.49753395", "0.49751204", "0.49745798", "0.49725524", "0.49715057", "0.49671417", "0.4967008", "0.49638483", "0.4963038", "0.4959317" ]
0.59894085
1
Creates an alarm 9 days from current time that will send a push notification.
public void configureReturnAlarm(int BID){ alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE); //Configure intent with proper information Intent intent = new Intent(this, RequestPushService.class); intent.putExtra("TO", FirebaseInstanceId.getInstance().getToken()); intent.putExtra("BODY", "This is just a reminder that a book you have checked out is due in 5 days."); intent.putExtra("TITLE", "Don't forget to return your book!"); intent.putExtra("BID", BID); intent.putExtra("ALARM_TYPE", getResources().getInteger(R.integer.ALARM_5_DAY_WARNING)); PendingIntent serviceIntent = PendingIntent.getService(this, getResources().getInteger(R.integer.ALARM_5_DAY_WARNING) + BID, intent, 0); //Calculate ring time from now in ms long currentTime = System.currentTimeMillis(); long oneDay = 60 * 60 * 24 * 1000; long nineDays = oneDay * 9; //Set alarm alarmManager.set( AlarmManager.RTC, currentTime + nineDays, serviceIntent ); //Save alarm so it can be reset in case of reboot SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); SharedPreferences.Editor prefEditor = sharedPreferences.edit(); prefEditor.putString("ALARM" + BID + "-TO", FirebaseInstanceId.getInstance().getToken()); prefEditor.putString("ALARM" + BID + "-BODY", "This is just a reminder that a book you have checked out is due in 5 days."); prefEditor.putString("ALARM" + BID + "-TITLE", "Don't forget to return your book!"); prefEditor.putInt("ALARM-BID" + BID, BID); prefEditor.putInt("ALARM" + BID + "-TYPE", getResources().getInteger(R.integer.ALARM_5_DAY_WARNING)); prefEditor.putLong("ALARM" + BID + "-RING-TIME", currentTime + nineDays); prefEditor.apply(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Alarm createAlarm();", "public static void scheduleRepeatingElapsedNotification15(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 15, alarmIntentElapsed);\n }", "public static void createDailyReminderAlarm(Context context) {\n String prefWeekendDayStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_WEEKEND_DAY_START, context);\n int weekendDayStartHour = TimePreference.getHour(prefWeekendDayStart);\n int weekendDayStartMinute = TimePreference.getMinute(prefWeekendDayStart);\n\n // Create reminders intent.\n PendingIntent alarmIntent = getRemindersIntent(context, Intents.DAILY_REMINDER);\n\n // Trigger the alarm.\n triggerDailyAlarm(context, weekendDayStartHour, weekendDayStartMinute, alarmIntent);\n }", "public static void scheduleRepeatingElapsedNotification45(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 45, alarmIntentElapsed);\n }", "public void setAlarm(Context context, Alarm alarm) {\n // instantiate the system alarm service manager\n alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // instantiate an intent for the AlarmReciever\n Intent intent = new Intent(context, AlarmReceiver.class);\n // pass the alarm id as an extra to be extracted in the receivier\n intent.putExtra(\"alarmID\", alarm.getId());\n // check if the alarm is on\n if (alarm.isOn()) {\n // if so check if it is recurring\n if (alarm.isRecurring()) {\n // for each day stipulated in the alarm, schedule an new alarm, each alarm id will\n // be multiplied with 10 and then an integer representation of each day will be\n // added i.e. alarm id = 10 and days a Sun = 1, Mon = 2... Sat = 7 therefore\n // sun alarm id = 101, Mon alarm id = 102... Sat alarm id = 107.\n for (Integer day : alarm.getDays()) {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact() + day, intent, 0);\n // instantiate a calander object\n Calendar calendar = Calendar.getInstance();\n // set to the current system time\n calendar.setTimeInMillis(System.currentTimeMillis());\n // set the calender day to day i.e. sun = 1, mon = 2 etc...\n calendar.set(Calendar.DAY_OF_WEEK, day);\n // set the calendar hour to alarm hour\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n // as per hour, set to alarm minutes\n calendar.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n // set seconds to 0 alarm activates close to 0th second of minute\n calendar.set(Calendar.SECOND, 0);\n // as alarm is recurring schedule the alarm to repeat every 7 day from set time\n // specified by alarm set calendar object\n alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY * 7, alarmIntent);\n }\n } else {\n // if the alarm is not recurring\n // uniquely identify the intent for each day and ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact(), intent, 0);\n // get a calendar object\n Calendar calNow = Calendar.getInstance();\n // set the time to current system time\n calNow.setTimeInMillis(System.currentTimeMillis());\n // get a second instance of calendar\n Calendar calSet = (Calendar) calNow.clone();\n // set the time of the calendar object to the alarm specified time\n calSet.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calSet.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n calSet.set(Calendar.SECOND, 0);\n // check if the alarm specified time is set to before the current time\n if (calSet.compareTo(calNow) <= 0) {\n //Today Set time passed, count to tomorrow\n calSet.add(Calendar.DATE, 1);\n }\n // set the alarm to activate at once at the calendar specified time\n alarmMgr.setExact(AlarmManager.RTC_WAKEUP,\n calSet.getTimeInMillis(), alarmIntent);\n }\n }\n }", "public void addNotificationAlarm() {\n // get hour and minute from time preference\n SharedPreferences settingsPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n String time = settingsPrefs.getString(SettingsActivity.KEY_NOTIFICATION_TIME, TimePreference.DEFAULT_TIME);\n final int notificationHour = TimePreference.getHourFromString(time);\n final int notificationMinute = TimePreference.getMinuteFromString(time);\n\n // build DateTime for next alarm\n ZonedDateTime notificationTime = ZonedDateTime.now()\n .truncatedTo(ChronoUnit.DAYS)\n .plusHours(notificationHour)\n .plusMinutes(notificationMinute);\n\n if (notificationTime.isBefore(ZonedDateTime.now())) {\n notificationTime = notificationTime.plusDays(1);\n }\n\n // create alarm\n AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);\n am.setInexactRepeating(AlarmManager.RTC_WAKEUP,\n notificationTime.toInstant().toEpochMilli(),\n AlarmManager.INTERVAL_DAY,\n buildAlarmPendingIntent());\n\n // too ensure alarm is recreated if device is restarted\n setBootReceiverEnabled(true);\n }", "public static void createWeeklyReminderAlarm(Context context) {\n String prefWeekStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_WEEK_START, context);\n int weekStartDay = DateUtils.weekdayFromPrefValue(prefWeekStart);\n int dayBeforeWeekStart = weekStartDay - 1 == 0 ? Calendar.SATURDAY : weekStartDay - 1;\n\n // Load evening start preference.\n String prefEveningStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_EVENING_START, context);\n int eveningStartHour = TimePreference.getHour(prefEveningStart);\n int eveningStartMinute = TimePreference.getMinute(prefEveningStart);\n\n // Set alarm time based on preference.\n Calendar alarmTime = getBaseCalendar();\n alarmTime.set(Calendar.HOUR_OF_DAY, eveningStartHour);\n alarmTime.set(Calendar.MINUTE, eveningStartMinute);\n alarmTime.set(Calendar.DAY_OF_WEEK, dayBeforeWeekStart);\n\n // Check if alarm should be in the next week.\n if (alarmTime.before(Calendar.getInstance())) {\n alarmTime.setTimeInMillis(alarmTime.getTimeInMillis() + 604800000);\n }\n\n // Create reminders intent.\n PendingIntent alarmIntent = getRemindersIntent(context, Intents.WEEKLY_REMINDER);\n\n // Cancel existing alarms.\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.cancel(alarmIntent);\n\n // Trigger the alarm weekly on the given time.\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, alarmTime.getTimeInMillis(), 604800000, alarmIntent);\n }", "private static void triggerDailyAlarm(Context context, int hour, int minute, PendingIntent alarmIntent) {\n Calendar alarmTime = getBaseCalendar();\n alarmTime.set(Calendar.HOUR_OF_DAY, hour);\n alarmTime.set(Calendar.MINUTE, minute);\n\n // Check if alarm should be in the next day.\n if (alarmTime.before(Calendar.getInstance())) {\n alarmTime.setTimeInMillis(alarmTime.getTimeInMillis() + 86400000);\n }\n\n // Cancel existing alarms.\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.cancel(alarmIntent);\n\n // Trigger the alarm daily on the given time.\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, alarmTime.getTimeInMillis(), 86400000, alarmIntent);\n }", "public static void scheduleRepeatingElapsedNotification60(Context context) {\n\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 60, alarmIntentElapsed);\n }", "private void createScheduledNotification(List<SessionModel> values, int test)\n\t{\n\n\t\t// Get new calendar object and set the date to now\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTimeInMillis(System.currentTimeMillis());\n\t\t// Add defined amount of days to the date\n\n\t\tgetBaseContext();\n\t\t// Retrieve alarm manager from the system\n\t\tAlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);\n\n\t\tfor (SessionModel element : values) {\n\n\t\t\tString[] ymd = element.getStartDateSplit();\n\t\t\tint month = Integer.parseInt(ymd[0]);\n\t\t\tint date = Integer.parseInt(ymd[1]);\n\t\t\tint year = Integer.parseInt(ymd[2]);\n\n\t\t\tString[] hm = element.getStartTimeSplit();\n\t\t\tint hour = Integer.parseInt(hm[0]);\n\t\t\tint min = Integer.parseInt(hm[1]);\n\n\t\t\tcalendar.set(Calendar.YEAR, year);\n\t\t\tcalendar.set(Calendar.MONTH, month);\n\t\t\tcalendar.set(Calendar.DATE, date);\n\t\t\tcalendar.set(Calendar.HOUR, hour);\n\t\t\tcalendar.set(Calendar.MINUTE, min);\n\n\t\t\tlong secs = calendar.getTimeInMillis();\n\t\t\tsecs -= 600000;\n\t\t\tcalendar.setTimeInMillis(secs);\n\t\t\tLog.w(\"AlarmManager-TDC2014 \", \"Setting Alarm Time : \" + calendar.toString());\n\t\t\tint id = (int) System.currentTimeMillis();\n\t\t\tIntent intent = new Intent(\"net.redirectme.apps.SESSION_NOTIFY\");\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, element.getId());\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TITLE, element.getName());;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SUBJECT, element.getAuthor());\n\n\t\t\tint trackIcon = element.getTrackIcon();\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SHORTCUT_ICON, trackIcon);\n\n\n\t\t\tPendingIntent pendingIntent = PendingIntent.getBroadcast(this, id, intent, PendingIntent.FLAG_ONE_SHOT);\n\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);\n\n\t\t}\n\t\tif(test==1)\n\t\t{\n\t\t\t// 5secs from now\n\t\t\tcalendar.setTimeInMillis(System.currentTimeMillis() + 10000);\n\t\t\tLog.w(\"AlarmManager-TEST \", \"Setting Alarm Time : \" + calendar.getTime());\n\t\t\tint id = (int) System.currentTimeMillis();\n\t\t\tIntent intent = new Intent(\"net.redirectme.apps.SESSION_NOTIFY\");\n\t\t\tlong value = 1;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, value);\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_TITLE, \"Test Session\");;\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sanjeev BA\");\n\t\t\tintent.putExtra(android.content.Intent.EXTRA_SHORTCUT_ICON, R.drawable.track_43_general);\n\n\t\t\tPendingIntent pendingIntent = PendingIntent.getBroadcast(this, id, intent, 0);\n\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);\n\t\t}\n\n\t}", "public void scheduleAlarm() {\n\n Calendar cal = Calendar.getInstance();\n Intent alarmIntent = new Intent(context, PeriodicTransactionService.class);\n alarmIntent.setAction(PeriodicTransactionService.ACTION);\n Bundle bundle = new Bundle();\n bundle.putInt(PeriodicTransactionService.USER_ID_PARAM, userId);\n alarmIntent.putExtras(bundle);\n PendingIntent pintent = PendingIntent.getService(context,\n MyAlarmManager.REQUEST_CODE,\n alarmIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 4 * 1000, pintent);\n }", "public void startAlarm() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Calendar calendar = Calendar.getInstance();\n\n // Set alarm only if the remained time is over 10 minutes\n if (time >10 ) {\n //TODO: Change to ((time * 60000) - 600000) for 10 minutes before\n calendar.setTimeInMillis((System.currentTimeMillis() + ((time * 1000)) - 10000)); // Alarm set to 10 sec before the booking\n\n Log.d(TAG, \"current time = \" + new Date().toLocaleString());\n// Log.d(TAG, \"current time = \" + System.currentTimeMillis());\n Log.d(TAG, \"Alarm set at = \" + calendar.getTime());\n\n /* no Repeat */\n manager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n 0, pendingIntent);\n }\n\n }", "public void scheduleAlarm() {\n Intent intent = new Intent(getApplicationContext(), MyAlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pendingIntent = PendingIntent.getBroadcast(this, MyAlarmReceiver.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REAL_TIME, ELAPSED_REAL_TIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n try {\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis, 5000L, pendingIntent);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n }", "public static void scheduleRepeatingElapsedNotification30(Context context) {\n\n // Setting intent to class where notification will be handled\n Intent intent = new Intent(context, AlarmReceiver.class);\n\n // Setting pending intent to respond to broadcast sent by AlarmManager everyday at 8am\n alarmIntentElapsed = PendingIntent.getBroadcast(context, ALARM_TYPE_ELAPSED, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Getting instance of AlarmManager service\n alarmManagerElapsed = (AlarmManager)context.getSystemService(ALARM_SERVICE);\n\n // Daily inexact alarm from phone boot - current set to test for 10 seconds\n alarmManagerElapsed.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(), 60000 * 30, alarmIntentElapsed);\n }", "public void scheduleAlarm() {\n Log.v(getClass().getSimpleName(), \"Scheduling alarm\");\n\n // Construct an intent that will execute the AlarmReceiver\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n\n // Create a PendingIntent to be triggered when the alarm goes off\n final PendingIntent pIntent = PendingIntent.getBroadcast(this, AlarmReceiver.REQUEST_CODE,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Setup periodic alarm every every half hour from this point onwards\n long firstMillis = System.currentTimeMillis(); // alarm is set right away\n AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\n\n // First parameter is the type: ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP, RTC_WAKEUP\n // Interval can be INTERVAL_FIFTEEN_MINUTES, INTERVAL_HALF_HOUR, INTERVAL_HOUR, INTERVAL_DAY\n alarm.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis,\n AlarmManager.INTERVAL_FIFTEEN_MINUTES, pIntent);\n }", "private void scheduleNotification(Notification notification) {\n\n Intent notificationIntent2 = new Intent(MainActivity.this, NotificationPublisher.class);\n notificationIntent2.putExtra(NotificationPublisher.NOTIFICATION_ID, 1);\n notificationIntent2.putExtra(NotificationPublisher.NOTIFICATION, notification);\n PendingIntent pendingIntent2 = PendingIntent.getBroadcast(MainActivity.this, 0, notificationIntent2, PendingIntent.FLAG_UPDATE_CURRENT);\n Date date = new Date();\n\n Calendar calnoti = Calendar.getInstance();\n calnoti.setTime(date);\n\n calnoti.set(Calendar.HOUR_OF_DAY, mHour-1);\n calnoti.set(Calendar.MINUTE, mMin);\n calnoti.set(Calendar.SECOND, 0);\n calnoti.set(Calendar.YEAR,mYear);\n calnoti.set(Calendar.MONTH,mMonth);\n calnoti.set(Calendar.DAY_OF_MONTH,mDay);\n //long futureInMillis2 = SystemClock.elapsedRealtime() + delay;\n AlarmManager alarmManager2 = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n alarmManager2.set(AlarmManager.RTC_WAKEUP, calnoti.getTimeInMillis(), pendingIntent2);\n }", "public void scheduleAlarm()\n {\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n Toast.makeText(this, \"Alarm scheduled for \" + hour + \":\" + minute, Toast.LENGTH_SHORT).show();\n\n }", "public void SetAlarm(Context context)\n {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, 7);\n calendar.set(Calendar.MINUTE,20);\n Log.i(\"Set calendar\", \"for time: \" + calendar.toString());\n\n //Intent i = new Intent(context, AlarmService.class);\n Intent i = new Intent(context, Alarm.class);\n boolean alarmRunning = (PendingIntent.getBroadcast(context, 0, i, PendingIntent.FLAG_NO_CREATE) !=null);\n if (!alarmRunning) {\n //PendingIntent pi = PendingIntent.getService(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n PendingIntent pi = PendingIntent.getService(context, 0, i, 0);\n\n\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, i, 0);\n AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);\n am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);\n //am.cancel(pi);\n }\n\n //PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0 );\n\n\n //am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),AlarmManager.INTERVAL_DAY, pi);\n\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent notificationIntent = new Intent(\"android.media.action.DISPLAY_NOTIFICATION\");\n notificationIntent.addCategory(\"android.intent.category.DEFAULT\");\n\n PendingIntent broadcast = PendingIntent.getBroadcast(this, 100, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.HOUR, 18);\n\n\n// alarmManager.setExact(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), broadcast);\n alarmManager.setRepeating(AlarmManager.RTC, cal.getTimeInMillis(), alarmManager.INTERVAL_DAY, broadcast);\n\n\n// alarmManager.setExact(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), broadcast);\n return START_STICKY;\n }", "private void setReminder(String vaccinationDate1) {\n try {\n Calendar c = Calendar.getInstance();\n c.setTime(new Date(vaccinationDate1));\n c.add(Calendar.DATE, 30);\n String vaccineDate2 = new SimpleDateFormat(\"d MMMM yyyy\").format(c.getTime());\n createNotificationChannel();\n Intent intent = new Intent(this, ReminderBroadcast.class);\n intent.putExtra(\"vaccineDate2\", vaccineDate2);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n\n long timeAtButtonClick = System.currentTimeMillis();\n\n long tenSecondsInMillis = 1000 * 10;\n\n alarmManager.set(AlarmManager.RTC_WAKEUP, timeAtButtonClick + tenSecondsInMillis, pendingIntent);\n Toast.makeText(this, \"Reminder created\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Toast.makeText(this, \"Could not create reminder | \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), ReminderBroadcastReceiver.class);\n intent.putExtra(\"notificationText\", reminderData.getNotificationText());\n\n // Create pending intent with time given\n PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), notificationId,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Create AlarmManager which is sent with pending intent\n AlarmManager alarm = (AlarmManager) getSystemService(ALARM_SERVICE);\n // Create time when notification will fire\n Calendar startTime = Calendar.getInstance();\n startTime.set(Calendar.DAY_OF_WEEK, startTime.get(Calendar.DAY_OF_WEEK));\n startTime.set(Calendar.HOUR_OF_DAY, timePicker.getHour());\n startTime.set(Calendar.MINUTE, timePicker.getMinute());\n startTime.set(Calendar.SECOND, 0);\n\n long alarmStartTime = startTime.getTimeInMillis();\n\n\n /* If reminder time is smaller than current time, start notification on next day, still in progress */\n\n /*\n if (startTime.getTimeInMillis() < System.currentTimeMillis()) {\n startTime.set(Calendar.DAY_OF_WEEK, startTime.get(Calendar.DAY_OF_WEEK + 1));\n alarmStartTime = startTime.getTimeInMillis();\n }\n else\n {\n alarmStartTime = startTime.getTimeInMillis();\n }\n */\n\n\n // Set alarm with (type, milliseconds, intent)\n // With RTC_WAKEUP we wake the device up and deliver the pending intent\n alarm.set(AlarmManager.RTC_WAKEUP, alarmStartTime, alarmIntent);\n saveData();\n\n }", "void setTestAlarm() \n {\n \t// start with now\n java.util.Calendar c = java.util.Calendar.getInstance();\n c.setTimeInMillis(System.currentTimeMillis());\n\n int nowHour = c.get(java.util.Calendar.HOUR_OF_DAY);\n int nowMinute = c.get(java.util.Calendar.MINUTE);\n\n int minutes = (nowMinute + 1) % 60;\n int hour = nowHour + (nowMinute == 0 ? 1 : 0);\n\n saveAlarm(this, mId, true, hour, minutes, mRepeatPref.getDaysOfWeek(),\n true, \"\", mAlarmPref.getAlertString(), true);\n }", "private PendingIntent buildAlarmPendingIntent() {\n Intent intent = new Intent(this, NotificationReceiver.class);\n intent.setAction(NotificationReceiver.ACTION_SEND_NOTIFICATIONS);\n\n return PendingIntent.getBroadcast(this,\n 0,\n intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n }", "@Override\n public void run() {\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n String dateTime = simpleDateFormat.format(calendar.getTime());\n\n //Find the current time\n SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat(\"hh:mm:ss a\");\n String currentTime = simpleDateFormat1.format(calendar.getTime());\n\n //Find duration of current date and first day\n Date date1,date2;\n String dateStr1 = data.getDate();\n String dateStr2 = dateTime;\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n try{\n date1 = sdf.parse(dateStr1);\n date2 = sdf.parse(dateStr2);\n long diff = date2.getTime() - date1.getTime();\n long totalDay = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(\"My Notification\", \"My Notification\", NotificationManager.IMPORTANCE_DEFAULT);\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel);\n }\n\n //Exercise Time\n if(totalDay==0 || totalDay==1 || (totalDay>4+dayInSpace && totalDay<=10+dayInSpace)){\n if (currentTime.equals(\"05:00:00 PM\")) {\n NotificationExercise();\n }\n }\n\n if(totalDay==2){\n if (currentTime.equals(\"08:00:00 PM\")) {\n NotificationExercise();\n }\n }\n\n if(totalDay==3){\n if (currentTime.equals(\"10:00:00 PM\")) {\n NotificationExercise();\n }\n }\n\n if(totalDay>=5 && totalDay<=4+dayInSpace){\n if (currentTime.equals(\"03:00:00 AM\")) {\n NotificationExercise();\n }\n }\n\n //Eating time (After half hour wake up-breakfast, After five hours wake up-lunch, Before four hours sleep-dinner)\n if(totalDay==0 || totalDay==1){\n if (currentTime.equals(\"07:30:00 AM\") || currentTime.equals(\"12:00:00 PM\") || currentTime.equals(\"07:00:00 PM\")) {\n NotificationMeal();\n }\n }\n\n if(totalDay==2){\n if (currentTime.equals(\"08:30:00 AM\") || currentTime.equals(\"01:00:00 PM\") || currentTime.equals(\"10:00:00 PM\")) {\n NotificationMeal();\n }\n }\n\n if(totalDay==3){\n if (currentTime.equals(\"10:30:00 AM\") || currentTime.equals(\"03:00:00 PM\")) {\n NotificationMeal();\n }\n }\n\n if(totalDay==4){\n if (currentTime.equals(\"12:00:00 AM\") || currentTime.equals(\"12:30:00 PM\") || currentTime.equals(\"05:00:00 PM\")) {\n NotificationMeal();\n }\n }\n\n if(totalDay>=5 && totalDay<=4+dayInSpace){\n if (currentTime.equals(\"05:00:00 AM\") || currentTime.equals(\"03:30:00 PM\") || currentTime.equals(\"08:00:00 PM\")) {\n NotificationMeal();\n }\n }\n\n if(totalDay>4+dayInSpace && totalDay<=10+dayInSpace){\n if (currentTime.equals(\"08:30:00 AM\") || currentTime.equals(\"01:00:00 PM\") || currentTime.equals(\"7:00:00 PM\")) {\n NotificationMeal();\n }\n }\n\n //Take Melatonin time\n if(totalDay>=5 && totalDay<5+dayInSpace){\n if (currentTime.equals(\"09:00:00 AM\")) {\n NotificationTakeMelatonin();\n }\n }\n\n if(totalDay>=4+dayInSpace && totalDay<=6+dayInSpace){\n if (currentTime.equals(\"11:00:00 PM\")) {\n NotificationTakeMelatonin();\n }\n }\n\n //Nap time\n if(totalDay>=4 && totalDay<4+dayInSpace){\n if (currentTime.equals(\"06:00:00 PM\")) {\n NotificationNap();\n }\n }\n\n if(totalDay>=4 && totalDay<4+dayInSpace){\n if (currentTime.equals(\"08:00:00 PM\")) {\n NotificationNap();\n }\n }\n\n //Sleep Time\n if(totalDay==0){\n if (currentTime.equals(\"12:00:00 AM\")) {\n NotificationSleep();\n }\n }\n\n if(totalDay==0 || totalDay==1){\n if (currentTime.equals(\"11:00:00 PM\")) {\n NotificationSleep();\n }\n }\n\n if(totalDay==3){\n if (currentTime.equals(\"02:00:00 AM\")) {\n NotificationSleep();\n }\n }\n\n if(totalDay==4){\n if (currentTime.equals(\"04:00:00 AM\")) {\n NotificationSleep();\n }\n }\n\n if(totalDay>=5 && totalDay<5+dayInSpace){\n if (currentTime.equals(\"09:00:00 AM\")) {\n NotificationSleep();\n }\n }\n\n if(totalDay>=4+dayInSpace && totalDay<=10+dayInSpace){\n if (currentTime.equals(\"11:00:00 PM\")) {\n NotificationSleep();\n }\n }\n\n //Wake Up Time\n if(totalDay==0 || totalDay==1){\n if (currentTime.equals(\"07:00:00 AM\")) {\n NotificationWakeUp();\n }\n }\n\n if(totalDay==2){\n if (currentTime.equals(\"08:00:00 AM\")) {\n NotificationWakeUp();\n }\n }\n\n if(totalDay==3){\n if (currentTime.equals(\"10:00:00 AM\")) {\n NotificationWakeUp();\n }\n }\n\n if(totalDay==4){\n if (currentTime.equals(\"12:00:00 PM\")) {\n NotificationWakeUp();\n }\n }\n\n if(totalDay>=5 && totalDay<5+dayInSpace){\n if (currentTime.equals(\"03:00:00 PM\")) {\n NotificationWakeUp();\n }\n }\n\n if(totalDay>=5+dayInSpace && totalDay<=10+dayInSpace){\n if (currentTime.equals(\"08:00:00 AM\")) {\n NotificationWakeUp();\n }\n }\n\n }catch(ParseException e){\n Log.d(\"error\",\"error\");\n }\n }", "public void sendMessage(View v) {\n /*\n\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.edit_message);\n String message = editText.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n */\n long time = currentTimeMillis();\n Date d1 = new Date();\n Date d2;\n // d2 = new Date(d1.getYear(),d1.getMonth(),d1.getDate(),d1.getHours(),d1.getMinutes(),d1.getSeconds());\n Toast.makeText(this, \"ALARM ON\", Toast.LENGTH_SHORT).show();\n // Calendar calendar = Calendar.getInstance();\n // calendar.set(Calendar.HOUR_OF_DAY, alarmTimePicker.getCurrentHour());\n // calendar.set(Calendar.MINUTE, alarmTimePicker.getCurrentMinute());\n alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(MainActivity.this, AlarmReceiver.class);\n pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n // Set the alarm's trigger time to 8:30 a.m.\n calendar.set(Calendar.HOUR_OF_DAY, 14);\n calendar.set(Calendar.MINUTE, 58);\n Toast.makeText(MainActivity.this, \"bjr\", Toast.LENGTH_SHORT).show();\n // alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, time + 5, 10000, pendingIntent);\n alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), pendingIntent);\n // Bon manque de prevenir le receiver....!!\n\n }", "private void createNotification() {\n\t\tIntent notifyIntent = new Intent(this, BirthdayActivity.class);\r\n\t\t// Sets the Activity to start in a new, empty task\r\n\t\tnotifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t// Creates the PendingIntent\r\n\t\tPendingIntent pendingIntent = PendingIntent.getActivity(this,\r\n\t\t\t\t(int) System.currentTimeMillis(), notifyIntent,\r\n\t\t\t\tPendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\tNotificationManagerUtil notificationManagerUtil = NotificationManagerUtil\r\n\t\t\t\t.getInstance();\r\n\t\tnotificationManagerUtil.createNotifications(this, 1, \"Message\",\r\n\t\t\t\tpendingIntent);\r\n\t}", "public AlarmManager setMidnightAlarmManager(Context context){\n Log.d(\"AlarmRCV\", \"Set alarm\");\n Intent intent = new Intent(context, AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(context,0,intent,0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n\n calendar.set(Calendar.HOUR_OF_DAY,23);\n calendar.set(Calendar.MINUTE,58);\n calendar.set(Calendar.SECOND,0);\n\n\n AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarm.setRepeating(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY,\n alarmIntent\n );\n\n\n return alarm;\n }", "public void setAlarm(Context context, int pk, long time, int Hora, int Minuto) {\n\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, Hora);\n calendar.set(Calendar.MINUTE, Minuto);\n\n\n //Se crea la hora correcta para el sistema\n long newTime = 1000 * 60 * 60 * time;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent alarmIntent = new Intent(context, AlarmReceiver.class);\n alarmIntent.putExtra(\"alarma\", pk);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, pk, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), newTime, pendingIntent);\n\n\n\n }", "@Scheduled(fixedRateString = \"PT120M\")\n\tvoid someJob(){\n//\t\tString s = \"Testing message.\\nNow time is : \"+new Date();\n////\t\tSystem.out.println(s);\n//\t\tPushNotificationOptions.sendMessageToAllUsers(s);\n//\n\t\t//get all schedules in current dayOfWeek\n\t\tCollection<Notification> notifications = notificationService.findAllByDayOfWeekAndTime();\n\t\tfor(Notification notification : notifications){\n//\t\t\tSystem.out.println(notification.toString());\n//\t\t\tSystem.out.println(!notification.getStatus());\n////\t\t\tSystem.out.println(check(notification.getStartTime()));\n//\t\t\t//check for already not sent notifications , also check for time difference < TIME_CONSTANT\n//\t\t\tif(!notification.getStatus() && check(notification.getStartTime())){\n//\t\t\t\t//send push notification\n//\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n//\t\t\t\t//mark the notification as sent\n//\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n//\t\t\t}\n\t\t\tif(checkForDayTime()){\n\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public void setReminderApp(Context context) {\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, DailyReminderApp.class);\n\n // setting waktu, kapan notifikasi akan di keluarkan\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, 7); // waktu yang di set adalah pukul 7 pagi\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n\n // pending intent ini akan menjalankan fungsi onReceive\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, ID_APP, intent, 0);\n if (alarmManager != null) {\n // statement ini berfungsi untuk mengatur jeda waktu notifikasi muncul\n // jeda waktu yang digunakan adalah sehari\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, pendingIntent);\n }\n\n\n }", "private void createAlarm(long backoffTimeMs) {\n Log.d(TAG, \"Scheduling registration retry, backoff = \" + backoffTimeMs);\n Intent retryIntent = new Intent(C2DM_RETRY);\n PendingIntent retryPIntent = PendingIntent.getBroadcast(context, 0, retryIntent, 0);\n AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n am.set(AlarmManager.ELAPSED_REALTIME, backoffTimeMs, retryPIntent);\n }", "public void setRepeatingAlarm(Context context, int type) {\n\n\n Intent intent = new Intent(context, AlarmReceiver.class);\n intent.putExtra(EXTRA_TYPE, type);\n\n String time = \"00:00\";\n if (type == Const.REQUEST_RELEASE_REMINDER) {\n time = Const.TIME_RELEASE_REMINDER;\n } else {\n time = Const.TIME_DAILY_REMINDER;\n }\n String[] timeArray = time.split(\":\");\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(timeArray[0]));\n calendar.set(Calendar.MINUTE, Integer.parseInt(timeArray[1]));\n calendar.set(Calendar.SECOND, 0);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(\n context,\n type,\n intent,\n 0);\n\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n if (alarmManager != null) {\n alarmManager.setInexactRepeating(\n AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY,\n pendingIntent\n );\n\n /*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, 0, pendingIntent);\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n alarmManager.setExact(AlarmManager.RTC_WAKEUP, 0, pendingIntent);\n } else {\n alarmManager.set(AlarmManager.RTC_WAKEUP, 0, pendingIntent);\n }\n */\n\n Log.d(TAG, \"setRepeatingAlarm: Set \" + type + \" = \" + time);\n }\n\n }", "public Alarm_Msg(Context context, Bundle extras){\n /*AlarmManager alarmMgr =\n (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, Alarm_Msg.class);\n intent.putExtra(REMINDER_BUNDLE, extras);\n PendingIntent pendingIntent =\n PendingIntent.getBroadcast(context, 0, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Calendar time = Calendar.getInstance();\n time.setTimeInMillis(System.currentTimeMillis());\n time.set(Calendar.HOUR_OF_DAY, Integer.parseInt(extras.getString(\"time_h\")));\n time.set(Calendar.MINUTE, Integer.parseInt(extras.getString(\"time_m\")));\n\n alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, time.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, pendingIntent);*/\n\n\n AlarmManager alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, Alarm_Msg.class);\n intent.putExtra(REMINDER_BUNDLE, extras);\n Bundle getBundle = intent.getBundleExtra(REMINDER_BUNDLE);\n NOTIFY_ID = NOTIFY_ID + getBundle.getInt(\"id\");\n //Toast.makeText(context, Integer.toString(NOTIFY_ID), Toast.LENGTH_LONG).show();\n PendingIntent pendingIntent =\n PendingIntent.getBroadcast(context, NOTIFY_ID, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,\n SystemClock.elapsedRealtime() +\n 60 * 1000, pendingIntent);\n }", "@Scheduled(cron = \"0 0 9-17 * * MON-FRI\")\n\tpublic void scheduleTaskWeekly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 9 - 17 O'clock Every Weekdays - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "@Override\n public void onClick(View v) {\n if(v.getId() == R.id.alarmCheck){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n cal = Calendar.getInstance();\n // Get the time for the alarm at the index\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n // Get the hour and minute from the string and set them to int\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set the alarm time\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // State pattern used here\n state = new CreateState();\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // add 24 hours\n cal.setTimeInMillis(cal.getTimeInMillis() + 86400000);\n // set the reciever\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Overwrite the correct intent at the index\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // Handle the alarm\n // State pattern used here\n state.handle(manager, pending, cal, false);\n // Turn off ringtone\n sendBroadcast(myIntent);\n\n }\n // If snoozed then stop the media player and set the timer/calendar to 10 minutes\n else if(v.getId() == R.id.snooze){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n // initialize AlarmManager\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // set the state\n // State pattern used here\n state = new SnoozeState();\n cal = Calendar.getInstance();\n // Get the time the alarm was set\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set calendar to time initially set\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // Create a new intent for alarm receiver\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n // Add extras for RingtoneService\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent wiht the BroadcastReceiver\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Set the new intent in the list\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // handle the snooze state\n // State pattern used here\n state.handle(manager, pending, cal, false);\n //send a toast to the user letting them know it will snooze for 10 minutes\n Toast t = Toast.makeText(getApplicationContext(), \"Alarm Snoozed for 10 minutes\",\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.FILL_HORIZONTAL, 10, 1500);\n t.show();\n // Stop the current ringtone\n sendBroadcast(myIntent);\n }\n }", "private void createNotificationChannel(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"DailyReminderChannel\";\n String desc = \"Channel for daily reminders\";\n NotificationChannel channel = new NotificationChannel(\"dailyReminders\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(desc);\n\n NotificationManager manager = getActivity().getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel);\n }\n }", "private void sendNotification() {\n int mNotificationId = 001;\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_action_camera)\n .setContentTitle(\"Daily Selfie\")\n .setContentText(\"Time for another selfie\");\n Intent resultIntent = new Intent(this, MainActivity.class);\n PendingIntent resultPendingIntent =\n PendingIntent.getActivity(\n this,\n 0,\n resultIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n // Gets an instance of the NotificationManager service\n NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n // Builds the notification and issues it.\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n }", "public static void createEveningReminderAlarm(Context context) {\n String prefEveningStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_EVENING_START, context);\n int eveningStartHour = TimePreference.getHour(prefEveningStart);\n int eveningStartMinute = TimePreference.getMinute(prefEveningStart);\n\n // Create reminders intent.\n PendingIntent alarmIntent = getRemindersIntent(context, Intents.EVENING_REMINDER);\n\n // Trigger the alarm.\n triggerDailyAlarm(context, eveningStartHour, eveningStartMinute, alarmIntent);\n }", "public synchronized static Uri newAlarm(Context context) {\n return context.getContentResolver().insert(\n Uri.parse(CONTENT_URI_ALL_ALARMS), null);\n }", "public void startAlarm(Context context) {\n\n System.out.println(\"startAlarm\");\n\n\n\n //creates Object of AlarmManager\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n //passing the Alarm to AlertReceiver Class\n Intent intent = new Intent(context, AlertReceiver.class);\n final int id = (int) System.currentTimeMillis();\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, id, intent, 0);\n\n //Compares the chosen time with the real time\n if (c.before(Calendar.getInstance())) {\n c.add(Calendar.DATE, 1);\n }\n\n alarmManager.setExact(AlarmManager.RTC_WAKEUP, c.getTimeInMillis(), pendingIntent);\n\n\n }", "private void setAlarm(Alarm alarm, int flags) {\n // this set alarm based on TimePicker so we need to set Calendar like the\n // trigger time\n // get instant of Calendar\n Calendar myCalendar = Calendar.getInstance();\n Calendar calendar = (Calendar) myCalendar.clone();\n // set current hour for calendar\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour_x());\n // set current minute\n calendar.set(Calendar.MINUTE, alarm.getMinute_x());\n // set current second for calendar\n calendar.set(Calendar.SECOND, 0);\n // plus one day if the time set less than the the Calendar current time\n if (calendar.compareTo(myCalendar) <= 0) {\n calendar.add(Calendar.DATE, 1);\n }\n // get id of alarm and set for PendingIntent to multiply multiple PendingIntent for cancel\n // time, this also put into PendingIntent to compare with the cancel Alarm's id=\n int alarmId = (int) alarm.getId();\n // make intent to broadCast\n Intent intent = new Intent(AlarmsetActivity.this, AlarmReceiver.class);\n // put intent type to check which intent trigger add or cancel\n intent.putExtra(\"intentType\", Constants.ADD_INTENT);\n // put id to intent\n intent.putExtra(\"PendingId\", alarmId);\n // this pendingIntent include alarm id to manage\n PendingIntent alarmIntent = PendingIntent.getBroadcast(AlarmsetActivity.this, alarmId,\n intent, flags);\n // create alarm manager ALARM_SERVICE\n AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // Set alarm, at the trigger time \"calandar.getTimeInMillis\" this pendingIntent will be\n // sent to AlarmReceiver and then sent to alarm service to play music\n // this \"AlarmManager.INTERVAL_DAY\" mean this will set one new alarm at the trigger time\n // setInExactRepeating this may set alarm again and again also this may be not\n // trigger at the right time( at the first second start) but this will save the battery.\n // \"AlarmManager.RTC_WAKEUP\" allow this app wake device from idle time and the time\n // based on device time\n\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, alarmIntent);\n\n }", "public void setAlarmMorning(Context context, long timestampMillisKey) {\n //cancel any existing alarms and then set a new one\n cancel(context);\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, Constants.AFTER_HOURS_END);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n\n if (calendar.compareTo(Calendar.getInstance()) < 0) {\n //this means we are trying to set alarm time which is already expired, so add 24Hrs or 1 day to this and then set alarm\n calendar.add(Calendar.DATE, 1);\n }\n\n Intent alarmIntent = new Intent(context, AutoPendingNotificationTrigger.class);\n\n Bundle bundle = new Bundle();\n bundle.putLong(Constants.EXTRA_TIME_STAMP_MILLIS, timestampMillisKey);\n alarmIntent.putExtras(bundle);\n\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(context.getApplicationContext().ALARM_SERVICE);\n alarmManager.setExact(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n PendingIntent.getBroadcast(context.getApplicationContext(), ALARM_REQUEST_CODE, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT));\n }", "Notification createNewAppointmentNotification(Appointment appointment);", "public static void schedule(Context context, Intent intent, long triggerAtMillis) {\n /**\n * PendingIntent.getBroadcast\n *\n * PendingIntent.FLAG_UPDATE_CURRENT\n *\n * */\n PendingIntent p = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, p);\n //Log.i(TAG, \"ALARME com data/hora definido\");\n }", "public static void updateAlarm(Context context, int hours, int minutes) {\n\n\t\t// Current date localTime\n\t\tCalendar localTime = Calendar.getInstance();\n\t\tint localHour = localTime.get(Calendar.HOUR_OF_DAY);\n\t\tint localMinutes = localTime.get(Calendar.MINUTE);\n\t\tint localSeconds = localTime.get(Calendar.SECOND);\n\n\t\tlong schedule = 1000L * ((60L * 60 * (hours - localHour) + (60L * (minutes - localMinutes))) - localSeconds);\n\t\tif (schedule < 0) {\n\t\t\t// Schedule tomorrow\n\t\t\tschedule += 1000 * 24 * 60 * 60L; // Add day\n\t\t}\n\n\t\t// Delay to remove multiple notifications problem\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException ex) {\n\t\t\t// Should not happen\n\t\t}\n\n\t\ttry {\n\t\t\tIntent timerIntent = new Intent(context, AlarmReceiver.class);\n\t\t\tPendingIntent intent = PendingIntent.getBroadcast(context, 0, timerIntent,\n\t\t\t\t\tPendingIntent.FLAG_CANCEL_CURRENT);\n\n\t\t\tlong due = new Date().getTime() + schedule;\n\t\t\tlong dueUTC = due + Calendar.getInstance().get(Calendar.ZONE_OFFSET);\n\n\t\t\tAlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\t\t\talarmManager.set(AlarmManager.RTC, dueUTC, intent);\n\t\t} catch (Exception ex) {\n\t\t\tAppLog.e(\"AlarmReceiver\", \"updateAlarm\", ex);\n\t\t}\n\t}", "@Override\r\n public void onClick(View v) {\n Alarm alarm = new Alarm(getContext(), userId);\r\n alarm.setAlarmWithNewPracticeTimes();\r\n }", "public void newAlarmManager(long time, Intent intent, int requestCode){\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(),\n requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager startAlarmManager = (AlarmManager) getApplicationContext()\n .getSystemService(Context.ALARM_SERVICE);\n startAlarmManager.setExact(AlarmManager.RTC_WAKEUP, time, pendingIntent);\n }", "public static void startAlarmPendingIntent(Context context, boolean skipCancel) {\n // zrusime vsechny budiky v dtb kdyz je treba\n if (!skipCancel)\n {\n cancelAlarmPendingIntents(context);\n }\n // nacteme budiky z dtb\n List<Alarm> alarms = Alarm.getAlarms();\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(context.ALARM_SERVICE);\n\n if (alarms == null) {\n return;\n }\n\n // naplanujeme vsechny budiky\n // kazdej aktivni budik je naplanovanej vzdy na datum nejblizsi zvoneni, budiky navic\n // planujeme jen jeden tyden dopredu od doby planovani\n // pro zazvoneni se pouzivaji pending intenty, ty jsou intenty ktery se spusti po nejake\n // dobe, navic v AlarmManageru(sluzba OS) jsou tyhle pending intenty kodovany podle nejakyho\n // klice, jako klic jsem pouzil id budiku v databazi\n\n ALARM_LOOP:\n for (Alarm alarm : alarms) {\n\n if (!alarm.isActive()) {\n continue;\n }\n\n Calendar cal = Calendar.getInstance();\n int currentDay = Calendar.getInstance().get(Calendar.DAY_OF_WEEK);\n\n DayRecorder days = alarm.getDays();\n\n final int curHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n final int curMin = Calendar.getInstance().get(Calendar.MINUTE);\n\n // nastavime v calendari cas zazvoneni budiku\n cal.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n cal.set(Calendar.MINUTE, alarm.getMinute());\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n\n // nejdriv zkontrolujeme jestli budik bude zvonit do konce dne\n if (alarm.getHour() >= curHour &&\n alarm.getMinute() > curMin &&\n days.isDaySet(currentDay - 1)) {\n\n cal.set(Calendar.DAY_OF_WEEK, currentDay);\n PendingIntent sender = createPendingIntent(context, alarm);\n // naplanuje budik na spravnej cas\n alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), sender);\n // budik naplanovan pokracujem dalsim budikem\n continue ALARM_LOOP;\n }\n\n if (cal.getFirstDayOfWeek() == Calendar.SUNDAY) {\n Log.v(TAG, \"US\");\n\n } else {\n Log.v(TAG, \"EU:\" + cal.getFirstDayOfWeek());\n cal.setFirstDayOfWeek(Calendar.SUNDAY);\n }\n\n // to same akorat ted kontrolujeme jestli budik byl naplanovan do konce tydne(soboty)\n // to je furt ten samy tyden jako ma Calender.getInstance();\n for (int i = currentDay + 1; i <= Calendar.SATURDAY; i++) {\n if (days.isDaySet(i - 1)) {\n\n cal.set(Calendar.DAY_OF_WEEK, i);\n PendingIntent sender = createPendingIntent(context, alarm);\n // naplanuje budik na spravnej cas\n Log.v(TAG, \"cal time millis \" + cal.get(Calendar.DAY_OF_WEEK) + \" \"\n + cal.get(Calendar.HOUR_OF_DAY) + \":\" + cal.get(Calendar.MINUTE));\n alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), sender);\n\n continue ALARM_LOOP;\n }\n }\n\n // budik nebyl naplanovan do soboty, tedy musi se prelit do dalsiho tydne\n // Calender.getInstance ma tyden o 1 mensi\n for (int i = Calendar.SUNDAY; i <= currentDay; ++i) {\n if (days.isDaySet(i-1)) {\n cal.set(Calendar.DAY_OF_WEEK, i);\n // incrementujeme polozku tyden\n cal.add(Calendar.WEEK_OF_YEAR, 1);\n PendingIntent sender = createPendingIntent(context, alarm);\n // naplanuje budik na spravnej cas\n alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), sender);\n continue ALARM_LOOP;\n }\n }\n }\n }", "protected void startBroadcastLocation() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n int interval = 5000;\n\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), interval, pendingIntent);\n Toast.makeText(this, \"Alarm Set\", Toast.LENGTH_SHORT).show();\n }", "public void startAlarm(Context context){\n Intent intent = new Intent(this,MonthlyReminderService.class);\n int received = intent.getIntExtra(\"recieved\", 0);\n intent.putExtra(\"received\", received);\n //int type = intent.getIntExtra(\"type\", 0);\n //Log.e(\"SurveyType\", Integer.toString(type));\n //intent.putExtra(\"type\", type);\n //intent.putExtra(\"date\", surveyDate);\n //intent.putExtra(\"type\", \"Health Literacy\");\n //Calendar now = Calendar.getInstance();\n //intent.putExtra(\"dayofYear\",now.get(Calendar.DAY_OF_YEAR));\n startService(intent);\n }", "public void schedule(Context context, int requestCode)\n {\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n int alarmID = 0;\n Days[] days = getDays();\n int routineID = id;\n String routineName = name;\n\n Calendar routineTime = Calendar.getInstance();\n\n try\n {\n routineTime.setTime(Objects.requireNonNull(formatter.parse(time)));\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n // Schedule for each selected days\n for (Days day : days)\n {\n Calendar scheduleTime = Calendar.getInstance();\n\n // Set current calendar to current system time\n scheduleTime.setTimeInMillis(System.currentTimeMillis());\n scheduleTime.set(Calendar.HOUR_OF_DAY, routineTime.get(Calendar.HOUR_OF_DAY));\n scheduleTime.set(Calendar.MINUTE, routineTime.get(Calendar.MINUTE));\n scheduleTime.set(Calendar.SECOND, 0);\n scheduleTime.set(Calendar.MILLISECOND, 0);\n scheduleTime.set(Calendar.DAY_OF_MONTH, Calendar.DAY_OF_MONTH);\n\n switch(day)\n {\n case Sunday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n break;\n\n case Monday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n break;\n\n case Tuesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);\n break;\n\n case Wednesday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.WEDNESDAY);\n break;\n\n case Thursday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);\n break;\n\n case Friday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);\n break;\n\n case Saturday:\n scheduleTime.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);\n break;\n }\n\n Log.i(\"Routine\", \"----- Scheduling -----\");\n\n // Check if whether the day selected has passed, if yes then\n // add 7 days into the scheduler\n if (scheduleTime.getTimeInMillis() <= System.currentTimeMillis())\n {\n scheduleTime.add(Calendar.DAY_OF_MONTH, 7);\n Log.i(\"Routine\", \"ADD 7 DAYS\");\n }\n\n // DEBUG LOG\n Log.i(\"Routine\", \"Routine ID : \" + routineID);\n Log.i(\"Routine\", \"Day : \" + scheduleTime.get(Calendar.DAY_OF_WEEK));\n Log.i(\"Routine\", \"Hours : \" + scheduleTime.get(Calendar.HOUR_OF_DAY));\n Log.i(\"Routine\", \"Minutes : \" + scheduleTime.get(Calendar.MINUTE));\n Log.i(\"Routine\", \"DOM : \" + scheduleTime.get(Calendar.DAY_OF_MONTH));\n Log.i(\"Routine\", \"Month : \" + scheduleTime.get(Calendar.MONTH));\n\n // Intent to handle broadcast from alarm manager\n Intent intent = new Intent(context, AlarmBroadcastReceiver.class);\n intent.putExtra(\"Routine ID\", routineID);\n intent.putExtra(\"Routine Name\", routineName);\n\n PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(context, (routineID * 10) + alarmID, intent, 0);\n\n // Routine will always repeating\n int RUN_WEEKLY = 24 * 7 * 60 * 60 * 1000;\n\n switch(requestCode)\n {\n case REQ_ADD_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION ADD\");\n\n // Schedule to alarm manager\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setExactAndAllowWhileIdle(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n else\n {\n alarmManager.setExact(\n AlarmManager.RTC_WAKEUP,\n scheduleTime.getTimeInMillis(),\n alarmPendingIntent\n );\n }\n\n alarmID++;\n break;\n\n case REQ_DELETE_SCHEDULE:\n Log.i(\"Routine\", \"SCHEDULE ACTION REMOVE\");\n alarmManager.cancel(alarmPendingIntent);\n alarmID++;\n break;\n }\n }\n }", "public void createNotificationChannels(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n NotificationChannel notificationChannel = new NotificationChannel(\n CHANNEL_1_ID, \"Channel 1\", NotificationManager.IMPORTANCE_HIGH\n );\n notificationChannel.enableLights(true);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Alarm Message\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(notificationChannel);\n }\n\n }", "public void createNotificationChannel() {\n mNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Stand up notification\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Notifies every 15 minutes to \" +\n \"stand up and walk\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void setAlarm(final int fromHours, final int fromMinutes, final int toHours, final int toMinutes, final boolean enableVibration, final boolean muteMedia, final boolean lockVolume,\n\t\t\tfinal boolean unmuteOnCall, final boolean disableNotificationLight, final int brightness, final boolean[] wdays, final boolean newAlarm, final int updateAlarmId) {\n\n\t\tint alarmId;\n\t\tAlarm alarm = new Alarm(fromHours * 60 + fromMinutes, toHours * 60 + toMinutes, enableVibration, muteMedia, lockVolume, unmuteOnCall, disableNotificationLight, brightness, wdays);\n\t\talarm_data.add(alarm);\n\n\t\tAlarm[] alarmArray = new Alarm[alarm_data.size()];\n\n\t\talarmList.setAdapter(new AlarmAdapter(getActivity(), R.layout.alarm_list_item, alarm_data.toArray(alarmArray)));\n\n\t\tif (newAlarm) {\n\t\t\talarmId = settings.getInt(Constants.SCHEDULER_MAX_ALARM_ID, 0) + 2;\n\t\t\tdbAdapter.createAlarm(alarmId, alarm);\n\n\t\t\teditor.putInt(Constants.SCHEDULER_MAX_ALARM_ID, alarmId);\n\t\t\teditor.commit();\n\n\t\t} else {\n\n\t\t\talarmId = updateAlarmId;\n\t\t\tdbAdapter.updateAlarm(alarmId, alarm);\n\t\t}\n\n\t\talarmIDs.add(alarmId);\n\n\t\tTools.setAlarm(getActivity(), dbAdapter, alarm, alarmId);\n\n\t}", "public void createNotificationChannel() {\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID,\"Log the game!\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Reminder to log your game on Friday's at 3:05 pm\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void upgradeAlertsForVersion16(SQLiteDatabase database){\n\t\tCursor cursor = database.query(iStayHealthyDatabaseSchema.ALERTSTABLE, null, null, null, null, null, iStayHealthyDatabaseSchema.ALERTLABEL);\n\t\tif(1 >= cursor.getColumnCount()){\n\t\t\tcursor.close();\n\t\t\treturn;\n\t\t}\n\t\tint standardInterval = 24 * 60 * 60 * 1000;//24 hour repeat interval\n\t\tAlarmManager alarm = (AlarmManager) context.getApplicationContext().getSystemService(Context.ALARM_SERVICE);\n\t\tint requestCode = 0;\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tjava.util.Date date = new java.util.Date();\n\t\tlong now = date.getTime();\n\t\twhile(cursor.moveToNext()){\n\t\t\tlong rowId = cursor.getLong(cursor.getColumnIndex(iStayHealthyDatabaseSchema.KEY_ID));\n\t\t\tString label = cursor.getString(cursor.getColumnIndex(iStayHealthyDatabaseSchema.ALERTLABEL));\n\t\t\tint repeat = cursor.getInt(cursor.getColumnIndex(iStayHealthyDatabaseSchema.ALERTREPEATPATTERN));\n\t\t\tlong startTime = cursor.getLong(cursor.getColumnIndex(iStayHealthyDatabaseSchema.ALERTSTARTTIME));\n\t\t\tCalendar alarmCalendar = Calendar.getInstance();\n\t\t\talarmCalendar.setTimeInMillis(startTime);\n\t\t\tboolean isEveryDay = (0 < repeat);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, alarmCalendar.get(Calendar.HOUR_OF_DAY));\n\t\t\tcalendar.set(Calendar.MINUTE, alarmCalendar.get(Calendar.MINUTE));\n\n\t\t\tlong time = calendar.getTimeInMillis();\n\t\t\tIntent intent = new Intent(context, AlarmReceiver.class);\n\t\t\tintent.putExtra(\"Label\", label);\n\t\t\tintent.putExtra(\"isEveryDay\", isEveryDay);\n\t\t\t\n\t\t\tPendingIntent pendingSingleIntent = PendingIntent.getBroadcast(context, 0, intent, 0);\t\t\n\t\t\talarm.cancel(pendingSingleIntent);\n\t\t\t\n\t\t\t\n\t\t\tIntent newIntent = new Intent(context, AlarmReceiver.class);\n\t\t\tnewIntent.putExtra(\"Label\", label);\n\t\t\tnewIntent.putExtra(\"isVibrate\", true);\n\t\t\tnewIntent.putExtra(\"isEveryDay\", isEveryDay);\n\t\t\tnewIntent.putExtra(\"requestCode\", requestCode);\n\t\t\tPendingIntent newPendingIntent = PendingIntent.getBroadcast(context.getApplicationContext(), requestCode, newIntent, 0);\n\t\t\t\n\t\t\tif(isEveryDay){\n\t\t\t\talarm.setRepeating(AlarmManager.RTC_WAKEUP, time, standardInterval, newPendingIntent);\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlong diff = startTime - now;\n\t\t\t\tif( 0 < diff){\n\t\t\t\t\talarm.set(AlarmManager.RTC_WAKEUP, startTime, newPendingIntent);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tContentValues content = new ContentValues();\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTLABEL, label);\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTREPEATPATTERN, repeat);\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTSTARTTIME, startTime);\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTREQUESTCODE, requestCode);\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTTEXT, cursor.getString(cursor.getColumnIndex(iStayHealthyDatabaseSchema.ALERTTEXT)));\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTSOUND, cursor.getString(cursor.getColumnIndex(iStayHealthyDatabaseSchema.ALERTSOUND)));\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTHOUR, cursor.getInt(cursor.getColumnIndex(iStayHealthyDatabaseSchema.ALERTHOUR)));\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.AlERTMINUTE, cursor.getInt(cursor.getColumnIndex(iStayHealthyDatabaseSchema.AlERTMINUTE)));\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.ALERTTIMEZONEOFFSET, cursor.getLong(cursor.getColumnIndex(iStayHealthyDatabaseSchema.ALERTTIMEZONEOFFSET)));\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.GUIDTEXT, java.util.UUID.randomUUID().toString());\n\t\t\tcontent.put(iStayHealthyDatabaseSchema.TINTABEEKEY, cursor.getString(cursor.getColumnIndex(iStayHealthyDatabaseSchema.TINTABEEKEY)));\n\t\t\tdatabase.updateWithOnConflict(iStayHealthyDatabaseSchema.ALERTSTABLE, content, iStayHealthyDatabaseSchema.KEY_ID + \"=\" + rowId, null, SQLiteDatabase.CONFLICT_IGNORE);\t\t\t\t\n\n\t\t\trequestCode = requestCode + 1;\n\t\t}\n\t\t\n\t\tcursor.close();\n\t}", "private void setHeartRateMonitor()\n {\n\n Calendar cal = Calendar.getInstance();\n Date now = new Date();\n cal.setTime(now);\n\n long alarm_time = cal.getTimeInMillis();\n\n// if(cal.before(Calendar.getInstance()))\n// alarm_time += 60*1000;\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Intent intent = new Intent(this, HeartRateMonitor.class);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, HEART_RATE_MONITOR_REQUEST_CODE, intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, alarm_time,90000, pendingIntent);\n\n Log.i(\"hrmonitor\",\"hrmonitor alarm set\");\n }", "static public void scheduleLocalNotification(Context context, String message, Bundle extras, int seconds)\n\t{\n\t\tAlarmReceiver.setAlarm(context, message, extras, seconds);\n\t}", "@org.junit.Test\n public void testCreateAlarm() {\n System.out.println(\"CreateAlarm\");\n\n //setup\n FavoriteAlarm toConvert = new FavoriteAlarm(new LocalTime(8,00), \"www.test.com\");\n FavoriteAlarmPropertiesService instance = new FavoriteAlarmPropertiesService();\n\n //act\n SetAlarm alarm = instance.createAlarm(toConvert);\n\n //assert\n assertTrue(\"Should always be set in the future\", alarm.getTime().isAfterNow());\n assertTrue(\"Should be less than 24 hours in the future\",\n alarm.getTime().isBefore(\n new DateTime(System.currentTimeMillis()).plusDays(1)\n ));\n\n assertEquals(8, alarm.getTime().getHourOfDay());\n assertEquals(0, alarm.getTime().getMinuteOfHour());\n assertEquals(\"www.test.com\", alarm.getPath());\n }", "public void sendTestNotification() {\n\n Log.d(TAG, \"version: \" + Build.VERSION.SDK_INT);\n // Create an explicit intent for an Activity in your app\n Intent intent = new Intent(context, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n\n final int NOTIFICATION_ID = 1;\n final String NOTIFICATION_CHANNEL_ID = \"my_notification_channel\";\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context, channelId)\n .setSmallIcon(R.drawable.alarm_sound_icon) // icon must be right size for all supported APIs. Icon is changeable\n .setContentTitle(\"IDO\") // changeable\n .setContentText(\"Become A Better Spouse Today!\") // changeable\n .setPriority(NotificationCompat.PRIORITY_DEFAULT) // changeable\n .setContentIntent(pendingIntent)\n .setVisibility(Notification.VISIBILITY_PUBLIC) // changeable\n .setAutoCancel(true);\n\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n\n // notificationId is a unique int for each notification that you must define\n notificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n\n }", "@Override\n public void schedulePeriodicNotification(Context context, long time, String title, String text, int period) {\n Notification notification = new Notification(title, text, new Date(time), Long.toString(time));\n notification.setNotificationID(notificationId);\n notification.setRequestCode(requestCode);\n user.addNotification(notification);\n Intent intent = new Intent(context, NotificationReceiver.class);\n intent.putExtra(getString(R.string.title), title);\n intent.putExtra(getString(R.string.text), text);\n intent.putExtra(getString(R.string.notificationid), Integer.toString(notificationId));\n notificationId++;\n PendingIntent pending = PendingIntent.getBroadcast(context, requestCode, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n requestCode++;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n assert manager != null;\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, time,\n AlarmManager.INTERVAL_DAY*period, pending);\n }", "@Override\n public void onClick(View v) {\n\n if(wake!=null && sleep!=null){\n int id= db.insertSleepReminder(\"\"+sleep.getTimeInMillis(),\"\"+wake.getTimeInMillis());\n Intent intent = new Intent(AddSleep.this, UnlockReceiver.class);\n intent.putExtra(\"wake_up\",\"\"+wake.getTimeInMillis());\n intent.putExtra(\"sleep\",\"\"+sleep.getTimeInMillis());\n intent.putExtra(\"id\",\"\"+id );\n\n PendingIntent intent1 = PendingIntent.getBroadcast(AddSleep.this,id,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);\n alarmManager.setExact(AlarmManager.RTC, sleep.getTimeInMillis(),intent1);\n\n intent = new Intent(AddSleep.this, WakeUpReceiver.class);\n intent.putExtra(\"wake_up\",\"\"+wake.getTimeInMillis());\n intent.putExtra(\"sleep\",\"\"+sleep.getTimeInMillis());\n intent.putExtra(\"id\",\"\"+id);\n\n intent1 = PendingIntent.getBroadcast(AddSleep.this,id,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setExact(AlarmManager.RTC, wake.getTimeInMillis(),intent1);\n\n Intent intent2 = new Intent(AddSleep.this,Reminder.class);\n startActivity(intent2);\n finish();} else\n {\n Toast.makeText(AddSleep.this,\"Please,Enter Sleep and Wake Up Time!\",Toast.LENGTH_SHORT).show();\n\n }\n\n\n }", "public void configureAlarmManager() {\n Boolean enable = sharedPreferences.getBoolean(EXTRA_ENABLE_NOTIF,false);\n\n if(enable){\n AlarmManager alarmMgr = (AlarmManager) getApplicationContext().getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n intent.putExtra(EXTRA_USER_ID, mCurrentUser.getUid()); // attach the userId to the intent\n PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Set the alarm to start at 12:00.\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, 12);\n calendar.set(Calendar.MINUTE, 0);\n\n // setRepeating() lets you specify a precise custom interval\n if (alarmMgr != null)\n alarmMgr.setRepeating(AlarmManager.RTC, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n }\n }", "@Override\n public void run() {\n alarm.setAlarm(getApplicationContext(), System.currentTimeMillis(), time);\n\n while (RESULT) {\n try {\n sleep(1000);\n time += 1000;\n if (time == 10000) {\n time = 0;\n }\n //Utils.messageDisplay(\"Upload time ...: \" + message + \" - time :\" + getTime(System.currentTimeMillis()));\n //sendNotification(message + getTime(System.currentTimeMillis()) + \" CANCEL_TIME :\" + CANCEL_TIME, id);\n sendNotification(message +\" ID : \"+id, id);\n } catch (Exception e) {\n Utils.messageDisplay(\"Error : \" + e.getMessage());\n }\n }\n alarm.cancelAlarm(getApplicationContext());\n\n Utils.messageDisplay(\"cancle alram service ...\");\n\n sendNotification(\"Alram --> Alram\", id);\n }", "private void sendNotificationSample() {\n Intent notificationIntent = new Intent(GCMIntentService.this, AlertActivity.class);\n\n // Get a PendingIntent containing the entire back stack.\n int i = new Random().nextInt(100);\n PendingIntent notificationPendingIntent = PendingIntent.getActivity(GCMIntentService.this, i, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Get a notification builder that's compatible with platform versions >= 4\n NotificationCompat.Builder builder = new NotificationCompat.Builder(GCMIntentService.this);\n\n // Define the notification settings.\n builder.setSmallIcon(R.drawable.icon_v2)\n // In a real app, you may want to use a library like Volley\n // to decode the Bitmap.\n //.setLargeIcon(BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_launcher)).\n .setContentTitle(\"Shang\").setContentText(i + \". This is test mesage from notification\").setContentIntent(notificationPendingIntent);\n\n // Dismiss notification once the user touches it.\n builder.setAutoCancel(true);\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n builder.setSound(alarmSound);\n\n builder.setVibrate(new long[]{0, 2000});\n\n builder.setContentIntent(notificationPendingIntent);\n\n // Get an instance of the Notification manager\n NotificationManager mNotificationManager = (NotificationManager) GCMIntentService.this.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Issue the notification\n mNotificationManager.notify(i, builder.build());\n }", "@Override\n public void onCreate() {\n\n if(mTimer != null) {\n mTimer.cancel();\n } else {\n // recreate new\n mTimer = new Timer();\n }\n // schedule task\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY,11);\n calendar.set(Calendar.MINUTE,00);\n calendar.set(Calendar.SECOND,0);\n calendar.set(Calendar.MILLISECOND,0);\n\n if (calendar.before(new Date())){\n calendar.add(Calendar.DAY_OF_MONTH,1);\n };\n\n //Find next weekday\n int tag = calendar.get(Calendar.DAY_OF_WEEK);\n while ((tag < 2) || (tag > 6)) {\n calendar.add(Calendar.DAY_OF_MONTH,1);\n tag = calendar.get(Calendar.DAY_OF_WEEK);\n };\n\n mTimer.scheduleAtFixedRate(new TimeDisplayTimerTask(this.getApplicationContext()),calendar.getTime(),NOTIFY_INTERVAL);\n }", "@Override\n\tprotected void onHandleIntent(final Intent intent) {\n\t\ttimeFromNow = intent.getExtras().getFloat(\"timeFromNow\");\n\t\tLog.i(\"LocalNotification\", \"scheduleNotification -> timeFromNow: \" + timeFromNow);\n \tTimer t = new Timer(); \n\t\tTimerTask task = new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() { \n\t\t\t\tcreateNotif(intent);\n\t\t\t}\n\t\t};\n\t\tt.schedule(task, (long) (timeFromNow*1000));\n\t}", "private void createNotification(FoodEvents event) {\n Context context = getBaseContext();\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context).setSmallIcon(R.drawable.ic_launcher).setContentTitle(event.getTitle())\n .setContentText(event.getDescription());\n Intent resultIntent = new Intent(this, EventDetails.class);\n resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n resultIntent.putExtra(EventDetails.EXTRA_EVENT, event);\n PendingIntent resultPendingIntent = PendingIntent.getActivity(getBaseContext(), 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT, null);\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(MESSAGE_NOTIFICATION_ID, mBuilder.build());\n notifyMyWatch(event);\n }", "public static void createNotification(Context context, Reminder reminder) {\n Intent viewIntent = new Intent(context, MainScreen.class);\n viewIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n viewIntent.putExtra(\"NOTIFICATION_DISMISS\", true);\n PendingIntent pending = PendingIntent.getActivity(context, reminder.getId(), viewIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n /* // Create intent for notification snooze click behaviour\n Intent snoozeIntent = new Intent(context, SnoozeActionReceiver.class);\n snoozeIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingSnooze = PendingIntent.getBroadcast(context, reminder.getId(), snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n*/\n int imageResId = context.getResources().getIdentifier(reminder.getIcon(), \"drawable\", context.getPackageName());\n\n\n /*NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)\n .setSmallIcon(R.drawable.notification_icon)\n .setContentTitle(textTitle)\n .setContentText(textContent)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n */\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setSmallIcon(imageResId)\n .setColor(Color.parseColor(reminder.getColour()))\n .setStyle(new NotificationCompat.BigTextStyle().bigText(reminder.getContent()))\n .setContentTitle(reminder.getTitle())\n .setContentText(reminder.getContent())\n .setTicker(reminder.getTitle())\n .setContentIntent(pending);\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n\n /*if (sharedPreferences.getBoolean(\"checkBoxNagging\", false)) {\n Intent swipeIntent = new Intent(context, DismissReceiver.class);\n swipeIntent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingDismiss = PendingIntent.getBroadcast(context, reminder.getId(), swipeIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n builder.setDeleteIntent(pendingDismiss);\n\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MINUTE, sharedPreferences.getInt(\"nagMinutes\", context.getResources().getInteger(R.integer.default_nag_minutes)));\n calendar.add(Calendar.SECOND, sharedPreferences.getInt(\"nagSeconds\", context.getResources().getInteger(R.integer.default_nag_seconds)));\n Intent alarmIntent = new Intent(context, NagReceiver.class);\n AlarmUtil.setAlarm(context, alarmIntent, reminder.getId(), calendar);\n }*/\n\n String soundUri = sharedPreferences.getString(\"NotificationSound\", \"content://settings/system/notification_sound\");\n if (soundUri.length() != 0) {\n builder.setSound(Uri.parse(soundUri));\n }\n if (sharedPreferences.getBoolean(\"checkBoxLED\", true)) {\n builder.setLights(Color.BLUE, 700, 1500);\n }\n if (sharedPreferences.getBoolean(\"checkBoxOngoing\", false)) {\n builder.setOngoing(true);\n }\n if (sharedPreferences.getBoolean(\"checkBoxVibrate\", true)) {\n long[] pattern = {0, 300, 0};\n builder.setVibrate(pattern);\n }\n /*if (sharedPreferences.getBoolean(\"checkBoxMarkAsDone\", false)) {\n Intent intent = new Intent(context, DismissReceiver.class);\n intent.putExtra(\"NOTIFICATION_ID\", reminder.getId());\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, reminder.getId(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n builder.addAction(R.drawable.ic_done_white_24dp, context.getString(R.string.mark_as_done), pendingIntent);\n }\n if (sharedPreferences.getBoolean(\"checkBoxSnooze\", false)) {\n builder.addAction(R.drawable.ic_snooze_white_24dp, context.getString(R.string.snooze), pendingSnooze);\n }*/\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n builder.setPriority(Notification.PRIORITY_HIGH);\n }\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(reminder.getId(), builder.build());\n }", "public static void registerReceiver(Context context) {\n\n //Get the milliseconds for next hour\n Calendar calendar = Calendar.getInstance(TimeZone.getDefault());\n calendar.setTimeZone(TimeZone.getTimeZone(\"Asia/Calcutta\"));\n calendar.add(Calendar.HOUR_OF_DAY, 1);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n\n //Prepare the pending intent\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,\n REA_CODE_PENDING_INTENT,\n new Intent(context, TimeReminderReceiver.class),\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Set the alarm\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);\n } else {\n alarmManager.setExact(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);\n }\n\n Log.d(TAG, \"registerReceiver: Next alarm registered.\");\n }", "public void setAlarm (int alarm) { this.alarm = alarm; }", "private void createNotificationChannel() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"ReminderChannel\";\n String description = \"Hello channel\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"notifyAnkit\", name, importance);\n channel.setDescription(description);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "@Test\n public void testAlarmActive() {\n AlarmManager alarm = (AlarmManager) context.getSystemService(ALARM_SERVICE);\n Intent alarmIntent = new Intent(context, MyNotification.class);\n PendingIntent sendBroadcast = PendingIntent.getBroadcast(context, 0, alarmIntent, PendingIntent.FLAG_NO_CREATE);\n alarm.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()+60*1000, sendBroadcast);\n boolean active = (PendingIntent.getBroadcast(context,0,alarmIntent,PendingIntent.FLAG_NO_CREATE))!=null;\n assertFalse(\"failed, \",active);\n }", "public static void scheduleNextAlarm(Context context) {\n final Intent intent = new Intent(context, AlarmService.class);\n intent.setAction(ACTION_SCHEDULE_NEXT_ALARM);\n context.startService(intent);\n }", "private void showReminderNotification(Context context) {\n // inisialisasi channel id, channel name, judul notifikasi, pesan notifikasi, intent, dan id request\n String CHANNEL_ID = \"Channel_1\";\n String CHANNEL_NAME = \"Reminder Channel App\";\n String title = context.getString(R.string.reminder_app_title);\n String message = context.getString(R.string.reminder_app_message);\n Intent intent = new Intent(context, MainActivity.class);\n int REQUST_CODE_APP = 110;\n\n PendingIntent pendingIntent = TaskStackBuilder.create(context)\n .addNextIntent(intent)\n .getPendingIntent(REQUST_CODE_APP, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // statement ini berfungsi untuk membuat notifikasi kita dapat berkerja dengan sistem android\n NotificationManager notificationManager\n = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // mengset bunyi notifikasi, disini menggunakan bunyi default notifikasi pada sistem android\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n // method ini berfungsi untuk mengatur isi notifikasi\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)\n .setSmallIcon(R.drawable.ic_notifications_black_24dp) // set icon kecil notifikasi\n .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), // set icon besar notifikasi\n R.drawable.baseline_notification_important_white_48dp))\n .setContentTitle(title) // set judul notifikasi\n .setContentText(message) // set pesan notifikasi\n .setContentIntent(pendingIntent) // set aksi notifikasi\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000}) // set pola getar saat notifikasi\n .setSound(alarmSound); // set bunyi notifikasi yang akan digunakan\n\n // statement ini berfungsi supaya notifikasi yang telah dibuat dapat berjalan di android\n // dengan OS Oreo ke atas\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME,\n NotificationManager.IMPORTANCE_DEFAULT);\n\n channel.enableVibration(true);\n channel.setVibrationPattern(new long[]{1000, 1000, 1000, 1000, 1000});\n\n builder.setChannelId(CHANNEL_ID);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(channel);\n }\n }\n\n // statement ini berfungsi supaya notifikasi yang telah dibuat dapat berjalan di bawah\n // android dengan OS Oreo ke bawah\n Notification notification = builder.build();\n if (notificationManager != null) {\n notificationManager.notify(ID_APP, notification);\n }\n }", "@Scheduled(cron = \"0 0 8-10 * * *\")\n\tpublic void scheduleTaskHourly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 8 - 10 O'clock Every Day - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "@Override\n public void onClick(View v) {\n calendar.set(Calendar.HOUR_OF_DAY, alarm_timepicker.getHour());\n calendar.set(Calendar.MINUTE, alarm_timepicker.getMinute());\n\n // getting the int values of the hour and minute\n int hour = alarm_timepicker.getHour();\n int minute = alarm_timepicker.getMinute();\n\n //converting the int values to strings\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n // 10:4 -> 10:04\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n // method that changes the update text Textbox\n set_alarm_text(\"Alarm set to: \" + hour_string + \":\" + minute_string);\n\n\n // put in extra string into my_intent\n // tells the clock that you pressed the \"alarm on\" button\n my_intent.putExtra(\"extra\", \"alarm on\");\n\n //put in an extra long value into my intent\n //tells the clock that you want a certain value from the\n // dropdown menu/spinners\n my_intent.putExtra(\"alarm_choice\", choose_alarm_sound);\n\n // create a pending intent that delays the intent\n // until the specified calendar time\n pending_intent = PendingIntent.getBroadcast(MainActivity.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //set the alarm manager\n alarm_manager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n\n }", "private void scheduleNextAlarm() {\n // Cancel the currently scheduled Alarm in order to schedule the next.\n if (nextAlarm != null) {\n alarmManager.cancel(createAlarmIntent(this, nextAlarm.getId()));\n nextAlarm = null;\n }\n final Calendar calendar = Calendar.getInstance();\n Alarm alarm;\n int i = 0;\n do {\n // Look for an Alarm that is upcoming from the Calendar day and time.\n alarm = dailyDoDatabaseHelper.getNextAlarmForCalendarDay(calendar);\n if (alarm == null) {\n // If an Alarm was not found for the remainder of the day,\n // then check the next day starting midnight.\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.add(Calendar.DAY_OF_WEEK, 1);\n Log.d(CLASS_NAME, String.format(\"Checking next Calendar=%s for Alarm.\", calendar));\n }\n } while (alarm == null && i++ < 7);\n if (alarm != null) {\n nextAlarm = alarm;\n // Reusing the previous Calendar because it has scope of the future day.\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calendar.set(Calendar.MINUTE, alarm.getMinute());\n calendar.set(Calendar.SECOND, 0);\n alarmManager.set(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n createAlarmIntent(this, alarm.getId()));\n Log.d(CLASS_NAME, String.format(\"Alarm=%s was found, scheduled on Calendar=%s\", alarm.toString(), calendar.toString()));\n } else {\n Log.d(CLASS_NAME, \"No upcoming Alarm(s) found to schedule.\");\n }\n }", "public void setNextAlarm(){\n }", "TimerSchedule createTimerSchedule();", "public void startAlarm(){\r\n\t\tAlarm alarm = new Alarm(\"magAanvallen\", 1 / aanvallenPerSeconden);\r\n\t\talarm.addTarget(this);\r\n\t\talarm.start();\r\n\t}", "public void setAlarm(int time, String name){\n\t}", "ConferenceScheduleBuilderService createEventsFromStartToLunch();", "private static PendingIntent createResetIntent(Context context) {\n final Intent intent = new Intent(context, DailyResetBroadcastReceiver.class);\n return PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n }", "void simpleNotify(SimpleAlarmMessage message);", "private static List<LocalDateTime> createEmptyFutureSchedule(int days) {\n List<LocalDateTime> emptySchedule = new ArrayList<>();\n LocalDateTime dateTime = LocalDateTime.now();\n dateTime = dateTime.minusMinutes(dateTime.getMinute());\n dateTime = dateTime.minusSeconds(dateTime.getSecond());\n dateTime = dateTime.minusNanos(dateTime.getNano());\n int delta = Constant.END_WORKING_DAY_HOUR - dateTime.getHour();\n for (int i = 1; i < Constant.HOURS_PER_DAY * days + delta; i++) {\n LocalDateTime timeCell = dateTime.plusHours(i);\n if (timeCell.getHour() < Constant.END_WORKING_DAY_HOUR && timeCell.getHour() >= Constant.START_WORKING_DAY_HOUR && !timeCell.getDayOfWeek().equals(DayOfWeek.SUNDAY)) {\n emptySchedule.add(timeCell);\n }\n }\n return emptySchedule;\n }", "public static void setAlarm(Context context) {\n Intent i = new Intent(context, AlarmManagerHandler.class);\n\n //helps in creating intent that must be fired at some later time\n PendingIntent pi = PendingIntent.getService(context, 0, i, 0);\n\n //schedule a repeating alarm; they are inexact\n AlarmManager mgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n mgr.setRepeating(\n AlarmManager.ELAPSED_REALTIME, //type of time(UTC, elapsed) & wake mobile or not\n SystemClock.elapsedRealtime() + PERIOD, //trigger at Milliseconds; time at which alarm should go off\n PERIOD, //interval in Milliseconds between subsequent repeat of alarm\n pi //action to perform when alarm goes off pending intent\n );\n }", "public static void scheduleRestartOfService(Context context)\n\t{\n\t\tCalendar cal = Calendar.getInstance();\n\t\t// add frequency hours to the calendar object\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t//cal.add(Calendar.MINUTE, 5);\n\n\t\tPendingIntent pendingIntent = PendingIntent.getService(context, 0, \n\t\t\t\tnew Intent(\"org.bewellapp.ServiceControllers.BestSleepLib.BestSleepComputationService\"), PendingIntent.FLAG_CANCEL_CURRENT);\n\n\t\t// Get the AlarmManager service\n\t\tAlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\t\tam.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), pendingIntent);\n\t}", "@Override\n public void onClick(View v) {\n\n title = mTitle.getText().toString();\n details = mDetails.getText().toString();\n repeats = 0;\n date.setHours(hour);\n date.setMinutes(minute);\n try {\n repeats = Integer.parseInt(mRepeats.getText().toString());\n } catch (NumberFormatException io){\n\n }\n if (mSpinner.getSelectedItem().toString().equals(\"Days\")) {\n repeats = repeats*24*60;\n }\n else if (mSpinner.getSelectedItem().toString().equals(\"Hours\")) {\n repeats = repeats*60;\n }\n Assignment newAssignment = new Assignment(title, details, repeats, date);\n AssignmentList.get(getActivity()).addAssignment(newAssignment);\n //Calendar c = Calendar.getInstance();\n //c.setTime(date);\n mScheduleClient.setAlarmForNotification(newAssignment); // tell service to set alarm for this date\n // (talks to client which then talks to service)\n if (mScheduleClient!=null) {\n mScheduleClient.doUnbindService();\n }\n getActivity().finish();\n\n }", "private void schedule(PlanRecord plan, Context context) {\n Date d = null;\n\n try {\n DateTime test = new DateTime();\n test.setStringSQL(plan.offset);\n d = test.getYearMonthDay();\n } catch (java.text.ParseException e) {\n Log.e(\"PlanReceiver-schedule\", \"Couldn't schedule \" + plan.name + \"\\n e:\" + e);\n e.printStackTrace();\n }\n\n Log.e(\"PlanReceiver-schedule\", \"d.year=\" + (d.getYear() + 1900) + \" d.date=\" + d.getDate() + \" d.month=\" + d.getMonth());\n\n Calendar firstRun = new GregorianCalendar(d.getYear() + 1900, d.getMonth(), d.getDate());\n Log.e(\"PlanReceiver-schedule\", \"FirstRun:\" + firstRun);\n\n Intent intent = new Intent(context, PlanReceiver.class);\n intent.putExtra(\"plan_id\", plan.id);\n intent.putExtra(\"plan_acct_id\", plan.acctId);\n intent.putExtra(\"plan_name\", plan.name);\n intent.putExtra(\"plan_value\", plan.value);\n intent.putExtra(\"plan_type\", plan.type);\n intent.putExtra(\"plan_category\", plan.category);\n intent.putExtra(\"plan_memo\", plan.memo);\n intent.putExtra(\"plan_offset\", plan.offset);\n intent.putExtra(\"plan_rate\", plan.rate);\n intent.putExtra(\"plan_next\", plan.next);\n intent.putExtra(\"plan_scheduled\", plan.scheduled);\n intent.putExtra(\"plan_cleared\", plan.cleared);\n\n //Parse Rate (token 0 is amount, token 1 is type)\n final String phrase = plan.rate;\n final String[] tokens = phrase.split(\"[ ]+\");\n\n final PendingIntent sender = PendingIntent.getBroadcast(context, Integer.parseInt(plan.id), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //Get the AlarmManager service\n final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n\n final Locale locale = context.getResources().getConfiguration().locale;\n final DateTime nextRun = new DateTime();\n\n if (tokens[1].contains(\"Days\")) {\n Log.d(\"PlanReceiver-schedule\", \"Days\");\n\n //If Starting Time is in the past, fire off next day(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.DAY_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY), sender);\n } else if (tokens[1].contains(\"Weeks\")) {\n Log.d(\"PlanReceiver-schedule\", \"Weeks\");\n\n //If Starting Time is in the past, fire off next week(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), (Integer.parseInt(tokens[0]) * AlarmManager.INTERVAL_DAY) * 7, sender);\n } else if (tokens[1].contains(\"Months\")) {\n Log.d(\"PlanReceiver-schedule\", \"Months\");\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(cal.getTimeInMillis());\n cal.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n\n //If Starting Time is in the past, fire off next month(s)\n while (firstRun.before(Calendar.getInstance())) {\n firstRun.add(Calendar.MONTH, Integer.parseInt(tokens[0]));\n }\n\n Log.d(\"PlanReceiver-schedule\", \"firstRun is \" + firstRun);\n\n nextRun.setCalendar(firstRun);\n\n ContentValues planValues = new ContentValues();\n planValues.put(DatabaseHelper.PLAN_NEXT, nextRun.getSQLDate(locale));\n context.getContentResolver().update(Uri.parse(MyContentProvider.PLANS_URI + \"/\" + plan.id), planValues, DatabaseHelper.PLAN_ID + \"=\" + plan.id, null);\n\n am.setRepeating(AlarmManager.RTC_WAKEUP, firstRun.getTimeInMillis(), cal.getTimeInMillis(), sender);\n } else {\n Log.e(\"PlanReceiver-schedule\", \"Could not set alarm; Something wrong with the rate\");\n }\n\n }", "public void setWaterReminder(int hourGap, String userID) {\n \tif (hourGap ==0) \n \t\treturn;\n \t\n \tTimer timer = new Timer ();\n \tTimerTask hourlyTask = new TimerTask () {\n \t @Override\n \t public void run () {\n \t // your code here...\n \tTextMessage textMessage = new TextMessage(\"It is time to drink your water :)\");\n \tPushMessage pushMessage = new PushMessage(userID, textMessage);\n \ttry {\n \tResponse<BotApiResponse> response =\n \t LineMessagingServiceBuilder\n \t .create(\"CJo3Ka/VX7VW4fsG78i5dNDpP5qqYgr1PD7YUclFFc62ZtnrIpHiM/Muof6oLc/J/bPoaheiYdHNoUkg09kAt5VqnD+tMyzOCClGLwvJaR3+etoVOdsHo1DGXv2UqOljNgUIFR/zQWk1U4iFRPr4TQdB04t89/1O/w1cDnyilFU=\") // channel access token\n \t .build()\n \t .pushMessage(pushMessage)\n \t .execute();\n \tSystem.out.println(response.code() + \" \" + response.message());\n \t}\n \tcatch (Exception e) {\n \t\te.printStackTrace();\n \t}\n \t }\n \t};\n\n \t// schedule the task to run starting now and then every hour...\n \ttimer.schedule (hourlyTask, 0l, 1000*60*60*hourGap);\n\n\t}", "public static void scheduleReminderNow(Context ct,ContentValues itemData){\r\n //Building the intent\r\n ComponentName cpnName=new ComponentName(ct, ReminderService.class);\r\n //Send the new item information to the service\r\n PersistableBundle persitBundle=DataConvertingHelper.ToPersitable.fromContentValue(itemData);\r\n //Create a Notification with id of the item\r\n JobInfo.Builder jobInfoBuilder=new JobInfo.Builder(itemData.getAsInteger(dtbConst.ITEM_TABLE_COLS[0]),cpnName);\r\n jobInfoBuilder\r\n .setMinimumLatency(0)\r\n .setOverrideDeadline(0)\r\n .setPersisted(true)\r\n .setExtras(persitBundle);\r\n JobInfo jobinfo=jobInfoBuilder.build();\r\n JobScheduler scheduler=(JobScheduler)ct.getSystemService(Context.JOB_SCHEDULER_SERVICE);\r\n scheduler.schedule(jobinfo);\r\n }", "@Override\n public void onClick(View v) {\n Calendar calendar = Calendar.getInstance();\n Date now = calendar.getTime();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n Alarm alarm = new Alarm();\n alarm.setHour(hour);\n alarm.setMinute(minute);\n\n mAlarmClockViewModel.insertNewAlarmClock(alarm);\n AlarmClock currentClock = (AlarmClock) mRecyclerView.findViewById(R.id.alarm_clock_item);\n currentClock.setDate(now);\n }", "Schedule createSchedule();", "private void setDay() {\n Boolean result = false;\n for (int i = 0; i < 7; ++i) {\n if(mAlarmDetails.getRepeatingDay(i))\n result = true;\n mAlarmDetails.setRepeatingDay(i, mAlarmDetails.getRepeatingDay(i));\n }\n if(!result)\n mAlarmDetails.setRepeatingDay((Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1), true);\n }", "public void setReminder(Context context, String type, String time, String message){\n AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, ReminderReceiver.class);\n intent.putExtra(EXTRA_MESSAGE,message);\n intent.putExtra(EXTRA_TYPE,type);\n String timeArray[] = time.split(\":\");\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY,Integer.parseInt(timeArray[0]));\n calendar.set(Calendar.MINUTE,Integer.parseInt(timeArray[1]));\n calendar.set(Calendar.SECOND,0);\n\n int requestCode = NOTIF_ID_REMINDER;\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,requestCode,intent,0);\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);\n\n Toast.makeText(context,\"Reminder berhasil disimpan\",Toast.LENGTH_SHORT).show();\n }", "public void updateAlarmTime (){\r\n\t\tint newHour, newMinut;\r\n\t\t\r\n\t\tif (relative) { //Before\r\n\t\t\tnewMinut = reference.getMinutes() - alarmMinutes;\r\n\t\t\tnewHour = reference.getHours() - alarmHours - ((newMinut<0)?1:0);\r\n\t\t\tnewMinut = (newMinut<0)?newMinut+60:newMinut;\r\n\t\t\tnewHour = (newHour<0)?newHour+24:newHour;\r\n\t\t} else {\r\n\t\t\tnewMinut = reference.getMinutes() + alarmMinutes;\r\n\t\t\tnewHour = reference.getHours() + alarmHours + ((newMinut>=60)?1:0);\r\n\t\t\tnewMinut = (newMinut>=60)?newMinut-60:newMinut;\r\n\t\t\tnewHour = (newHour>=240)?newHour-24:newHour;\r\n\t\t}\r\n\r\n\t\tthis.alarmTime.setHours(newHour);\r\n\t\tthis.alarmTime.setMinutes(newMinut);\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n\n long when = System.currentTimeMillis();\n NotificationManager notificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent notificationIntent = new Intent(context, MainActivity.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,\n notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n NotificationCompat.Builder mNotifyBuilder = new NotificationCompat.Builder(\n context).setSmallIcon(R.drawable.ic_file_download)\n .setContentTitle(\"App of the Day\")\n .setContentText(\"Get today's App of the Day...\").setSound(alarmSound)\n .setAutoCancel(true).setWhen(when)\n .setContentIntent(pendingIntent)\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000});\n notificationManager.notify(MID, mNotifyBuilder.build());\n MID++;\n\n }", "public void cancelAlarm(Context context, Alarm alarm) {\n // instantiate the system alarm service manager\n alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // instantiate an intent for the AlarmReciever\n Intent intent = new Intent(context, AlarmReceiver.class);\n intent.putExtra(\"alarmId\", alarm.getId());\n // check if the alarm is recurring, if it is each days alarm is canceled by multiplying\n // the id by 10 and adding the integer representation of each day\n if (alarm.isRecurring()) {\n for (Integer day : alarm.getDays()) {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId()).intValueExact() * 10 + day, intent, 0);\n // cancel the scheduled alarm for the intent\n alarmMgr.cancel(alarmIntent);\n }\n // if it isn't recurring, just cancel the one alarm\n } else {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId()).intValueExact() * 10, intent, 0);\n // cancel the scheduled alarm for the intent\n alarmMgr.cancel(alarmIntent);\n }\n }", "public void scheduleNotification(Context context, long delay, int notificationId, Pills p) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"pills\")\n .setContentTitle(p.getName())\n .setContentText(\"Não se esqueça de tomar o seu \"+ p.getName() + \" às \" + p.getTime())\n .setAutoCancel(true)\n .setSmallIcon(R.mipmap.logo)\n .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))\n .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n Intent intent = new Intent(context, c.getClass());\n PendingIntent activity = PendingIntent.getActivity(context, notificationId, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n builder.setContentIntent(activity);\n\n Notification notification = builder.build();\n\n Intent notificationIntent = new Intent(context, MyNotificationPublisher.class);\n notificationIntent.putExtra(MyNotificationPublisher.NOTIFICATION_ID, notificationId);\n notificationIntent.putExtra(MyNotificationPublisher.NOTIFICATION, notification);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, notificationId, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);\n\n long futureInMillis = SystemClock.elapsedRealtime() + delay;\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, futureInMillis, pendingIntent);\n Log.d(ContentValues.TAG, \"Scheduling\");\n }" ]
[ "0.67759943", "0.66360855", "0.651858", "0.6473729", "0.6422872", "0.6406478", "0.63707376", "0.62779546", "0.6260845", "0.6253442", "0.6249204", "0.622791", "0.62025064", "0.6139594", "0.61181957", "0.60956675", "0.6037336", "0.5995204", "0.5970118", "0.5891327", "0.5868383", "0.5776862", "0.5774662", "0.5739844", "0.5734934", "0.5728248", "0.5669371", "0.56324863", "0.56166387", "0.55943084", "0.5588409", "0.5583511", "0.5560616", "0.5552381", "0.5536394", "0.55037034", "0.5497224", "0.5496978", "0.549165", "0.54872656", "0.5473611", "0.54218537", "0.54188085", "0.54035723", "0.54032737", "0.5393939", "0.53882027", "0.5388025", "0.5377477", "0.5370716", "0.5368384", "0.5357994", "0.53577346", "0.53546673", "0.5348978", "0.5329902", "0.53237504", "0.5306491", "0.52910024", "0.5288374", "0.52822393", "0.5278978", "0.52695435", "0.52678984", "0.5264096", "0.52498764", "0.5233588", "0.5226646", "0.5216798", "0.52082473", "0.5206826", "0.5190841", "0.51827407", "0.51805824", "0.51768637", "0.51767325", "0.51681256", "0.51458997", "0.51329416", "0.5120772", "0.5119565", "0.51169074", "0.5108783", "0.51075137", "0.5085956", "0.50847733", "0.5082638", "0.50807774", "0.507957", "0.50695527", "0.50661457", "0.5064827", "0.50646955", "0.5060161", "0.505967", "0.5057058", "0.50552905", "0.5055135", "0.5051101", "0.50494856" ]
0.5857801
21
Sets the Text of all TextViews based on the current book information. Also sets values of any rating bars and adds the reviews to the screen.
private void displayBookInfo(){ //Set text of TextViews mTitle.setText(currentBook.title); mAuthors.setText(currentBook.authors); mDescription.setText(currentBook.description); mAvgRating.setText(String.format("%.01f", currentBook.averageRating)); mBookRating.setRating(currentBook.averageRating); //Concatenate string and set text to string String numRatingsString = String.valueOf(currentBook.numRatings) + " Ratings"; mNumRatings.setText(numRatingsString); //Concatenate strings before setting them String titleString = "Title: " + currentBook.title; String authorsString = "Authors: " + currentBook.authors; String subjectString = "Subject: " + currentBook.subject; String copiesString = "Library Copies: " + currentBook.numCopies; String ISBN10String = "ISBN10: " + currentBook.ISBN10; String ISBN13String = "ISBN13: " + currentBook.ISBN13; //Set text data mFullTitle.setText(titleString); mFullAuthors.setText(authorsString); mSubject.setText(subjectString); mCopies.setText(copiesString); mISBN10.setText(ISBN10String); mISBN13.setText(ISBN13String); //Hide subtitle if it doesn't exist if(currentBook.subTitle.length() < 2) mSubTitle.setVisibility(GONE); else mSubTitle.setText(currentBook.subTitle); //Get reviews reviews = currentBook.reviews; //Add first 3 reviews, unless there are less than 3 reviews - Then add all reviews int upperBound = ((reviews.size() - 1) > 1)?2:(reviews.size()-1); reviewAdapter(reviews, mReviews, 0, upperBound, true); //If there are 3 reviews or less, then hide the see all button if(reviews.size() < 4) mSeeAll.setVisibility(GONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateViews() {\n this.titleTextView.setText(title);\n this.authorTextView.setText(author);\n this.yearTextView.setText(String.valueOf(year));\n this.publisherTextView.setText(publisher);\n if (endsDate != \"\") {\n this.lentToDateTextView.setText(endsDate);\n } else {\n this.lentToDateTextView.setVisibility(View.GONE);\n this.lentToDateLabelTextView.setVisibility(View.GONE);\n }\n }", "private void updateViews() {\n titleTextView.setText(currentVolume.getTitle());\n descTextView.setText(Html.fromHtml(currentVolume.getDesc(), Html.FROM_HTML_MODE_COMPACT));\n authorsTextView.setText(currentVolume.getAuthors());\n\n retrieveImage();\n }", "private void populateTextViews() {\n full_name_tv.setText(contact.getFullName());\n school_tv.setText(contact.getSchool());\n department_tv.setText(getDepartmentString());\n email.setText(contact.getEmail());\n number_tv.setText(contact.getNumber());\n }", "private void setupTextView() {\n painterTextViewMoves = findViewById(R.id.painterTextView1);\n painterTextViewTime = findViewById(R.id.painterTextView2);\n painterTextViewPoints = findViewById(R.id.painterTextView3);\n painterTextViewInstructions = findViewById(R.id.painterInstructionsView);\n }", "public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }", "private void updateText() {\n updateDateText();\n\n TextView weightText = findViewById(R.id.tvWeight);\n TextView lowerBPText = findViewById(R.id.tvLowerBP);\n TextView upperBPText = findViewById(R.id.tvUpperBP);\n\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n\n double weight = mUser.weight.getWeightByDate(mDate.getTime());\n int upperBP = mUser.bloodPressure.getUpperBPByDate(mDate.getTime());\n int lowerBP = mUser.bloodPressure.getLowerBPByDate(mDate.getTime());\n\n weightText.setText(String.format(Locale.getDefault(), \"Paino\\n%.1f\", weight));\n lowerBPText.setText(String.format(Locale.getDefault(), \"AlaP\\n%d\", lowerBP));\n upperBPText.setText(String.format(Locale.getDefault(), \"YläP\\n%d\", upperBP));\n\n ((EditText)findViewById(R.id.etWeight)).setText(\"\");\n ((EditText)findViewById(R.id.etLowerBP)).setText(\"\");\n ((EditText)findViewById(R.id.etUpperBP)).setText(\"\");\n }", "private void setViews() {\n\n TextView currentApixu = findViewById(R.id.currentApixu);\n TextView currentOwm = findViewById(R.id.currentOwm);\n TextView currentWu = findViewById(R.id.currentWu);\n\n currentApixu.setText(feedValues[0]);\n currentOwm.setText(feedValues[1]);\n currentWu.setText(feedValues[2]);\n }", "public void setDetails(){\n\n TextView moviename = (TextView) findViewById(R.id.moviename);\n TextView moviedate = (TextView) findViewById(R.id.moviedate);\n TextView theatre = (TextView) findViewById(R.id.theatre);\n\n TextView seats = (TextView) findViewById(R.id.seats);\n\n moviename.setText(ticket.movieName);\n moviedate.setText(ticket.getMovieDate());\n theatre.setText(ticket.theatreDetails);\n\n seats.setText(ticket.seats);\n }", "public void updateTextViews() {\n // Set the inputs according to the initial input from the entry.\n //TextView dateTextView = (TextView) findViewById(R.id.date_textview);\n //dateTextView.setText(DateUtils.formatDateTime(getApplicationContext(), mEntry.getStart(), DateUtils.FORMAT_SHOW_DATE));\n\n EditText dateEdit = (EditText) findViewById(R.id.date_text_edit);\n dateEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_ABBREV_ALL));\n\n EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);\n startTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_SHOW_TIME));\n\n EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);\n endTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getEnd(), DateUtils.FORMAT_SHOW_TIME));\n\n\n TextView descriptionView = (TextView) findViewById(R.id.description);\n descriptionView.setText(mEntry.getDescription());\n\n\n enableSendButtonIfPossible();\n }", "private void setStatTextViews() {\n TextView numLives = findViewById(R.id.lives);\n numLives.setText(String.valueOf(player.getLives()));\n\n TextView multiplier = findViewById(R.id.currMultiply);\n multiplier.setText(String.valueOf(player.getMultiplier()));\n\n TextView totalPoint = findViewById(R.id.currScore);\n totalPoint.setText(String.valueOf(player.getPoints()));\n }", "private void setUpTextViews() {\n // Find views\n TextView userName0 = (TextView) findViewById(R.id.user_name_0);\n TextView userInfo0 = (TextView) findViewById(R.id.user_info_0);\n TextView userName1 = (TextView) findViewById(R.id.user_name_1);\n TextView userInfo1 = (TextView) findViewById(R.id.user_info_1);\n TextView userName2 = (TextView) findViewById(R.id.user_name_2);\n TextView userInfo2 = (TextView) findViewById(R.id.user_info_2);\n\n // Set text\n userName0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(0).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(1).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(2).getString(ParseConstants.KEY_HOMETOWN)));\n }", "private void updateInformation(){\n view.getPrompt().setText(getPrompt());\n view.getScore().setText(getScore());\n }", "private void populateUI() {\n\n tipPercentTextView.setText(Double.toString(tipPercent));\n noPersonsTextView.setText(Integer.toString(noPersons));\n populateResultsUI();\n }", "private void populateResultsUI(){\n\n totalPayTextView.setText(Double.toString(totalPay));\n totalTipTextView.setText(Double.toString(totalTip));\n totalPerPersonTextView.setText(Double.toString(totalPerPerson));\n }", "private void setTextViews() {\n TextView textToggleFilters = (TextView) findViewById(R.id.text_totalExpenditure);\n textToggleFilters.setPaintFlags(textToggleFilters.getPaintFlags() | Paint.FAKE_BOLD_TEXT_FLAG);\n }", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "private void loadReviews(){\n cursor = db.rawQuery(\"SELECT * FROM REVIEW WHERE BookID = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n List<String[]> reviews = new ArrayList<>();\n double sumRating = 0;\n\n while(cursor.moveToNext()){\n String[] arr ={\n String.valueOf(cursor.getInt(0)),\n String.valueOf(cursor.getDouble(3)),\n cursor.getString(2)\n };\n reviews.add(arr);\n sumRating += cursor.getDouble(3);\n }\n setRatingTotal( sumRating / reviews.size() );\n //Toast.makeText(this, ratingTotal+\" = \"+sumRating+\" / \"+reviews.size(), Toast.LENGTH_SHORT).show();\n ratingBarTotal = findViewById(R.id.rvRatingBarTotal);\n ratingBarTotal.setRating((float) ratingTotal);\n\n txtNumRv = findViewById(R.id.rvTxtNumRv);\n txtNoRv = findViewById(R.id.rvTxtNoReview);\n DecimalFormat df = new DecimalFormat(\"#.##\");\n if(reviews.size() == 0){\n txtNumRv.setText( R.string.noReviewsYet );\n } else {\n txtNumRv.setText(df.format(ratingTotal) + \" / \" + reviews.size() + \" reviews\");\n txtNoRv.setVisibility(View.INVISIBLE);\n }\n\n listView = findViewById(R.id.rvListView);\n listView.setAdapter(adapter = new ReviewAdapter(reviews));\n\n }", "private void setAllText(){\n if(route!=null){\n routeImageView.setImageBitmap(route.getImg());\n transportTextView.setText(\"Transport: \" + route.getTransport());\n speedTextView.setText(String.valueOf(\"Speed: \" + route.getSpeed() + \" Km/h \"));\n accuracyTextView.setText(String.valueOf(\"Accuracy: \" + route.getAccuracy()));\n distanceTextView.setText(String.valueOf(\"Distance: \" + route.getDistance() + \" Km\"));\n timestampTextView.setText(\"Start: \" + route.getTimestamp());\n durationTextView.setText(\" Duration: \" + route.getDuration());\n caloriesTextView.setText(\"Calories: \" + route.getCalories() + \" Kcal\");\n if(!route.getTransport().equals(\"Walking\")){\n caloriesTextView.setText(\"Calories: -.- Kcal\");\n }\n descriptionTextView.setText(\"Description: \" + route.getDescription());\n if(route.getDescription().isEmpty()){\n descriptionTextView.setText(\"\");\n }\n\n }\n\n }", "@Override\n\tprotected void setupWidgets() {\n\t\tmHeaderText = (TextView) findViewById(R.id.textViewHeader);\n\t\tmBrandText = (TextView) findViewById(R.id.textViewBrand);\n\t\tmModelText = (TextView) findViewById(R.id.textViewModel);\n\t\tmColorText = (TextView) findViewById(R.id.textViewColor);\n\t\tmSeatsText = (TextView) findViewById(R.id.textViewSeats);\n\t\tmPlateText = (TextView) findViewById(R.id.textViewPlate);\n\t\tmFuelText = (TextView) findViewById(R.id.textViewFuel);\n\t\tmConsumptionText = (TextView) findViewById(R.id.textViewConsumption);\n\t}", "public void setPage(View view){\n\n HashMap movie = movieDataJson.getItem(0);\n\n String movieName = (String)movie.get(\"name\");\n String movieStars = (String)movie.get(\"stars\");\n String movieYear = (String)movie.get(\"year\");\n String movieDescription = (String)movie.get(\"description\");\n movieDescrip = movieDescription;\n String movieDirector = (String)movie.get(\"director\");\n String movieLength = (String)movie.get(\"length\");\n double movieRating = (double)movie.get(\"rating\");\n\n\n movieNameTV = (TextView)view.findViewById(R.id.movieName);\n movieStarsIV = (TextView)view.findViewById(R.id.stars);\n movieYearIV = (TextView)view.findViewById(R.id.year);\n movieDescriptionIV = (TextView)view.findViewById((R.id.description));\n movieDirectorIV = (TextView)view.findViewById(R.id.director);\n movieLengthIV = (TextView)view.findViewById(R.id.length);\n movieRatingIV = (TextView)view.findViewById(R.id.rating);\n movieRatingBar = (RatingBar)view.findViewById(R.id.ratingBar);\n\n movieNameTV.setText(movieName);\n movieStarsIV.setText(movieStars);\n movieDescriptionIV.setText(movieDescription);\n movieYearIV.setText(\"(\"+movieYear+\")\");\n movieDirectorIV.setText(movieDirector);\n movieLengthIV.setText(movieLength);\n movieRatingIV.setText(String.valueOf(movieRating)+\"/10\");\n movieRatingBar.setRating((float)movieRating/2);\n }", "private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n setDate();\n setISBN();\n setDescription();\n setPageCount();\n setNumRatings();\n }", "private void updateTextViews(String timeStamp,\n boolean isGi, int amount, String stress, String tired, boolean isPhysicallyActive,\n boolean hasAlcoholConsumed,\n boolean isIll, boolean takesMedication, boolean hasPeriod,\n int mv0, int mv15, int mv30, int mv45, int mv60,\n int mv75, int mv90, int mv105, int mv120) {\n\n /* Update text views */\n\n // Time information\n mBinding.date.setText(\n Converter.convertTimeStampToDate(timeStamp));\n\n mBinding.time\n .setText(Converter.convertTimeStampToTimeStart(timeStamp));\n\n // Advance information\n\n mBinding.amount.setText(Converter.convertInteger(amount));\n\n // If GI measurement disable amount text field\n if (isGi) {\n mBinding.amount.setEnabled(false);\n }\n\n mBinding.stress.setText(stress);\n mBinding.tired.setText(tired);\n mBinding.physicallyActive.setChecked(isPhysicallyActive);\n mBinding.alcoholConsumed.setChecked(hasAlcoholConsumed);\n\n // Events\n mBinding.ill.setChecked(isIll);\n mBinding.medication.setChecked(takesMedication);\n mBinding.period.setChecked(hasPeriod);\n\n // Glucose Values\n mBinding.mv0.setText(Converter.convertIntegerMeasurement(mv0));\n mBinding.mv15.setText(Converter.convertIntegerMeasurement(mv15));\n mBinding.mv30.setText(Converter.convertIntegerMeasurement(mv30));\n mBinding.mv45.setText(Converter.convertIntegerMeasurement(mv45));\n mBinding.mv60.setText(Converter.convertIntegerMeasurement(mv60));\n mBinding.mv75.setText(Converter.convertIntegerMeasurement(mv75));\n mBinding.mv90.setText(Converter.convertIntegerMeasurement(mv90));\n mBinding.mv105.setText(Converter.convertIntegerMeasurement(mv105));\n mBinding.mv120.setText(Converter.convertIntegerMeasurement(mv120));\n }", "public void setTexts(BuyerValues buyer) {\n\t\t\tBuyerIDtextField.setText(buyer.getBuyerId());\n\t\t\tBuyerNametextField.setText(buyer.getBuyerName());\n\t\t\tBuyerAgetextField.setText(buyer.getBuyerAge().toString());\n\t\t\tBuyerAddresstextField.setText(buyer.getBuyerAddress());\n\t\t\tBuyerCitytextField.setText(buyer.getBuyerCity());\n\t\t\tBuyerStatetextField.setText(buyer.getBuyerState());\n\t\t\tBuyerZIPtextField.setText(buyer.getBuyerZIP());\n\t\t\tContactNumbertextField.setText(buyer.getBuyerContactNumber());\t\n\t}", "public void TextView_Config(){\n textviewBaro=(TextView) findViewById(R.id.textviewGravity);\n textviewAcceleration=(TextView) findViewById(R.id.textviewAcceleration);\n textviewGyro=(TextView) findViewById(R.id.textviewGyro);\n display=(TextView)findViewById(R.id.textView1);\n }", "private void updateText(int nr, View v) {\n if (v.equals(teamAScoreButton)) {\n teamAScoreTextView.setText(String.valueOf(nr));\n } else if (v.equals(teamBScoreButton)) {\n teamBScoreTextView.setText(String.valueOf(nr));\n } else if (v.equals(teamAFaultButton)) {\n teamAFaultTextView.setText(String.valueOf(nr));\n } else if (v.equals(teamBFaultButton)) {\n teamBFaultTextView.setText(String.valueOf(nr));\n }\n }", "private void fillTextViewContent(){\n if(mPhotoInfo != null){\n if(mPhotoInfo.getOwner().getRealname()!= null){\n mOwner = mPhotoInfo.getOwner().getRealname();\n }else if(mPhotoInfo.getOwner().getUsername() != null){\n mOwner = mPhotoInfo.getOwner().getUsername();\n }\n\n if(mOwner != null && mOwner.length() > 0){\n mOwnerTv.setText(mOwner);\n }else{\n mOwnerTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getTitle() != null){\n mTitle = mPhotoInfo.getTitle().getContent();\n }\n\n if(mTitle != null && mTitle.length() > 0){\n if(mTitle.length() > 120){\n mTitle = mTitle.substring(0,120) + \"...\";\n }\n mTitleTv.setText(mTitle);\n }else{\n mTitleTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDescription() != null){\n mDesc = mPhotoInfo.getDescription().getContent();\n }\n\n if(mDesc != null && mDesc.length() > 0){\n if(mDesc.length() > 120){\n mDesc = mDesc.substring(0,120) + \"...\";\n }\n mDescTv.setText(mDesc);\n }else{\n mDescTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDateuploaded() != null){\n mDates = mPhotoInfo.getDateuploaded();\n }\n\n if(mDates != null && mDates.length() > 0){\n SimpleDateFormat simpleDateFormat =\n new SimpleDateFormat(\"MM/dd/yyyy\", Locale.getDefault());\n Date date = new Date(System.currentTimeMillis() - Long.parseLong(mDates));\n mDatesTv.setText(simpleDateFormat.format(date));\n }else{\n mDatesTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getViews() != null){\n mViews = mPhotoInfo.getViews();\n }\n\n if(mViews != null && mViews.length() > 0){\n mViewsTv.setText(mViews);\n }else{\n mViewsTv.setText(R.string.info_not_available);\n }\n }\n }", "public void setViews(){\n mtvNome.setText(name);\n mTvUsername.setText(username);\n }", "private void updateCounterView(String text) {\n final String txt = text;\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if(txt!=null) {\n pointsLeftView.setText(txt);\n } else {\n pointsLeftView.setText(Integer.toString(counter));\n }\n }\n });\n }", "public void setRatingText(String ratingText) {\n this.ratingText = ratingText;\n }", "private void setupViews() {\n ivBack.setVisibility(View.VISIBLE);\n if (isCreateDeal) {\n tvTitle.setText(getString(R.string.create_deal));\n btnDone.setVisibility(View.VISIBLE);\n btnDone.setText(R.string.done);\n etEndTime.setText(appUtils.parseToTimeAndDate(pickUpTime));\n\n } else {\n tvTitle.setText(getString(R.string.deactivated_deal));\n btnDone.setVisibility(View.VISIBLE);\n btnDone.setText(R.string.activate);\n\n if (dealData != null) {\n etTitle.setText(dealData.getDealTitle());\n etTitle.setSelection(etTitle.getText().length());\n etDescription.setText(dealData.getDealDescription());\n etTotalItems.setText(dealData.getTotalItems());\n etOriginalPrice.setText(dealData.getOriginalPrice());\n tvNewPrice.setText(dealData.getNewPrice());\n double discount = (Double.parseDouble(dealData.getOriginalPrice()) -\n Double.parseDouble(dealData.getNewPrice())) / Double.parseDouble(dealData.getOriginalPrice()) * 100;\n String perc = discount + getString(R.string.percent_symbol);\n tvDiscountPerc.setText(perc);\n seekbarNewprice.setProgress((int) discount / 5);\n etBeginTime.setText(appUtils.parseToTimeAndDate(dealData.getStartTime()));\n etEndTime.setText(appUtils.parseToTimeAndDate(dealData.getEndTime()));\n }\n }\n }", "private void setQuestionView() {\n textView.setText(currentQuestion.getQuestion());\n buttonA.setText(currentQuestion.getOptA());\n buttonB.setText(currentQuestion.getOptB());\n buttonC.setText(currentQuestion.getOptC());\n numberText.setText(\"Question \" + (questionID + 1) + \" of \" + questionList.size());\n questionID++;\n }", "private void fillTextViews(String title, String description,\n\t\t\tString directions) {\n\t\t// AS: first create the edit text objects\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\t// AS: then set the text views\n\t\tetTitle.setText(title);\n\t\tetDescription.setText(description);\n\t\tetDirections.setText(directions);\n\n\t\t// AS: save the original key listeners\n\t\ttitleListener = etTitle.getKeyListener();\n\t\tdescriptionListener = etDescription.getKeyListener();\n\t\tdirectionsListener = etDirections.getKeyListener();\n\n\t\t// AS: then set them to be uneditable\n\t\tetTitle.setKeyListener(null);\n\t\tetDescription.setKeyListener(null);\n\t\tetDirections.setKeyListener(null);\n\n\t}", "public void setUpFields() {\n //Assigning each of the warning to relevant TextViews\n warning1 = findViewById(R.id.tvWarning1);\n warning2 = findViewById(R.id.tvWarning2);\n warning3 = findViewById(R.id.tvWarning3);\n warning4 = findViewById(R.id.tvWarning4);\n warning5 = findViewById(R.id.tvWarning5);\n warning6 = findViewById(R.id.tvWarning6);\n warning7 = findViewById(R.id.tvWarning7);\n warning8 = findViewById(R.id.tvWarning8);\n }", "public void updateViews() {\n textView.setText(contactName);\n\n }", "private void refreshText() {\n mTagsCountText.setText(String.valueOf(tagList.size()));\n\n }", "public void setTextSettings(){\n\n ArrayList<Text> headlines = new ArrayList<>();\n //Add any text element here\n //headlines.add(this.newText);\n\n Color textColorHeadlines = new Color(0.8,0.8,0.8,1);\n\n for ( Text text : headlines ){\n text.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n text.setFill(textColorHeadlines);\n text.setEffect(new DropShadow(30, Color.BLACK));\n\n }\n\n }", "void getUIControls()\n {\n title = (TextView) findViewById(R.id.reviewTitleTextView);\n date = (TextView) findViewById(R.id.dateTextView);\n author = (TextView) findViewById(R.id.authorTextView);\n message = (TextView) findViewById(R.id.messageTextView);\n reviewerCountry = (TextView) findViewById(R.id.reviewerCountryTextView);\n authorRate = (RatingBar) findViewById(R.id.authorRateRatingBar);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_book_catalag, container, false);\n context = getContext();\n user_name = PreferenceManager\n .getDefaultSharedPreferences(context).getString(USER_NAME, \"null\");\n Bundle bundle = getArguments();\n book_id = bundle.getInt(BOOK_ID, 0);\n book_credit = bundle.getInt(BOOK_CREDIT, 0);\n int exchange_count = bundle.getInt(BOOK_EXCHANGE_COUNT, 0);\n String book_name = bundle.getString(BOOK_NAME);\n String book_author = bundle.getString(BOOK_AUTHOR);\n String book_desc = bundle.getString(BOOK_DESC);\n String book_status = bundle.getString(BOOK_STATUS);\n String book_user_name = bundle.getString(BOOK_USER_NAME);\n String book_cover = bundle.getString(BOOK_COVER);\n TextView bookName, bookCredit, bookExchangeCount, bookAuthor, bookDesc, bookStatus, bookUserName;\n bookUserName = view.findViewById(R.id.book_owner);\n bookUserName.setText(\"From \" + book_user_name);\n bookCredit = view.findViewById(R.id.book_credit);\n bookName = view.findViewById(R.id.book_title);\n bookExchangeCount = view.findViewById(R.id.book_exchange_count);\n bookAuthor = view.findViewById(R.id.book_author);\n bookDesc = view.findViewById(R.id.book_desc);\n bookStatus = view.findViewById(R.id.book_status);\n bookCredit.setText(String.valueOf(book_credit));\n bookName.setText(book_name);\n bookExchangeCount.setText(\"Have been with \" + String.valueOf(exchange_count) + \" others.\");\n bookAuthor.setText(book_author);\n bookDesc.setText(book_desc);\n bookStatus.setText(\"Currently \" + book_status);\n ImageView bookCover = view.findViewById(R.id.book_cover);\n ratingBar = view.findViewById(R.id.ratingBar);\n ratingButton = view.findViewById(R.id.rateButton);\n ratingLayout = view.findViewById(R.id.ratingLayout);\n Glide.with(context).load(book_cover).into(bookCover);\n requestButton = view.findViewById(R.id.request_button);\n overallRatingBar = view.findViewById(R.id.overall_rating);\n ratingButton = view.findViewById(R.id.rateButton);\n if (user_name.equals(book_user_name)) {\n //book belongs to current user\n requestButton.setVisibility(View.GONE);\n ratingLayout.setVisibility(View.VISIBLE);\n int user_id = Integer\n .parseInt(PreferenceManager.getDefaultSharedPreferences(context).getString(USER_ID, \"0\"));\n getUserRating(book_id, user_id);\n } else {\n requestButton.setVisibility(View.VISIBLE);\n ratingLayout.setVisibility(View.GONE);\n }\n requestButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n requestButton.setEnabled(false);\n getCredit(user_name);\n }\n });\n getTotalRating(book_id);\n ratingButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n if (ratingBar.getRating() > 0) {\n int user_id = Integer.parseInt(\n PreferenceManager.getDefaultSharedPreferences(context).getString(USER_ID, \"0\"));\n postRating(book_id, user_id, ratingBar.getRating());\n } else {\n showMessage(\"Select rating!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n getTotalRating(book_id);\n\n return view;\n }", "public void fillText(View view){\n if(running==true){\n\n\n latestOp=false;\n for(int i = 0; i<9; i++)\n if(i==win&&idOfViews[i]==view.getId()) {\n score++;\n sec=sec+3;\n latestOp=true;\n }\n\n //Defining the score\n total++;\n scoret.setText(\" \"+score+\" /\"+total);\n\n //Setting the message about the latest one.\n resultT.setText(\"Missed\");\n if(latestOp==true)\n resultT.setText(\"Correct!\");\n\n\n //Calling a new screen\n newScreen();\n }\n\n\n }", "private void setLabelText() {\n\t\tthis.addSpelers();\n\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\tString[] params1 = { spelerid };\n\t\t\tString query = \"SELECT COUNT(idontwikkelingskaart) FROM spelerontwikkelingskaart WHERE idspeler = ?\";\n\t\t\tResultSet result = dc.select(query, params1);\n\t\t\ttry {\n\t\t\t\tif (result.next()) {\n\t\t\t\t\tamountOfCards = result.getInt(1);\n\t\t\t\t\tcards.add(amountOfCards);\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t// Second part, getting playername and filling in their amount of cards\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\ttry {\n\n\t\t\t\tString query = \"SELECT username FROM speler WHERE idspel = ? AND idspeler = ?\";\n\t\t\t\tString idspelString = Integer.toString(idspel);\n\t\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\t\tString[] params2 = { idspelString, spelerid };\n\t\t\t\tResultSet result2;\n\t\t\t\tresult2 = dc.select(query, params2);\n\t\t\t\twhile (result2.next()) {\n\t\t\t\t\tif (amountOfCards == 1) {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" card.\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" cards.\";\n\t\t\t\t\t}\n\t\t\t\t\tlabels.get(i).setText(text);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "protected void setUpTextView(TextView textView, String text) {\n textView.setText(text);\n textView.setVisibility(text.isEmpty() ? View.GONE : View.VISIBLE);\n }", "protected void setupUI() {\n textView = (TextView) findViewById(R.id.textView);\n viewGradeButton = (Button) findViewById(R.id.viewAllBillsButton);\n viewDash = (Button) findViewById(R.id.viewDash);\n\n //Listen if the buttons is clicked\n viewGradeButton.setOnClickListener(onClickViewGradeButton);\n viewDash.setOnClickListener(onClickViewDash);\n\n }", "public void updateText(String s){\n TextView articleText = (TextView) findViewById(R.id.article_text);\n articleText.setText(s);\n }", "private void prepareInformation() {\r\n TextView textDate = findViewById(R.id.textDate);\r\n String date = event.getStartDateFormatted() + \" - \" + event.getEndDateFormatted();\r\n textDate.setText(date);\r\n\r\n TextView textNumber = findViewById(R.id.textNumber);\r\n textNumber.setText(event.contactNumber);\r\n\r\n TextView textWebsite = findViewById(R.id.textWebsite);\r\n textWebsite.setText(event.homePage);\r\n\r\n TextView textMail = findViewById(R.id.textMail);\r\n textMail.setText(event.mail);\r\n\r\n TextView textDescription = findViewById(R.id.textDescription);\r\n textDescription.setText(event.description);\r\n }", "private void updateText(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof PageDef)\n\t\t\t((PageDef)propertiesObj).setName(txtText.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setName(txtText.getText());\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}", "@Override\n public void run() {\n descriptionActivity.mReadingScore.setText(\"Reading: \"+ read);\n descriptionActivity.mMathScore.setText(\"Math: \" + math);\n descriptionActivity.mWritingScore.setText(\"Writing: \" + writing);\n }", "private void initViews() {\n charCounter = (TextView) findViewById(R.id.tv_char_counter);\n tweetInput = (EditText) findViewById(R.id.et_tweet_input);\n btnTweet = (Button) findViewById(R.id.btn_tweet);\n\n tweetInput.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n updateViews();\n }\n });\n }", "private void viewChange() {\n currentView = (TextView) findViewById(R.id.currView);\n currentView.setText(counters.get(counterPosition).toString());\n }", "public void setTextFields() {\n PlayerName.setText(players.get(playerId).getName());\n PlayerAttack.setText(Integer.toString(players.get(playerId).getAttack()));\n PlayerHealth.setText(Integer.toString(players.get(playerId).getHealth()));\n PlayerDefense.setText(Integer.toString(players.get(playerId).getDefense()));\n PlayerWeapon.setText(players.get(playerId).getWeapon());\n PlayerShield.setText(players.get(playerId).getShield());\n CreatureName.setText(creatures.get(creatureId).getName());\n CreatureHealth.setText(Integer.toString(creatures.get(creatureId).getHealth()));\n CreatureAttack.setText(Integer.toString(creatures.get(creatureId).getAttack()));\n CreatureDefense.setText(Integer.toString(creatures.get(creatureId).getDefense()));\n }", "public void updateUi() {\n updateTextView(R.id.blindword, gameInstance.getBlindWord(), EditMode.ADDSPACING);\n updateTextView(R.id.guessedletters, gameInstance.getGuessedSoFar(), EditMode.ADDSPACING);\n\n int livesTotal = settings.getInt(\"lives\", 7);\n int livesLeft = gameInstance.getLives();\n StringBuilder healthbar = new StringBuilder();\n for(int i=0;i<livesLeft;i++) {\n healthbar.append('\\u2764'); //black heart\n }\n\n for(int i=0;i<(livesTotal - livesLeft);i++) {\n healthbar.append('\\u2661'); //white heart\n }\n\n updateTextView(R.id.healthbar, healthbar.toString(), EditMode.NONE);\n\n gameOverListener();\n\n }", "private void updateViews(TextView scoreView, TextView timesPlayedView,\n Button numButton1, Button numButton2) {\n //create the text that will be shown. In this case, the text will look like \"Score: 2\".\n String userScoreString = String.format(\"%s %d\",\n getString(R.string.score_text), model.getUserScore());\n\n String userTimesPlayedString = String.format(\"%s %d\",\n getString(R.string.times_played_text), model.getUserTimesPlayed());\n\n //update the textViews\n scoreView.setText(userScoreString);\n timesPlayedView.setText(userTimesPlayedString);\n\n //update the buttons\n numButton1.setText(String.format(\"%d\", model.getLeftnumber()));\n numButton2.setText(String.format(\"%d\", model.getRightNumber()));\n }", "private void setup() {\n\t\tcanWrite = (TextView)findViewById(R.id.tvCanWrite);\n\t\tcanRead = (TextView)findViewById(R.id.tvCanRead);\n\t\t\n\t\t\n\t}", "private void populateInterfaceElements() {\n prismUserTextView.setTypeface(Default.sourceSansProBold);\n prismPostDateTextView.setTypeface(Default.sourceSansProLight);\n likesCountTextView.setTypeface(Default.sourceSansProLight);\n repostsCountTextView.setTypeface(Default.sourceSansProLight);\n\n setupPostUserUIElements();\n setupPostImageView();\n setupActionButtons();\n }", "public void run() {\n barcodeInfo.setText( // Update the TextView\n barcodes.valueAt(0).displayValue\n );\n }", "private void updateUi(ArrayList<Book> books) {\n ListView booksList = (ListView) activity.findViewById(R.id.books_list);\n BookAdapter adapter = new BookAdapter(activity, books);\n booksList.setAdapter(adapter);\n\n }", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "private void setText(View view, String text) {\n\t\t((TextView) view.findViewById(android.R.id.text1)).setText(text);\n\t}", "public void setView4Text(String text){\n view4Text.set(text);\n }", "public void updateUI() {\n\n TextView site1 = (TextView) findViewById(R.id.site1);\n TextView temp1 = (TextView) findViewById(R.id.temp1);\n TextView disc1 = (TextView) findViewById(R.id.discharge1);\n TextView height1 = (TextView) findViewById(R.id.height1);\n\n TextView site2 = (TextView) findViewById(R.id.site2);\n TextView temp2 = (TextView) findViewById(R.id.temp2);\n TextView disc2 = (TextView) findViewById(R.id.discharge2);\n TextView height2 = (TextView) findViewById(R.id.height2);\n\n TextView site3 = (TextView) findViewById(R.id.site3);\n TextView temp3 = (TextView) findViewById(R.id.temp3);\n TextView disc3 = (TextView) findViewById(R.id.discharge3);\n TextView height3 = (TextView) findViewById(R.id.height3);\n\n TextView site4 = (TextView) findViewById(R.id.site4);\n TextView temp4 = (TextView) findViewById(R.id.temp4);\n TextView disc4 = (TextView) findViewById(R.id.discharge4);\n TextView height4 = (TextView) findViewById(R.id.height4);\n\n TextView site5 = (TextView) findViewById(R.id.site5);\n TextView temp5 = (TextView) findViewById(R.id.temp5);\n TextView disc5 = (TextView) findViewById(R.id.discharge5);\n TextView height5 = (TextView) findViewById(R.id.height5);\n\n\n site1.setText(siteNames.get(0));\n tempIndex = 0;\n discIndex = 0;\n heightIndex = 0;\n\n if(!temps.isEmpty()) { //add this to all\n if (r.checkTemp(0)) {\n temp1.setText(\"Temperature: \" + temps.get(tempIndex++));\n temp1.setVisibility(View.VISIBLE);\n }\n }\n\n if(!discharge.isEmpty()) {\n if (r.checkDisc(0)) {\n disc1.setText(\"Water Discharge: \" + discharge.get(discIndex++));\n disc1.setVisibility(View.VISIBLE);\n\n }\n }\n\n if(!heights.isEmpty()){\n if(r.checkHeight(0)){\n height1.setText(\"Water Height: \" + heights.get(heightIndex++));\n height1.setVisibility(View.VISIBLE);\n }\n }\n\n\n\n site2.setText(siteNames.get(1));\n\n if(!temps.isEmpty()) {\n if (r.checkTemp(1)) {\n temp2.setText(\"Temperature: \" + temps.get(tempIndex++));\n temp2.setVisibility(View.VISIBLE);\n }\n }\n if(!discharge.isEmpty()) {\n if (r.checkDisc(1)) {\n disc2.setText(\"Water Discharge: \" + discharge.get(discIndex++));\n disc2.setVisibility(View.VISIBLE);\n }\n }\n\n if(!heights.isEmpty()){\n if(r.checkHeight(1)) {\n if (heights.size() >= 2) {\n height2.setText(\"Water Height: \" + heights.get(heightIndex++));\n height2.setVisibility(View.VISIBLE);\n }\n }\n }\n\n if(numSites >= 3){\n\n site3.setText(siteNames.get(2));\n if(!temps.isEmpty()) {\n if (r.checkTemp(2)) {\n temp3.setText(\"Temperature: \" + temps.get(tempIndex++));\n temp3.setVisibility(View.VISIBLE);\n }\n }\n if(!discharge.isEmpty()) {\n if (r.checkDisc(2)) {\n if (discharge.size() >= 3) {\n disc3.setText(\"Water Discharge: \" + discharge.get(discIndex++));\n disc3.setVisibility(View.VISIBLE);\n }\n }\n }\n if(!heights.isEmpty()){\n if(r.checkHeight(2)) {\n if (heights.size() >= 3) {\n height3.setText(\"Water Height: \" + heights.get(heightIndex++));\n }\n }\n }\n }\n\n if (numSites >= 4) {\n site4.setText(siteNames.get(3));\n site4.setVisibility(View.VISIBLE);\n\n if(!discharge.isEmpty()) {\n if (r.checkDisc(3)) {\n if (discharge.size() >= 4) {\n disc4.setText(\"Water Discharge: \" + discharge.get(discIndex++));\n disc4.setVisibility(View.VISIBLE);\n }\n }\n }\n\n if(!heights.isEmpty()){\n\n if(r.checkHeight(3)) {\n if (heights.size() >= 4) {\n height4.setText(\"Water Height: \" + heights.get(heightIndex++));\n height4.setVisibility(View.VISIBLE);\n }\n }\n }\n if(!temps.isEmpty()) {\n if (r.checkTemp(3)) {\n\n temp4.setText(\"Temperature: \" + temps.get(tempIndex++));\n temp4.setVisibility(View.VISIBLE);\n }\n }\n }\n\n if (numSites == 5) {\n site5.setText(siteNames.get(4));\n site5.setVisibility(View.VISIBLE);\n if (!discharge.isEmpty()) {\n if (r.checkDisc(4)) {\n if(discharge.size() >= 5) {\n disc5.setText(\"Water Discharge: \" + discharge.get(discIndex++));\n disc5.setVisibility(View.VISIBLE);\n }\n }\n }\n if(!heights.isEmpty()){\n if(r.checkHeight(4)) {\n if (heights.size() >= 5) {\n height5.setText(\"Water Height: \" + heights.get(heightIndex++));\n height5.setVisibility(View.VISIBLE);\n }\n }\n }\n if (!temps.isEmpty()) {\n if (r.checkTemp(4)) {\n\n temp5.setText(\"Temperature: \" + temps.get(tempIndex++));\n temp5.setVisibility(View.VISIBLE);\n }\n }\n }\n }", "private void populateUI(Sandwich sandwich) {\n TextView labelAlsoKnownAs = (TextView) findViewById(R.id.label_also_known);\n TextView mAlsoKnownAs = (TextView) findViewById(R.id.also_known_tv);\n TextView labelDescription = (TextView) findViewById(R.id.label_description);\n TextView mDescription = (TextView) findViewById(R.id.description_tv);\n TextView labelOrigin = (TextView) findViewById(R.id.label_origin);\n TextView mOrigin = (TextView) findViewById(R.id.origin_tv);\n TextView labelIngredients = (TextView) findViewById(R.id.label_ingredients);\n TextView mIngredients = (TextView) findViewById(R.id.ingredients_tv);\n\n //establish the list of alternative names for the selected sandwich\n List<String> listAlsoKnownAs = sandwich.getAlsoKnownAs();\n //convert the list to a comma separated string\n String strAlsoKnownAs = listToString(listAlsoKnownAs);\n //hide the known as label and text views if there are no alternative names\n if (strAlsoKnownAs.trim().equals(\"\")) {\n labelAlsoKnownAs.setVisibility(View.GONE);\n mAlsoKnownAs.setVisibility(View.GONE);\n } else {\n //show the known as label and text views if there are alternative names\n labelAlsoKnownAs.setVisibility(View.VISIBLE);\n mAlsoKnownAs.setVisibility(View.VISIBLE);\n //populate the also known as textview\n mAlsoKnownAs.setText(strAlsoKnownAs);\n }\n\n //establish the description for the selected sandwich\n String strDescription = sandwich.getDescription();\n //hide the description label and text views if there are no alternative names\n if (strDescription.trim().equals(\"\")) {\n labelDescription.setVisibility(View.GONE);\n mDescription.setVisibility(View.GONE);\n } else {\n //show the description label and text views if the description is available\n labelDescription.setVisibility(View.VISIBLE);\n mDescription.setVisibility(View.VISIBLE);\n //populate the description textview\n mDescription.setText(strDescription);\n }\n //establish the place of origin for the selected sandwich\n String strPlaceOfOrigin = sandwich.getPlaceOfOrigin();\n //hide the place of origin label and text views if there are no alternative names\n if (strPlaceOfOrigin.trim().equals(\"\")) {\n labelOrigin.setVisibility(View.GONE);\n mOrigin.setVisibility(View.GONE);\n } else {\n //show the place of origin label and text views if the place of origin is available\n labelOrigin.setVisibility(View.VISIBLE);\n mOrigin.setVisibility(View.VISIBLE);\n //populate the place of origin textview\n mOrigin.setText(strPlaceOfOrigin);\n }\n\n //establish the list of ingredients for the selected sandwich\n List<String> listIngredients = sandwich.getIngredients();\n //convert the list to a comma separated string\n String strIngredients = listToString(listIngredients);\n //hide the ingredients label and text views if there are none available\n if (strIngredients.trim().equals(\"\")) {\n labelIngredients.setVisibility(View.GONE);\n mIngredients.setVisibility(View.GONE);\n } else {\n //show the ingredients label and text views if they are available\n labelIngredients.setVisibility(View.VISIBLE);\n mIngredients.setVisibility(View.VISIBLE);\n //populate the ingredients textview\n mIngredients.setText(strIngredients);\n }\n }", "void clearbookcache(){\n\t \tBookname.setText(\"\");\n\t \tBookauthor.setText(\"\");\n\t \tbookstatus.setText(\"\");\n\t }", "private void updateText(final String info, final String caller) {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\n\t\t\t\tinfoText.setText(info);\n\t\t\t\tcallerText.setText(caller);\n\t\t\t}\n\t\t});\n\t}", "private void updateView() {\n model.inlezenHighscore();\n for (int i = 0; i < 10; i++) {\n view.getNaamLabels(i).setText(model.getNaam(i));\n view.getScoreLabels(i).setText(model.getScores(i));\n }\n }", "@Override\n\t\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\ttextView_setpsd_info.setText(str);\n\t\t\t\t}", "void setText(@StringRes int resId) {\n setText(getContext().getText(resId));\n }", "public void reset() {\n\t\tref1Rating.setText(\"Not yet rated\");\n\t\tref2Rating.setText(\"Not yet rated\");\n\t\tref3Rating.setText(\"Not yet rated\");\n\t\trevRating.setText(\"Not yet rated\");\n\t\trevComment.setText(\"\");\n\t}", "private void populateRecipeInfo() {\n\t\tString title = currentRecipe.getTitle();\n\t\tString directions = currentRecipe.getDirections();\n\t\tString description = currentRecipe.getDescription();\n\n\t\tfillTextViews(title, description, directions);\n\t\tpopulateIngredientView();\n\t}", "public void setLabels() {\n gameLabel.setText(gameString);\n playerLabel.setText(playerPlays);\n computerLabel.setText(computerPlays);\n pScoreLabel.setText(\"Player: \" + pScore);\n cScoreLabel.setText(\"Computer: \" + cScore);\n }", "public void setTxtViews(String ssid, String ip, String signal){\n ssidView.setText(ssid);\n ipView.setText(ip);\n signalView.setText(signal);\n }", "protected void initializeViews(){\n mLatLng = (TextView) findViewById(R.id.lat_lng);\n mAccuracyView = (TextView) findViewById(R.id.accuracy);\n mRouteText = (TextView) findViewById(R.id.route);\n mRegionText = (TextView) findViewById(R.id.region);\n mSampleText = (TextView) findViewById(R.id.sample);\n mBeaconText = (TextView) findViewById(R.id.beacon);\n }", "public void setText(String text) {\n\t\tthis.text = text;\n\t\tupdateView();\n\t}", "private void initView() {\n mRetrofit = new Retrofit.Builder()\n .baseUrl(Challenge1Activity.MY_BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n mTextViewDisplayTopRated = findViewById(R.id.text_view_display_toprated_movies);\n\n mTextViewPrev = findViewById(R.id.text_view_prev);\n mTextViewCurrentAndMaxPage = findViewById(R.id.text_view_current_and_max_page);\n mTextViewNext = findViewById(R.id.text_view_next);\n }", "private void populateUI(Sandwich sandwich) {\n tv_origin.setText(sandwich.getPlaceOfOrigin());\n // set the description textview to the sandwich description\n tv_description.setText(sandwich.getDescription());\n // using string builder to get rid of the brackets and commas in the textview\n StringBuilder mIngredientBuilder = new StringBuilder();\n // getting list of ingredients from the sandwich to parse\n List<String> mIngredients = sandwich.getIngredients();\n //iterates thru each item and adds it the string with a carriage return at the end of each item\n for(String ingredient:mIngredients )\n {\n mIngredientBuilder.append(ingredient+\"\\n\");\n }\n //gets rid of last return\n // get length of stringbuilder\n int length= mIngredientBuilder.length();\n // delete the last character to get rid of empty line below ingredients\n mIngredientBuilder.deleteCharAt(length-1);\n // sets the ingredients textview to the ingredients string builder\n tv_ingredients.setText(mIngredientBuilder.toString());\n // using string builder to get rid of the brackets and commas in the textview\n StringBuilder mAkaListBuilder = new StringBuilder();\n // getting list of aka names from the sandwich to parse\n List<String > mAkaList = sandwich.getAlsoKnownAs();\n //iterates thru each item and adds it the string with a carriage return at the end of each item\n for(String aka :mAkaList )\n {\n mAkaListBuilder.append(aka+\"\\n\");\n }\n // sets the aka textview to the aka string builder\n tv_akaList.setText(mAkaListBuilder.toString());\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n recyclerView = (RecyclerView) findViewById(R.id.recycleView);\n adapter = new Recycler_View_Adapter(getApplication());\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n\n //Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n //setSupportActionBar(toolbar);\n\n /* TextView text2 = new TextView(this);\n TextView text3 = new TextView(this);\n TextView text4 = new TextView(this);\n\n text2.setText(\"This is where the reviews will be.\");\n text3.setText(\"This is where the followers will be.\");\n text4.setText(\"This is where the following will be.\");\n\n subscreen = (ViewAnimator) findViewById(R.id.viewAnimator);\n subscreen.addView(text2, -1);\n subscreen.addView(text4, -1);\n subscreen.addView(text3, -1);*/\n\n }", "private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }", "public void updateBook(View view){\n update();\n }", "private void initializeViews() {\n titleTV = (TextView) findViewById(R.id.displayTitle);\n typeTV = (TextView) findViewById(R.id.displayType);\n categoryTV = (TextView) findViewById(R.id.displayCategory);\n amountTV = (TextView) findViewById(R.id.displayAmount);\n partyTV = (TextView) findViewById(R.id.displayParty);\n modeTV = (TextView) findViewById(R.id.displayMode);\n dateTV = (TextView) findViewById(R.id.displayDate);\n descriptionTV = (TextView) findViewById(R.id.displayDescription);\n currencyTV = (TextView)findViewById(R.id.displayCurrency);\n\n //find all buttons\n editButton = (FloatingActionButton) findViewById(R.id.editButton);\n deleteButton = (FloatingActionButton) findViewById(R.id.deleteButton);\n\n\n }", "public void onCreate() {\n view.initTexts(amountCorrect.get(0), amountCorrect.get(1));\n }", "private void initializeViewAndControls() {\r\n txtEmail.setText(\"Email - \"+ AppConstants.ADMIN_EMAIL);\r\n txtCustomerCarePhone.setText(\"Customer Care - \"+ AppConstants.CUSTOMER_CARE_NUMBER);\r\n txtTollFreePhone.setText(\"Toll Free - \"+ AppConstants.TOLL_FREE_NUMBER);\r\n }", "public void makeStory (View view)\n {\n EditText et_color01 = (EditText) findViewById(R.id.edit_text_color01);\n EditText et_body_part01 = (EditText) findViewById(R.id.edit_text_body01);\n EditText et_noun01 = (EditText)findViewById(R.id.edit_text_noun01);\n EditText et_verb01 = (EditText) findViewById(R.id.edit_text_verb01);\n EditText et_adjective01 = (EditText) findViewById(R.id.edit_text_adjective01);\n EditText et_adjective02 = (EditText) findViewById(R.id.edit_text_adjective02);\n EditText et_verb02 = (EditText) findViewById(R.id.edit_text_verb02);\n EditText et_noun02 = (EditText) findViewById(R.id.edit_text_noun02);\n EditText et_noun03 = (EditText) findViewById(R.id.edit_text_noun03);\n\n TextView tv_story = (TextView) findViewById(R.id.text_view_story);\n\n // strings for the story\n String str_Color01 = et_color01.getText().toString();\n String str_BodyPart01 = et_body_part01.getText().toString();\n String str_Noun01 = et_noun01.getText().toString();\n String str_Verb01 = et_verb01.getText().toString();\n String str_Adjective01 = et_adjective01.getText().toString();\n String str_Adjective02 = et_adjective02.getText().toString();\n String str_Verb02 = et_verb02.getText().toString();\n String str_Noun02 = et_noun02.getText().toString();\n String str_Noun03 = et_noun03.getText().toString();\n String story = \"Today I saw him again. When he looks at me with those \" + str_Color01;\n story += \" eyes, it makes my \" + str_BodyPart01;\n story += \" go pitterpat, and I feel as if I have \" + str_Noun01;\n story += \" in my stomach. When he scrunches his nose, I want to \" + str_Verb01;\n story += \" him softly. He is so \" + str_Adjective01 + \" and \" + str_Adjective02;\n story += \". Tomorrow he will be mine. For now he \" + str_Verb02 + \" in the store \" + str_Noun02 + \" looking at me. \";\n story += str_Noun03 + \" love is hard to resist!\";\n\n\n tv_story.setText(story);\n }", "public static void setAllDetails(FullMovieInfo movie){\n\n\n head.setText(movie.getSubject());\n description.setText(movie.getBody());\n\n if (movie.getUrl().equals(\"\")) {\n image.setBackgroundResource(R.drawable.nopic);\n image.getBackground().setAlpha(150);\n } else {\n new DownloadImageTask(activity,l,context, image, movie.getUrl()).execute();\n }\n\n String voteText;\n if(0==movie.getVote_average()){//check if there are an available score\n rate.setVisibility(View.GONE);\n vote.setVisibility(View.VISIBLE);\n voteText = activity.getString(R.string.noinfomration2);\n }else {\n voteText = movie.getVote_average()+\"\";\n if((float)6<=movie.getVote_average()){//check if the score is high or low and paint the color red\\green in result\n movieLinear.setBackgroundResource(R.drawable.layoutstylegreen);\n }else{\n movieLinear.setBackgroundResource(R.drawable.layoutstylered);\n }\n }\n//-----------------all string is from the strings values so i could change language\n vote.setText(activity.getString(R.string.score)+\" \"+voteText);\n rate.setNumStars(5);\n rate.setMax(5);\n float rating = (float) 0.5*movie.getVote_average();\n rate.setStepSize((float)0.05);\n rate.setRating(rating);\n date.setText(activity.getString(R.string.releasedate)+\" \"+movie.getRelease_date());\n String money;\n if(0==movie.getBudget()){\n money = activity.getString(R.string.noinformation);\n }else {\n money = movie.getBudget() + \"\";\n }\n budget.setText(activity.getString(R.string.budget)+\" \"+money);\n if(0!=movie.getRuntime()) {\n int hours = movie.getRuntime() / 60;\n int minutes = movie.getRuntime() % 60;\n runtime.setText(activity.getString(R.string.movielenght)+\" \" + hours+\" \" + activity.getString(R.string.movielength2)+\" \" + minutes+\" \" + activity.getString(R.string.movielength3)+\" \");\n }else{\n runtime.setText(R.string.noinformationexisted);\n }\n\n movieName = movie.getSubject().toString();\n movieScore = movie.getVote_average()+\"\";\n }", "private void updateCountTV()\n {\n TextView countTextview = (TextView) findViewById(R.id.countTV);\n countTextview.setText(\"Counting Jelly Beans gives me \" + countJB);\n }", "private void setInfo(String info) {\n// TextView textView = (TextView) findViewById(R.id.info);\n// textView.setText(info);\n }", "private void setText(Text text) {\n \t\tthis.text = text;\n \t}", "@Override\r\n\t\tpublic void updateUI() {\n\t\t\tif(deparments != null){\r\n\r\n\t\t\t\ttv.setText(deparments.toString());\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"deparments \"+deparments.toString());\r\n\t\t\t}\r\n\t\t}", "@Override\n public void onClick(View v) {\n Double rate = Double.valueOf(mRatingBar.getRating());\n analyticsManager.trackBookRating(mBook,rate);\n String user = FirebaseAuth.getInstance().getCurrentUser().getDisplayName();\n String text = mText.getText().toString();\n mReviewsRef.push().setValue(new Review(rate,user,text));\n\n mSumReviews++;\n mSumRating+=Double.valueOf(mRatingBar.getRating());\n mDatabase.getReference(\"Reviews/\"+bookKey+\"/rating\").setValue(mSumRating/mSumReviews);\n finish();\n }", "private void setFields() {\n\t\tfirstname.setText(guest.getFirstName());\n\t\tlastname.setText(guest.getLastName());\n\t\tpassport.setText(guest.getPassportNumber());\n\t\ttelephone.setText(guest.getTelephoneNumber());\n\t\tarrival.setText(arrivalDate.toString());\n\t\tdeparture.setText(departureDate.toString());\n\n\t\tif (hotelChoice.getName() != null && hotelChoice.getName() != \"\"\n\t\t\t\t&& !(hotelChoice.getName() == Controller.DEFAULT_HOTEL_CHOICE)) {\n\t\t\thotel.setText(hotelChoice.getName());\n\t\t} else {\n\t\t\thotelChoice = new Hotel();\n\t\t\thotelChoice.setName(\"\");\n\t\t\thotel.clear();\n\t\t}\n\t\tif (roomQualityChoice.getQuality() != null && roomQualityChoice.getQuality() != \"\"\n\t\t\t\t&& !(roomQualityChoice.getQuality() == Controller.DEFAULT_QUALITY_CHOICE)) {\n\t\t\tquality.setText(roomQualityChoice.getQuality());\n\t\t} else {\n\t\t\troomQualityChoice = new RoomQuality();\n\t\t\troomQualityChoice.setQuality(\"\");\n\t\t\tquality.clear();\n\t\t}\n\t\tif (discountChoice > 0) {\n\t\t\tdiscount.setText(\"(-\" + discountChoice + \"%)\");\n\t\t}\n\n\t\tloadAvailableRooms();\n\n\t}", "private void systemGenerated(){\n\n //gets the averages\n mEDB.calcSysBudget();\n double [] averages = mEDB.getAverages();\n DecimalFormat df = new DecimalFormat(\"#.00\");\n\n //sets the averages\n vehicle.setText(df.format(averages[0]));\n pets.setText(df.format(averages[1]));\n home.setText(df.format(averages[2]));\n food.setText(df.format(averages[3]));\n entertainment.setText(df.format(averages[4]));\n other.setText(df.format(averages[5]));\n\n //locks the edit texts\n vehicle.setInputType(0);\n pets.setInputType(0);\n home.setInputType(0);\n food.setInputType(0);\n entertainment.setInputType(0);\n other.setInputType(0);\n }", "public void populateDetails() {\n\n txtpn_NameHeading.setText(selStudent.getfName() + \" \" + selStudent.getlName());\n\n txtpn_RacesComplete.setText(String.valueOf(dataCur.countNumberRaces(selStudent.getId())));\n txtpn_DaysAbsent.setText(String.valueOf(selStudent.getAttend()));\n txtpn_AgeGroup.setText(String.valueOf(selStudent.getAge()));\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.review_view);\n\n\t\ttxtReviewTitle = (TextView) findViewById(R.id.review_title);\n\t\ttxtReviewUpdated = (TextView) findViewById(R.id.review_updated);\n\t\ttxtReviewContent = (TextView) findViewById(R.id.review_content);\n\t\ttxtReviewComment = (TextView) findViewById(R.id.review_comments);\n\t\tuserImageView = (ImageView) findViewById(R.id.user_img);\n\t\ttxtSubjectTitle = (TextView) findViewById(R.id.subject_title);\n\t\ttxtUserInfo = (TextView) findViewById(R.id.user_info);\n\t\tratingBar = (RatingBar) findViewById(R.id.ratingbar);\n\t\tratingBar.setVisibility(View.INVISIBLE);\n\n\t\t// 回退按钮\n\t\tImageButton backButton = (ImageButton) findViewById(R.id.back_button);\n\t\tbackButton.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\t\tBundle extras = getIntent().getExtras();\n\t\tReview review = extras != null ? (Review) extras\n\t\t\t\t.getSerializable(\"review\") : null;\n\t\tif (review != null) {\n\t\t\tTextView titleView = (TextView) findViewById(R.id.myTitle);\n\t\t\ttitleView.setText(\"《\" + review.getSubject().getTitle() + \"》的评论\");\n\t\t\tfillData(review);\n\t\t}\n\t}", "private void setAll(int bnr){\n BookingManager bm = new BookingManager();\n Booking b = bm.getBooking(bnr);\n name = b.getName();\n hotelName = b.getHotel().getName();\n address = b.getHotel().getAddress();\n nrPeople = b.getRoom().getCount();\n price = b.getRoom().getPrice();\n dateFrom = b.getDateFrom();\n dateTo = b.getDateTo();\n \n \n jName.setText(name);\n jHotelName.setText(hotelName);\n jHotelAddress.setText(\"\" + address);\n jNrPeople.setText(\"\" + nrPeople);\n jPrice.setText(\"\" + price);\n jDateFrom.setText(\"\" + dateFrom);\n jDateTo.setText(\"\" + dateTo);\n }", "private void setText(final String text) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView textView = findViewById(R.id.loading_text);\n if (textView != null) {\n textView.setText(textView.getText() + \"\\n\" + formatDate(System.currentTimeMillis()) + \": \" + text);\n }\n }\n });\n }", "public void initialize(){\n titleBox.setTextFormatter( new TextFormatter<>(c -> {\n if(c.getControlNewText().length() > 30 ) return null;\n boolean error=false;\n char[] chars = c.getText().toCharArray();\n for (char aChar : chars)\n if (aChar == '\\n' ) {\n error = true;\n break;\n }\n if (error) return null;\n else return c;\n }));\n //default settings\n resultBox.setEditable(false);\n formatter.applyPattern(\"dd/MM/yyyy\");\n datePick.getEditor().setText(formatter.format(date));\n //arrayList to store each diaryPage and every words in dictionary\n book= new ArrayList<>();\n dictionary = new ArrayList<>();\n //read from txt file for existing diary pages and dictionary\n try {\n BufferedReader reader = new BufferedReader(new FileReader(new File(\"src/diary/content.txt\")));\n String line= reader.readLine();\n while (line != null){\n String date,title,content=\"\";\n int lineCount;\n date = line;\n title = reader.readLine();\n lineCount = Integer.parseInt(reader.readLine());\n for(int i=0;i<lineCount;i++){\n line = reader.readLine();\n //noinspection StringConcatenationInLoop\n content = content + line + System.lineSeparator();\n }\n book.add(new DiaryPage(date,title,content,lineCount));\n line = reader.readLine();\n }\n reader.close();\n reader = new BufferedReader(new FileReader(new File(\"src/extra/words.txt\")));\n line= reader.readLine();\n while (line != null){\n dictionary.add(line);\n line = reader.readLine();\n }\n reader.close();\n\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n //save new diary into txt file after user exit the application\n Main.window.setOnHiding(event -> saveFile());\n }", "public ElectionTextUI() {\n\t\tSystem.out.println(\"Election Vote Counter\");\n\n\t\t// TODO: initialization code can go here\n\t\t//crash(\"TODO: implement initialization code\");\n\t\telection = Election.getInstance();\n\t\telection.readInCandidates(\"candidates.txt\");\n\n\t}", "private void setRecipiesAndLabels() {\n // set the label\n TextView activityLabel = findViewById(R.id.textView_MenuLabel);\n activityLabel.setText(R.string.recipes);\n\n // set the onclick event for list items\n ListView shoppingList = findViewById(R.id.listView_Ingredients);\n shoppingList.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n// String food = String.valueOf(adapterView.getItemAtPosition(i));\n myIngredients.remove(i);\n updateIngredientListView();\n }\n }\n );\n\n // set the top left button click event\n Button backButton = findViewById(R.id.button_TopLeft);\n backButton.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n }\n );\n\n // disable the top right button\n Button addButton = findViewById(R.id.button_TopRight);\n addButton.setText(\"\");\n addButton.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // do nothing\n }\n }\n );\n }", "protected void DisplayVenueAndPitchNames()\n {\n TextView venueName = (TextView) findViewById(R.id.venueName);\n TextView pitchName = (TextView) findViewById(R.id.pitchName);\n venueName.setText(venueNameTitle);\n pitchName.setText(pitch.getPitchName());\n }", "private void initializeDisplayText() {\n // Title and field labels\n Stage stage = (Stage) titleLabel.getScene().getWindow();\n stage.setTitle(rb.getString(\"windowTitle\"));\n if (action.equals(Constants.ADD)) {\n titleLabel.setText(rb.getString(\"addTitleLabel\"));\n } else if (action.equals(Constants.UPDATE)) {\n titleLabel.setText(rb.getString(\"updateTitleLabel\"));\n }\n idLabel.setText(rb.getString(\"idLabel\"));\n nameLabel.setText(rb.getString(\"nameLabel\"));\n addressLabel.setText(rb.getString(\"addressLabel\"));\n cityLabel.setText(rb.getString(\"cityLabel\"));\n countryLabel.setText(rb.getString(\"countryLabel\"));\n divisionLabel.setText(rb.getString(\"divisionLabel\"));\n postalLabel.setText(rb.getString(\"postalLabel\"));\n phoneLabel.setText(rb.getString(\"phoneLabel\"));\n\n // Prompt text\n idField.setPromptText(rb.getString(\"idPrompt\"));\n nameField.setPromptText(rb.getString(\"namePrompt\"));\n addressField.setPromptText(rb.getString(\"addressPrompt\"));\n cityField.setPromptText(rb.getString(\"cityPrompt\"));\n countryComboBox.setPromptText(rb.getString(\"countryPrompt\"));\n divisionComboBox.setPromptText(rb.getString(\"divisionPrompt\"));\n postalField.setPromptText(rb.getString(\"postalPrompt\"));\n phoneField.setPromptText(rb.getString(\"phonePrompt\"));\n\n // Button labels\n Common.scaleButton(saveBtn, rb.getString(\"saveBtn\"));\n Common.scaleButton(cancelBtn, rb.getString(\"cancelBtn\"));\n\n // Error label; initially blank\n errorLabel.setText(\"\");\n }", "public void viewAllReviews(View v){\n //Check if initialized to prevent null pointer\n if(currentBook.reviews != null) {\n int startIndex = mReviews.getChildCount() - 1; //Get index of last visible view\n int endIndex = currentBook.reviews.size() - 1; //Get index of last possible view\n\n //If there exist more views than are shown\n if(endIndex > startIndex){\n reviewAdapter(currentBook.reviews, mReviews, startIndex, endIndex, true);\n mSeeAll.setVisibility(GONE);\n }\n }\n }", "private void update(String text, TextView view) {\r\n handler.post(new TextUpdater(text, view));\r\n }", "@Override\r\n\tpublic void setupView() {\n\t\ttv = (TextView) findViewById(R.id.mjson_layout_text);\r\n\t}" ]
[ "0.6302605", "0.62760895", "0.6157373", "0.59951586", "0.59908545", "0.5987199", "0.5943776", "0.5921005", "0.5819595", "0.5804627", "0.5727027", "0.57099724", "0.5700594", "0.56856465", "0.56836927", "0.5653771", "0.5620259", "0.56195694", "0.560567", "0.5562642", "0.55531263", "0.55382407", "0.54888207", "0.5487432", "0.54724973", "0.5458205", "0.54444456", "0.5443173", "0.5402036", "0.5391305", "0.5380181", "0.5363", "0.5362235", "0.53469265", "0.5328622", "0.53215605", "0.5320795", "0.5314623", "0.53133076", "0.52985257", "0.52794534", "0.5261165", "0.52611345", "0.5250952", "0.524286", "0.5233953", "0.5233388", "0.5215682", "0.5210737", "0.52031994", "0.51999414", "0.5187243", "0.5136922", "0.5133489", "0.51325595", "0.51219153", "0.5119707", "0.50883955", "0.5081812", "0.50788724", "0.50749457", "0.5074845", "0.5072284", "0.50674534", "0.5067054", "0.50654054", "0.5061633", "0.5058326", "0.50506204", "0.50473917", "0.50471646", "0.504395", "0.50378287", "0.5035283", "0.5033082", "0.5027247", "0.5022688", "0.50203454", "0.5019655", "0.50194573", "0.5019047", "0.5017905", "0.5014757", "0.5006865", "0.5006208", "0.5005421", "0.50052273", "0.5003235", "0.49869916", "0.4976237", "0.4969377", "0.4968133", "0.49671558", "0.49657175", "0.4959367", "0.49587283", "0.49542087", "0.49537942", "0.49472785", "0.49414083" ]
0.7202203
0
Adapts items to LinearLayout. From the given parameters, items are created and attached to the parent LinearLayout. For each item in the layout, a typeface and appropriate text is set. Items can be added or removed with this method.
public void reviewAdapter(ArrayList<Review> reviews, LinearLayout parent, int lowerDataBound, int upperDataBound, boolean add){ if(add) { //Loop through items and inflate them for (int i = lowerDataBound; i <= upperDataBound; i++) { //Try to remove old view try{ parent.removeViewAt(i); }catch(Exception e){ //If no old view exists, exception will be caught and program continues e.printStackTrace(); } View view = getLayoutInflater().inflate(R.layout.review, parent, false); Review currentReview = reviews.get(i); final TextView title = (TextView) view.findViewById(R.id.comment_title); final TextView body = (TextView) view.findViewById(R.id.comment_body); final TextView more = (TextView) view.findViewById(R.id.comment_more); final TextView name = (TextView) view.findViewById(R.id.comment_name); final TextView time = (TextView) view.findViewById(R.id.comment_time); final SimpleRatingBar sRatingBar = (SimpleRatingBar) view.findViewById(R.id.comment_rating); //Set values title.setText(currentReview.title); body.setText(currentReview.comment); name.setText(currentReview.name); time.setText(currentReview.formatTimestamp(currentReview.timestamp)); sRatingBar.setRating(currentReview.rating); int offset = (int)(getResources().getDimension(R.dimen.comment_profile_diameter) + getResources().getDimension(R.dimen.margin)); title.setPadding(offset, 0, 0, 0); //If there is no title, set title to amount of stars if(title.getText() == null || title.getText() == "" || title.getText() == "null" || title.getText() == " "){ String titleString = (int)currentReview.rating + " stars"; title.setText(titleString); } //If they did not leave a comment, remove comment if(body.getText() == null || body.getText() == "" || body.getText() == "null") body.setVisibility(GONE); more.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(body.getLineCount() < 4){ body.setMaxLines(Integer.MAX_VALUE); more.setText(R.string.minimize); }else{ body.setMaxLines(3); more.setText(R.string.read_more); } } }); //Check if more button needed body.post(new Runnable() { @Override public void run() { //If there are less lines than the line limit, then hide the more button. if(body.getLineCount() < 4) { more.setVisibility(GONE); } body.setMaxLines(3); } }); //Set typefaces title.setTypeface(handWriting); body.setTypeface(handWriting); more.setTypeface(handWriting); name.setTypeface(handWriting); time.setTypeface(handWriting); parent.addView(view, i); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "public void addRow(String itemName, String itemPrice, String username) {\n LinearLayout parentLayout = findViewById(R.id.itemList);\n\n // Create layout for new item\n LinearLayout l = new LinearLayout(this);\n l.setOrientation(LinearLayout.HORIZONTAL);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 100);\n layoutParams.bottomMargin = 10;\n l.setBackgroundResource(R.drawable.customborder);\n l.setLayoutParams(layoutParams);\n\n // Create item_name textview\n TextView name_textview = new TextView(this);\n name_textview.setText(itemName);\n name_textview.setTextSize(24);\n LinearLayout.LayoutParams nameParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n nameParams.weight = 1;\n name_textview.setLayoutParams(nameParams);\n\n // Create price textview\n TextView price_textview = new TextView(this);\n price_textview.setText(\"$\"+itemPrice);\n price_textview.setTextSize(24);\n LinearLayout.LayoutParams priceParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n priceParams.weight = 1;\n price_textview.setLayoutParams(priceParams);\n\n // Create username textview\n TextView username_textview = new TextView(this);\n username_textview.setText(username);\n username_textview.setTextSize(24);\n LinearLayout.LayoutParams usernameParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n usernameParams.weight = 1;\n username_textview.setLayoutParams(usernameParams);\n\n // Add views to layout\n l.addView(name_textview);\n l.addView(price_textview);\n l.addView(username_textview);\n parentLayout.addView(l);\n\n }", "private void initViews() {\n removeAllViews();\n this.setOrientation(HORIZONTAL);\n this.setOnTouchListener(this);\n\n TextView textView;\n ImageView imageView;\n for (PickerItem pickerItem : items) {\n if (pickerItem.hasDrawable()) {\n imageView = new ImageView(getContext());\n imageView.setImageResource(pickerItem.getDrawable());\n imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);\n initStyle(imageView);\n this.addView(imageView);\n } else {\n if (pickerItem.getText() != null) {\n textView = new TextView(getContext());\n textView.setGravity(Gravity.CENTER);\n textView.setText(pickerItem.getText());\n initStyle(textView);\n this.addView(textView);\n }\n }\n }\n }", "@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tint childTop = 0;\n\t\tint childLeft = 0;\n\t\tint childWidth = 0;\n\t\tint childHeight = 0;\n\t\tint count = getChildCount();\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tView child = this.getChildAt(i);\n\t\t\tif (child.getVisibility() == View.GONE)\n\t\t\t\tcontinue;\n\t\t\tif (child instanceof RankImageView) {\n\t\t\t\tchildTop = 0;\n\t\t\t\tchildLeft = 0;\n\t\t\t\tchildWidth = (int) (original_width * scale);\n\t\t\t\tchildHeight = (int) (original_height * scale);\n\t\t\t} else if (child instanceof TextView) {\n\t\t\t\tTextView tv = (TextView) child;\n\t\t\t\tchildTop = (int) (original_height * scale + name_spacing);\n\t\t\t\tchildLeft = (int) bp.getStrokeWidth();\n\t\t\t\tchildWidth = (int) (original_width * scale - 2 * bp.getStrokeWidth());\n\t\t\t\tchildHeight = (int) this.getFontHeight(tv.getPaint());\n\t\t\t} else {\n\t\t\t\tchildTop = 0;\n\t\t\t\tchildLeft = 0;\n\t\t\t\tchildWidth = 0;\n\t\t\t\tchildHeight = 0;\n\t\t\t}\n\t\t\tchild.measure(childWidth, childHeight);\n\t\t\tchild.layout(childLeft, childTop, childLeft + childWidth, childTop\n\t\t\t\t\t+ childHeight);\n\t\t}\n\t}", "private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Purchase purchase = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n ViewHolder viewHolder; // view lookup cache stored in tag\n\n final View result;\n\n if (convertView == null) {\n\n viewHolder = new ViewHolder();\n LayoutInflater inflater = LayoutInflater.from(getContext());\n convertView = inflater.inflate(R.layout.history_purchase, parent, false);\n viewHolder.purchaseID = (TextView) convertView.findViewById(R.id.purchase_id);\n viewHolder.purchaseDate = (TextView) convertView.findViewById(R.id.purchase_date);\n viewHolder.totalPrice = (TextView) convertView.findViewById(R.id.purchase_price);\n viewHolder.paidPrice = (TextView) convertView.findViewById(R.id.purchase_paid_price);\n viewHolder.purchaseProducts = (LinearLayout) convertView.findViewById(R.id.purchase_prdsucts);\n viewHolder.item = (LinearLayout) convertView.findViewById(R.id.item);\n\n result=convertView;\n\n convertView.setTag(viewHolder);\n } else {\n viewHolder = (ViewHolder) convertView.getTag();\n result=convertView;\n }\n\n viewHolder.purchaseID.setText(purchase.getUuid().toString().substring(0, 6));\n viewHolder.purchaseDate.setText(purchase.getDateString());\n viewHolder.totalPrice.setText(String.format (\"%.2f\", purchase.getTotalPrice()) +\"€\");\n viewHolder.paidPrice.setText(String.format (\"%.2f\", purchase.getPaidPrice()) +\"€\");\n viewHolder.purchaseProducts.removeAllViews();\n\n for(int i = 0; i < purchase.getProducts().size(); i++){\n TextView textView = new TextView(this.mContext);\n textView.setText(purchase.getProducts().get(i).getName() + \" - \" + String.format (\"%.2f\", purchase.getProducts().get(i).getPrice())+\"€\");\n textView.setTextSize((float) 17);\n textView.setTextColor(Color.parseColor(\"#003845\"));\n Typeface font = Typeface.createFromAsset(mContext.getAssets(), \"raleway.ttf\");\n textView.setTypeface(font);\n\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n params.setMargins(0,0,0,10);\n textView.setLayoutParams(params);\n\n viewHolder.purchaseProducts.addView(textView);\n }\n\n //EXTRA FEATURE\n viewHolder.item.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n LinearLayout itemView = (LinearLayout) v;\n TextView objectID = (TextView) itemView.findViewById(R.id.purchase_id);\n\n Toast.makeText(mContext, \"ID: \" + objectID.getText(), Toast.LENGTH_SHORT).show();\n\n Preferences preferences = new Preferences(mContext);\n ArrayList<Purchase> history = new ArrayList<>();\n try {\n history = preferences.getPurchases();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Product> newProducts = new ArrayList<>();\n for(int i=0; i<history.size(); i++){\n String id = history.get(i).getUuid().toString().substring(0, 6);\n if(objectID.getText().equals(id)){\n newProducts = history.get(i).getProducts();\n break;\n }\n }\n\n try {\n ArrayList<Product> basketP = null;\n basketP = preferences.getBasket();\n\n if (basketP.size() + newProducts.size() <= 10) {\n for (int i = 0; i < newProducts.size(); i++) {\n basketP.add(newProducts.get(i));\n }\n\n preferences.saveBasket(basketP);\n Toast.makeText(mContext, \"Products added to your basket with success.\", Toast.LENGTH_SHORT).show();\n }\n else{\n Toast.makeText(mContext, \"You can only have 10 items in basket.\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (JSONException e) {\n Toast.makeText(mContext, \"There was a problem adding products to basket, please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n return convertView;\n }", "@Override\n\tpublic ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\t\tContext ctx = parent.getContext();\n\t\tTextView view = new TextView(ctx);\n\t\tint standardPad = (int) ctx.getResources().getDimension(R.dimen.padding_standard);\n\t\tint tinyPad = (int) ctx.getResources().getDimension(R.dimen.padding_tiny);\n\t\tview.setPadding(standardPad, tinyPad, standardPad, tinyPad);\n\t\tFrameLayout.LayoutParams params = new FrameLayout.LayoutParams(\n\t\t\t\tFrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT);\n\t\tview.setLayoutParams(params);\n\t\tview.setLineSpacing(tinyPad, view.getLineSpacingMultiplier());\n\t\treturn new ItemViewHolder(view);\n\t}", "private void buildTextLayouts(FontRenderContext frc, String fontName, int fontSize, String text, boolean bold, boolean italic) {\n AttributedString attrStr = makeAttributedString(\r\n fontName,\r\n fontSize,\r\n text,\r\n bold,\r\n italic);\r\n AttributedCharacterIterator paragraph = attrStr.getIterator();\r\n LineBreakMeasurer lineMeasurer = new LineBreakMeasurer(paragraph, frc);\r\n lineMeasurer.setPosition(paragraph.getBeginIndex());\r\n int end = paragraph.getEndIndex();\r\n while (lineMeasurer.getPosition() < end) {\r\n //compute line width to account for indents \t\r\n double lineWidth = pageWidth - 2 * margin; \r\n TextLayout l = lineMeasurer.nextLayout((float) lineWidth);\r\n textLayouts.add(l);\r\n }\r\n }", "@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tl = 0;\n\t\tt = 0;\n\t\tr = getWidth();\n\t\tb = getHeight();\n\n\t\tif (header != null) {\n\t\t\theader.layout(l, t, r, header.getMeasuredHeight());\n\t\t\titem.layout(l, header.getMeasuredHeight(), r, b);\n\t\t} else if (divider != null) {\n\t\t\tdivider.setBounds(l, t, r, dividerHeight);\n\t\t\titem.layout(l, dividerHeight, r, b);\n\t\t} else {\n\t\t\titem.layout(l, t, r, b);\n\t\t}\n\t}", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n //choose a different layout for each item based on position or data\n int itemLayout = 0;\n switch (viewType) {\n case 1:\n itemLayout = R.layout.rv_list_item_type1;\n break;\n case 2:\n itemLayout = R.layout.rv_list_item_type2;\n break;\n }\n View view = LayoutInflater.from(parent.getContext()).inflate(itemLayout, parent, false);\n\n return new ViewHolder(view);\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState){\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\t\n\t/* \n\t * This part does two things\n\t * First - It counts the number of items and displays them\n\t * Second - It displays the text in the \"\" which is a brief description of that item\n\t * Removing any of these will remove that item but be sure to edit ALL the cases below or your list\n\t * won't line up properly\n\t */\n\t\t\n\t\t/**\n\t\t ** NOTE: in order to have different views on tablet vs phones, I added an if/else statement to this\n\t\t ** section. Be sure to remove BOTH parts to remove it from phones and tablets. Failure to remove both\n\t\t ** parts will result in the app functioning differently on phones and tablets.\n\t\t **/\n\n\t\t/* \n\t\t * Sets the Title and description text for each GridView item\n\t\t * Check res/values/strings.xml to change text to whatever you want each GridView to say\n\t\t */\n\t\tboolean tabletSize = getResources().getBoolean(R.bool.isTablet);\n\t\tif (tabletSize) {\n\t\t\tgridView = (ScrollGridView)getView().findViewById(R.id.grid);\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_apply), \n\t\t\t\t\tgetResources().getString (R.string.desc_apply), 0));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_walls), \n\t\t\t\t\tgetResources().getString (R.string.desc_walls), 1));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_request), \n\t\t\t\t\tgetResources().getString (R.string.desc_request), 2));\n\t\t\tlistOfStuff.remove(new AdapterItem(getResources().getString (R.string.title_info), \n\t\t\t\t\tgetResources().getString (R.string.desc_info), 3));\n\n\t\t\t\n\t\t} else {\n\t\t\tgridView = (ScrollGridView)getView().findViewById(R.id.grid);\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_apply), \n\t\t\t\t\tgetResources().getString (R.string.desc_apply), 0));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_walls), \n\t\t\t\t\tgetResources().getString (R.string.desc_walls), 1));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_request), \n\t\t\t\t\tgetResources().getString (R.string.desc_request), 2));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_info), \n\t\t\t\t\tgetResources().getString (R.string.desc_info), 3));\n\t\t}\n\n\t\t/**\n\t\t ** NOTE: in order to have different views on tablet vs phones, I added an if/else statement to this\n\t\t ** section. Be sure to remove both parts to remove it from phones and tablets. Failure to remove both\n\t\t ** parts will result in the app functioning differently on phones and tablets.\n\t\t **/\n\t\t\tMainAdapter adapter = new MainAdapter(getActivity(), listOfStuff);\n\t\n\t\t\tgridView.setAdapter(adapter);\n\t\t\tgridView.setExpanded(true);\n\t\t\tgridView.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n\t\t\t\t\t\n\t\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\t\tMainFragment gridContentT = null;\n\t\t\t\t\t\n\t\t\t\t\tboolean tabletSize = getResources().getBoolean(R.bool.isTablet);\n\t\t\t\t\tif (tabletSize) { // For TABLETS\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (position) {\n\t\t\t\t\tcase APPLY:\n\t\t\t\t\t\tIntent launcher = new Intent(getSherlockActivity(), ApplyLauncherMain.class);\n\t\t\t\t\t\tstartActivity(launcher);\n\t\t\t \tbreak;\n\t\t\t\t\tcase WALLPAPER:\n\t\t\t\t\t\tIntent wall = new Intent(getSherlockActivity(), Wallpaper.class);\n\t\t\t\t\t\tstartActivity(wall);\n\t\t\t \tbreak;\n\t\t\t\t\tcase REQUEST:\n\t\t\t\t\t\tIntent request = new Intent(getSherlockActivity(), RequestActivity.class);\n\t\t\t\t\t\tstartActivity(request);\n\t\t\t \tbreak;\n\t\t\t\t\t\t}\t\n\t\t\t\t} else {\t// For PHONES\n\t\t\t\t\tswitch (position) {\n\t\t\t\t\tcase APPLY:\n\t\t\t\t\t\tIntent launcher = new Intent(getSherlockActivity(), ApplyLauncherMain.class);\n\t\t\t\t\t\tstartActivity(launcher);\n\t\t \t\tbreak;\n\t\t\t\t\tcase WALLPAPER:\n\t\t\t\t\t\tIntent wall = new Intent(getSherlockActivity(), Wallpaper.class);\n\t\t\t\t\t\tstartActivity(wall);\n\t\t \t\tbreak;\n\t\t\t\t\tcase REQUEST:\n\t\t\t\t\t\tIntent request = new Intent(getSherlockActivity(), RequestActivity.class);\n\t\t\t\t\t\tstartActivity(request);\n\t\t \t\tbreak;\n\t\t\t\t\tcase THEMEINFO:\n\t\t\t\t\t\tIntent aboutTheme = new Intent(getSherlockActivity(), AboutThemeActivity.class);\n\t\t\t\t\t\tstartActivity(aboutTheme);\n\t\t \t\tbreak;\n\t\t \t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t});\n\t\t\t\n\t}", "public void a() {\n this.f25458d.a(this.f25457c);\n this.f25457c.a(this);\n Context context = getContext();\n LinearLayout linearLayout = new LinearLayout(context);\n linearLayout.setOrientation(1);\n addView(linearLayout, new ViewGroup.LayoutParams(-1, -2));\n d a2 = ShopAssistantItemView_.a(context);\n a2.a(R.drawable.ic_myproducts, R.string.sp_my_products, 0);\n a2.setTag(\"PRODUCT\");\n a2.setMinimumHeight(this.f25455a);\n linearLayout.addView(a2, new FrameLayout.LayoutParams(-1, -2));\n d a3 = ShopAssistantItemView_.a(context);\n a3.a(R.drawable.ic_mycustomers, R.string.sp_my_customers, 2);\n linearLayout.addView(a3, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a4 = ShopAssistantItemView_.a(context);\n a4.a(R.drawable.ic_shopprofile, R.string.sp_label_shop_profile, 6);\n linearLayout.addView(a4, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a5 = ShopAssistantItemView_.a(context);\n a5.a(R.drawable.img_shopsettings, R.string.sp_shop_settings, 4);\n linearLayout.addView(a5, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a6 = ShopAssistantItemView_.a(context);\n a6.a(R.drawable.ic_categories, R.string.sp_my_shop_categories, 8);\n a6.setSubtitle(this.f25461g.getCategoriesPath());\n linearLayout.addView(a6, new FrameLayout.LayoutParams(-1, this.f25455a));\n View view = new View(context);\n view.setBackgroundColor(b.a(R.color.background));\n linearLayout.addView(view, new FrameLayout.LayoutParams(-1, b.a.k));\n View view2 = new View(context);\n view2.setBackgroundColor(com.garena.android.appkit.tools.b.a(R.color.black06));\n linearLayout.addView(view2, new FrameLayout.LayoutParams(-1, b.a.f7690a));\n View inflate = ((LayoutInflater) context.getSystemService(\"layout_inflater\")).inflate(R.layout.seller_center, (ViewGroup) null);\n ((TextView) inflate.findViewById(R.id.url)).setText(\"http://seller\" + i.f7042e);\n int b2 = com.garena.android.appkit.tools.b.b() - b.a.m;\n w.a(getContext()).a((int) R.drawable.sellercentre_banner).b(b2, (int) (((float) b2) / 1.886f)).e().f().a((ImageView) inflate.findViewById(R.id.banner));\n FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);\n inflate.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n g.this.f25459e.V();\n }\n });\n linearLayout.addView(inflate, layoutParams);\n this.f25457c.e();\n this.f25457c.f();\n }", "private void renderer(int rv, ArrayList<ItemBox> list){\n recyclerView = findViewById(rv);\r\n recyclerView.setHasFixedSize(true);\r\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\r\n RecyclerView.Adapter adapter = new Itembox_Adapter(list, this, 1);\r\n recyclerView.setLayoutManager(layoutManager);\r\n recyclerView.setAdapter(adapter);\r\n }", "public void createViews(){\n ArrayList<Words> wordsArrayList = new ArrayList<Words>();\n\n //Fill array with english word and hindi translation by creating new word objects\n for(int i = 0; i < defaultWords.size() && i < hindiTranslation.size(); i++){\n wordsArrayList.add(new Words(defaultWords.get(i), hindiTranslation.get(i)));\n }\n\n //ArrayAdapter and ListView used so that not a lot of memory is used to create all textviews when not needed\n //Update** Using WordAdapter which extends ArrayAdapter and only has 2 parameters\n\n WordAdapter adapter = new WordAdapter(this, wordsArrayList);\n\n ListView listView = (ListView) findViewById(R.id.translation_root_view);\n\n listView.setAdapter(adapter);\n\n\n }", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "public void initList(LinearLayout container) {\n for (Quote quote : this.items) {\n View view = LayoutInflater.from(this.context).inflate(R.layout.row_quote, null);\n QuoteListViewHolder viewHolder = new QuoteListViewHolder(view);\n\n viewHolder.populate(quote);\n container.addView(view);\n }\n }", "@Override\n public void viewCreated() {\n TextView title = (TextView) inflater.inflate(R.layout.layout_custom_title, null);\n title.setId(R.id.txt_title);\n title.setText(R.string.balance_title);\n layout.addView(title);\n // [END Creating the title textview]\n\n // [START Creating amount textview]\n // Filling it with content, changing the design and moving it below the title\n amount = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n amount.setId(R.id.txt_amount);\n amount.setTextSize(TypedValue.COMPLEX_UNIT_PT, 30f);\n amount.setAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.fade_in));\n amount.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n\n RelativeLayout.LayoutParams amountParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT\n );\n amountParams.addRule(RelativeLayout.BELOW, title.getId());\n amountParams.addRule(RelativeLayout.CENTER_IN_PARENT);\n amountParams.setMargins(20, 20, 20, 20);\n\n layout.addView(amount, amountParams);\n // [END Creating amount textview]\n\n // [START Creating a description textview]\n // to describe what the amount means and moving it below the amount\n TextView description = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n description.setId(R.id.txt_description);\n description.setText(R.string.balance_description);\n\n RelativeLayout.LayoutParams descParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT\n );\n descParams.addRule(RelativeLayout.BELOW, amount.getId());\n\n layout.addView(description, descParams);\n // [END Creating a description textview]\n }", "@Override\n public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n if (viewType == TYPE_ITEM) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_row,parent,false); //Inflating the layout\n\n ViewHolder vhItem = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhItem; // Returning the created object\n\n //inflate your layout and pass it to view holder\n\n } else if (viewType == TYPE_HEADER) {\n\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.header,parent,false); //Inflating the layout\n\n ViewHolder vhHeader = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhHeader; //returning the object created\n\n\n }\n return null;\n\n }", "protected abstract void createItemsForAddedObjects(Layout layout,\r\n boolean doLayout);", "private void castLayoutElements() {\n linlaHeaderProgress = (LinearLayout) view.findViewById(R.id.linlaHeaderProgress);\n listPrinters = (RecyclerView) view.findViewById(R.id.listPrinters);\n linlaEmpty = (LinearLayout) view.findViewById(R.id.linlaEmpty);\n \n /* CONFIGURE THE RECYCLERVIEW */\n listPrinters.setHasFixedSize(true);\n LinearLayoutManager llm = new LinearLayoutManager(getActivity());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n listPrinters.setLayoutManager(llm);\n }", "private void inflateViewForItem(Item item) {\n\n //Inflate Layout\n ItemCardBinding binding = ItemCardBinding.inflate(getLayoutInflater());\n\n //Bind Data\n binding.imageView.setImageBitmap(item.bitmap);\n binding.title.setText(item.label);\n binding.title.setBackgroundColor(item.color);\n\n //Add it to the list\n b.list.addView(binding.getRoot());\n }", "@Override\n public UserAdapter.MyViewHolder onCreateViewHolder (ViewGroup parent, int viewType) {\n LinearLayout v = (LinearLayout) LayoutInflater.from(parent.getContext())\n .inflate(R.layout.custom_list_item, parent, false);\n\n MyViewHolder vh = new MyViewHolder(v);\n return vh;\n }", "@Override\n\t\t\t\t\tpublic View oncreateItem(int index, View convertView,\n\t\t\t\t\t\t\tViewGroup viewgroup) {\n\n\t\t\t\t\t\tfinal WidgetItemInfo widgetItemInfo = itemInfos\n\t\t\t\t\t\t\t\t.get(index);\n\t\t\t\t\t\tif (convertView == null) {\n\t\t\t\t\t\t\t// create\n\t\t\t\t\t\t\tLayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n\t\t\t\t\t\t\tconvertView = inflater.inflate(\n\t\t\t\t\t\t\t\t\tR.layout.issue_feedback_ui, viewgroup,\n\t\t\t\t\t\t\t\t\tfalse);\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// bind tag\n\t\t\t\t\t\tconvertView.setTag(widgetItemInfo);\n\t\t\t\t\t\treturn convertView;\n\t\t\t\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n HashMap<String, String> map = new HashMap<String, String>();\n //FILL\n for (int i = 0; i < players.length; i++) {\n map = new HashMap<String, String>();\n map.put(\"Player\", players[i]);\n map.put(\"Desc\", desc[i]);\n map.put(\"Image\", Integer.toString(images[i]));\n map.put(\"Imagemain\", Integer.toString(imagemain[i]));\n data.add(map);\n }\n //KEYS IN MAP\n String[] from = {\"Player\",\"Desc\", \"Image\"};\n //IDS OF VIEWS\n int[] to = {R.id.textView3, R.id.nameTxt, R.id.imageView1};\n//ADAPTER\n adapter = new SimpleAdapter(getActivity(), data, R.layout.model, from, to);\n setListAdapter(adapter);\n return super.onCreateView(inflater, container, savedInstanceState);\n }", "@Override\n\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\tListItem item=list.get(arg0);\n\t\tViewHolder holder=null;\n\t\tif(arg1==null){\n\t\t\tholder=new ViewHolder();\n\t\t\n\t\t\targ1=LayoutInflater.from(context).inflate(R.layout.layout_item, null);\t\n\t\t\tholder.ll=(LinearLayout)arg1;\n\t\t\targ1.setTag(holder);\n\t\t}else{\n\t\t\tholder=(ViewHolder)arg1.getTag();\n\t\t}\n\t\tList<Stories> stories=item.getList();\n\t\tTextView date=(TextView)holder.ll.findViewById(R.id.textView);\n\t\tLinearLayout l=(LinearLayout)holder.ll.findViewById(R.id.container);\n\t\tdate.setText(item.getDate());\n\t\tl.removeAllViews();\n\n\t\tfor(int i=0;i<stories.size();i++){\n\t\t\tfinal Stories s=stories.get(i);\n\t\t\tView v=LayoutInflater.from(context).inflate(R.layout.news_layout, null);\n\t\t\tv.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tIntent intent=new Intent(context,TextActivity.class);\n\t\t\t\t\tintent.putExtra(\"ID\", s.getId());\n\t\t\t\t\tcontext.startActivity(intent);\n\t\t\t\t}\n\t\t\t});\n\t\t\tTextView tv=(TextView)v.findViewById(R.id.tvTitle);\n\t\t\ttv.setText(s.getTitle());\n\t\t\tImageView iv=(ImageView)v.findViewById(R.id.ivTitle);\n\t\t\tString url = s.getImages().replace(\"\\\\\", \"\");\n\t\t\t\n\t\t\tImageLoaderUtil.display(url, iv);\n\t\t\tl.addView(v);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn arg1;\n\t}", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent)\n\t{\n\t\tLinearLayout view = (LinearLayout) View.inflate(this.mContext, this.mCustomRowLayoutId, null);\n\t\tTextView text1 = (TextView) view.findViewById(R.id.text1);\n\t\tTextView text2 = (TextView) view.findViewById(R.id.text2);\n\t\t\n\t\tOrganization curr = getItem(position);\n\t\t\n\t\ttext1.setTextColor(Color.WHITE);\n\t\ttext2.setTextColor(Color.WHITE);\n\t\t\n\t\ttext1.setTextSize(20);\n\t\t\n\t\ttext1.setText(curr.getName());\n\t\ttext2.setText(curr.getDescription());\n\t\t\n\t\treturn view;\n\t}", "@Override\n public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n LinearLayout layout = (LinearLayout) LayoutInflater.from(parent.getContext())\n .inflate(R.layout.list_item, parent, false);\n ViewHolder vh = new ViewHolder(layout);\n return vh;\n }", "private void addNewListItem() {\n\n View view = LayoutInflater.from(CheckboxNoteActivity.this).inflate(R.layout.cell_item_edit, null);\n final CheckBox checkBox = view.findViewById(R.id.chk_edit_item);\n final EditText mEtListItem = view.findViewById(R.id.et_edit_item);\n final ImageView mIvAddItem = view.findViewById(R.id.iv_add_item);\n\n mEtListItem.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n if (s.length() > 1) {\n mIvAddItem.setVisibility(View.VISIBLE);\n } else {\n mIvAddItem.setVisibility(View.INVISIBLE);\n }\n\n }\n });\n //Successfully insert an item\n mIvAddItem.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mEtListItem.setEnabled(true);\n mRlAddItem.setEnabled(true);\n mIvAddItem.setVisibility(View.INVISIBLE);\n\n Items cbitem = new Items();\n cbitem.itemId = row;\n cbitem.itemName = mEtListItem.getText().toString();\n cbitem.isChecked = false;\n items.add(cbitem);\n\n Toast.makeText(CheckboxNoteActivity.this, \"Items Size = \" + items.size()\n + \"Retrieved Items = \" + retrievedItems.size(), Toast.LENGTH_SHORT).show();\n }\n });\n\n\n mLlDynamicLayout.addView(view);\n }", "public void onGlobalLayout() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n llItems.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n } else {\n llItems.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n }\n int centerPosition = 0;\n\n // measure your views here\n int totalChildren = llItems.getChildCount();\n\n for (int i = 0; i < totalChildren - 1; i++) {\n ItemView firstItem = (ItemView) llItems.getChildAt(i);\n ItemView secondItem = (ItemView) llItems.getChildAt(i + 1);\n\n if (i == 0) {\n int paddingLeft = firstItem.getPaddingLeft();\n\n View radioButton = firstItem.findViewById(R.id.rb__choice);\n centerPosition = paddingLeft + radioButton.getWidth() / 2;\n }\n\n View lineView = inflater.inflate(R.layout.item_vertical_line, null);\n llLines.addView(lineView);\n lineView.setTag(\"LINE_\" + i);\n\n View line = lineView.findViewById(R.id.v__line);\n LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) line.getLayoutParams();\n\n int topSpace = 0;\n if (i == 0) {\n topSpace = firstItem.getHeight() / 2 + firstItem.rbChoice.getHeight() / 2;\n } else {\n topSpace = firstItem.rbChoice.getHeight();\n }\n\n params.setMargins(centerPosition - 1, topSpace, 0, 0);\n\n int height = firstItem.getHeight() + secondItem.getTopRadio() - firstItem.getBottomRadio();\n Log.i(\"TRUNGNTH\", \"Height: \" + height + \" secondItem.getTopRadio(): \" + secondItem.getTopRadio() + \" | firstItem.getBottomRadio(): \" + firstItem.getBottomRadio());\n params.height = height;\n line.setLayoutParams(params);\n }\n }", "public void fillTheLayout() {\n for (int i = 0; i < ROW_COUNT; i++) {\n //these are horizontal linear layouts that will be part of the vertical linear layout, shown in XML\n LinearLayout sublinearLayout = new LinearLayout(this);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 1;\n\n sublinearLayout.setLayoutParams(layoutParams);\n //center align the contents\n sublinearLayout.setGravity(Gravity.CENTER);\n sublinearLayout.setPadding(PADDING, PADDING, PADDING, PADDING);\n\n for (int j = 0; j < COLUMN_COUNT; j++) {\n\n// Add the gifImageViews to the linear layout created above\n GifImageView gifImageView = new GifImageView(this);\n LinearLayout.LayoutParams imageViewlayoutParam = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n imageViewlayoutParam.weight = 1;\n\n gifImageView.setLayoutParams(imageViewlayoutParam);\n //this padding helps in showing the white boundaries\n gifImageView.setPadding(PADDING, PADDING, PADDING, PADDING);\n //Similar to storing in row-major form, used that logic to set id's\n gifImageView.setId(i * COLUMN_COUNT + j);\n //main activity implements the onClick\n gifImageView.setOnClickListener(this);\n Block block = new Block(gifImageView);\n block.display();\n arrayList.add(block);\n sublinearLayout.addView(gifImageView);\n\n }\n linearLayout.addView(sublinearLayout);\n }\n //change grid's color, after initialising the layout\n changeColor();\n }", "final void layoutChildren(final boolean queryAdapter) {\n final int paddingLeft = getPaddingLeft();\n final int paddingRight = getPaddingRight();\n final int itemMargin = mItemMargin;\n final int colWidth =\n (getWidth() - paddingLeft - paddingRight - itemMargin * (mColCount - 1)) / mColCount;\n int rebuildLayoutRecordsBefore = -1;\n int rebuildLayoutRecordsAfter = -1;\n\n Arrays.fill(mItemBottoms, Integer.MIN_VALUE);\n\n final int childCount = getChildCount();\n for (int i = 0; i < childCount; i++) {\n View child = getChildAt(i);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n int col = lp.column;\n final int[] margins = lp.margins;\n final int position = mFirstPosition + i;\n final boolean needsLayout = queryAdapter || child.isLayoutRequested();\n boolean newChild = false;\n if (position >= mItemCount) {\n // Sometimes it happens...\n final View toDelete = getSpannedChildAt(i);\n removeViewAt(i);\n if (toDelete != null) {\n // Offset children in case our last child was max spanned\n final int height = toDelete.getHeight();\n offsetChildren(height);\n }\n continue;\n }\n\n if (queryAdapter) {\n View newView = obtainView(position, child);\n if (newView != child) {\n removeViewAt(i);\n addView(newView, i);\n child = newView;\n newChild = true;\n }\n lp = (LayoutParams) child.getLayoutParams(); // Might have changed\n\n lp.column = col; // XXX Initial version of StaggeredGridView actually forgets to correct columns which is a nasty bug\n lp.margins = margins;\n }\n\n final int span = Math.min(mColCount, lp.span);\n final int widthSize = colWidth * span + itemMargin * (span - 1);\n\n if (needsLayout) {\n final int widthSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);\n\n final int heightSpec;\n if (lp.height == LayoutParams.WRAP_CONTENT) {\n heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n } else if (lp.height == LayoutParams.MATCH_PARENT) {\n /*heightSpec = getChildMeasureSpec(\n MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST),\n getPaddingTop() + getPaddingBottom(),\n lp.height\n );*/\n // XXX HACK\n heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(),\n MeasureSpec.EXACTLY);\n } else {\n heightSpec = MeasureSpec.makeMeasureSpec(lp.height, MeasureSpec.EXACTLY);\n }\n\n child.measure(widthSpec, heightSpec);\n }\n\n int childTop = mItemBottoms[col] > Integer.MIN_VALUE ? mItemBottoms[col] + mItemMargin\n : /*child.getTop() + (*/newChild ? mItemMargin + getPaddingTop() : child.getTop()/*0)*/;\n if (span > 1) {\n int lowest = childTop;\n for (int j = col + 1; j < col + span; j++) {\n final int bottom = mItemBottoms[j] + mItemMargin;\n if (bottom > lowest) {\n lowest = bottom;\n }\n }\n childTop = lowest;\n }\n final int childHeight = child.getMeasuredHeight();\n final int childBottom = childTop + childHeight;\n final int childLeft = paddingLeft + col * (colWidth + itemMargin);\n final int childRight = childLeft + child.getMeasuredWidth();\n child.layout(childLeft, childTop, childRight, childBottom);\n\n for (int j = col; j < col + span; j++) {\n mItemBottoms[j] = childBottom;\n }\n\n final LayoutRecord rec = mLayoutRecords.get(position);\n if (rec != null && rec.height != childHeight) {\n // Invalidate our layout records for everything before this.\n rec.height = childHeight;\n /*\n * XXX was \"rebuildLayoutRecordsBefore\" previously\n * Rebuilding layout records \"before\" this position\n * leads to a nasty bug - margins for spanned children disappear\n * and the grid layouts children incorrectly\n * I DON'T REALLY KNOW WHY THIS IS SO....\n */\n rebuildLayoutRecordsAfter = position;\n }\n\n if (rec != null && rec.span != span) {\n // Invalidate our layout records for everything after this.\n rec.span = span;\n rebuildLayoutRecordsAfter = position;\n }\n\n }\n\n // Update mItemBottoms for any empty columns\n for (int i = 0; i < mColCount; i++) {\n if (mItemBottoms[i] == Integer.MIN_VALUE) {\n mItemBottoms[i] = mItemTops[i];\n }\n }\n\n if (rebuildLayoutRecordsBefore >= 0 || rebuildLayoutRecordsAfter >= 0) {\n if (rebuildLayoutRecordsBefore >= 0) {\n invalidateLayoutRecordsBeforePosition(rebuildLayoutRecordsBefore);\n }\n if (rebuildLayoutRecordsAfter >= 0) {\n invalidateLayoutRecordsAfterPosition(rebuildLayoutRecordsAfter);\n }\n for (int i = 0; i < childCount; i++) {\n final int position = mFirstPosition + i;\n final View child = getChildAt(i);\n final LayoutParams lp = (LayoutParams) child.getLayoutParams();\n LayoutRecord rec = mLayoutRecords.get(position);\n if (rec == null) {\n rec = new LayoutRecord();\n mLayoutRecords.put(position, rec);\n }\n rec.column = lp.column;\n rec.height = child.getHeight();\n rec.id = lp.id;\n final int span = Math.min(mColCount, lp.span);\n rec.span = span;\n rec.mMargins = lp.margins;\n }\n }\n }", "public View getView(int position, View convertView, ViewGroup parent){\n\n\t\t// assign the view we are converting to a local variable\n\t\tView v = convertView;\n\n\t\t// first check to see if the view is null. if so, we have to inflate it.\n\t\t// to inflate it basically means to render, or show, the view.\n\t\tif (v == null) {\n\t\t\tLayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tv = inflater.inflate(R.layout.list_item, null);\n\t\t}\n\n\t\t/*\n\t\t * Recall that the variable position is sent in as an argument to this method.\n\t\t * The variable simply refers to the position of the current object in the list. (The ArrayAdapter\n\t\t * iterates through the list we sent it)\n\t\t * \n\t\t * Therefore, i refers to the current Item object.\n\t\t */\n\t\titem i = objects.get(position);\n\n\t\tif (i != null) {\n\n\t\t\t// This is how you obtain a reference to the TextViews.\n\t\t\t// These TextViews are created in the XML files we defined.\n\n\t\t\tTextView tn = (TextView) v.findViewById(R.id.tnLabel);\n\t\t\tTextView tnd = (TextView) v.findViewById(R.id.tnData);\n\t\t\tTextView dt = (TextView) v.findViewById(R.id.dtLabel);\n\t\t\tTextView dtd = (TextView) v.findViewById(R.id.dtData);\n\t\t\tTextView at = (TextView) v.findViewById(R.id.atLabel);\n\t\t\tTextView atd = (TextView) v.findViewById(R.id.atData);\n\n\t\t\t// check to see if each individual textview is null.\n\t\t\t// if not, assign some text\n\t\t\tif (tn != null){\n\t\t\t\ttn.setText(\"Train Number: \");\n\t\t\t}\n\t\t\tif (tnd != null){\n\t\t\t\ttnd.setText(i.getTrainNum());\n\t\t\t}\n\t\t\tif (dt != null){\n\t\t\t\tdt.setText(\"Departure Time: \");\n\t\t\t}\n\t\t\tif (dtd != null){\n\t\t\t\tdtd.setText(i.getDepTime());\n\t\t\t}\n\t\t\tif (at != null){\n\t\t\t\tat.setText(\"Arrival Time: \");\n\t\t\t}\n\t\t\tif (atd != null){\n\t\t\t\tatd.setText(i.getArrTime());\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// the view must be returned to our activity\n\t\treturn v;\n\n\t}", "@Override\n public TravlerAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.travler_items_layout, parent, false);\n\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tView view = inflater.inflate(R.layout.list_item_table_row_read, parent, false);\n\t\t\tSet<Entry<String, JsonElement>> set = mTableRows[position].getAsJsonObject().entrySet();\n\t\t\tLinearLayout layoutItem = (LinearLayout) view.findViewById(R.id.layoutItem);\n\t\t\t//Loop through each data item in the row and create a layout with the key and \n\t\t\t//value displayed in TextViews within it\n\t\t\tfor (Entry<String, JsonElement> entry : set) {\n\t\t\t\tLog.i(TAG, entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout rowLayout = new RelativeLayout(mContext);\n\t\t\t\tRelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\t\t\t\t\n\t\t\t\trowLayout.setLayoutParams(params);\t\t\t\t\n\t\t\t\tTextView lblKey = new TextView(mContext);\n\t\t\t\tlblKey.setText(entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams keyParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tkeyParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n\t\t\t\tkeyParams.leftMargin = 20;\n\t\t\t\tlblKey.setLayoutParams(keyParams);\t\t\t\t\n\t\t\t\tTextView lblValue = new TextView(mContext);\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams valueParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tvalueParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\t\t\t\tlblValue.setLayoutParams(valueParams);\n\t\t\t\t//Limit the amount of text we show so the UI isn't dirty\n\t\t\t\tInputFilter[] FilterArray = new InputFilter[1];\n\t\t\t\tFilterArray[0] = new InputFilter.LengthFilter(25);\n\t\t\t\tlblValue.setFilters(FilterArray);\n\t\t\t\tlblValue.setText(entry.getValue().getAsString());\n\t\t\t\tlblValue.setGravity(Gravity.RIGHT);\n\t\t\t\trowLayout.addView(lblKey);\n\t\t\t\trowLayout.addView(lblValue);\n\t\t\t\tlayoutItem.addView(rowLayout);\n\t\t\t}\t\t\t\n\t\t\treturn view;\n\t\t}", "private InnerTextView newAItem() {\n\t\tInnerTextView newTextView = null;\n\t\ttry {\n\t\t\tnewTextView = new InnerTextView(getContext());\n\t\t\tnewTextView.setMinWidth(MIN_TEXT_WIDTH);\n\t\t\tnewTextView.setSingleLine(true);\n\t\t\tnewTextView.setEllipsize(TextUtils.TruncateAt.valueOf(\"END\"));\n\t\t\tnewTextView.setTextSize(mItemFontSize);\n\t\t\tnewTextView.getPaint().setTextSize(mItemFontSize);\n\t\t\tnewTextView.setTextColor(mItemFontColor);\n\t\t\tnewTextView.setGravity(Gravity.CENTER);\n\t\t\tnewTextView.setBackgroundResource(R.drawable.bg_new_message_to_bg);\n\t\t\t\n\t\t\tif (BOLDSTYLE.equals(mItemStyle)) {\n\t\t\t\tnewTextView.getPaint().setFakeBoldText(true);\n\t\t\t}\n\t\t\tnewTextView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (!mInnerEditText.hasFocus()) {\n\t\t\t\t\t\tmInnerEditText.requestFocus();\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tInnerTextView textItem = (InnerTextView)v;\n\t\t\t\t\tif(textItem != null && textItem.isBubbleSelected() \n\t\t\t\t\t\t\t&& DeviceUtils.isAboveAndroidOS4_4()){\n\t\t\t\t\t\tonTextItemDelete();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\t} \n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\tshowKeyboard();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch(Exception err) {\n\t\t\tnewTextView = null;\n\t\t}\n\t\t\n\t\treturn newTextView;\n\t}", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n View view;\n\n view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_service_text, parent, false);\n\n mview=view;\n return new ViewHolder(view); // Inflater means reading a layout XML\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n final int count = getChildCount();\n int parentWidth = getMeasuredWidth();\n\n //get the available size of child view\n int childLeft = this.getPaddingLeft();\n int childTop = this.getPaddingTop();\n\n //walk through each child, and arrange it from left to right\n for (int i = 0; i < count; i++) {\n View child = getChildAt(i);\n if (child.getVisibility() != GONE) {\n LayoutUtils.layoutChild(child, childLeft, childTop);\n childTop += child.getMeasuredHeight();\n }\n }\n }", "@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\t\t\n\t ListAdapter listAdapter = this.getAdapter(); \n\t if (listAdapter == null) { \n\t return; \n\t } \n\t \n\t int totalHeight = 0; \n\t for (int i = 0; i < listAdapter.getCount(); i++) { \n\t View listItem = listAdapter.getView(i, null, this); \n\t try\n\t {\n\t \tlistItem.measure(0, 0); \n\t }\n\t catch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t \n\t totalHeight += listItem.getMeasuredHeight(); \n\t } \n\t \n\t totalHeight = totalHeight + (this.getDividerHeight() * (listAdapter.getCount() - 1));\n\t totalHeight += this.getPaddingBottom();\n\t totalHeight += this.getPaddingTop();\n\t \n\t this.setMeasuredDimension(this.getMeasuredWidth(), totalHeight);\n\t\t\n\t\t\n\t}", "@Override\n public UIAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_layout, parent, false);\n return new ViewHolder(v);\n }", "@Override\n public void generarLinearLayoutV() {\n LinearLayoutManager llm = new LinearLayoutManager(getActivity());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n\n rvMascotas.setLayoutManager(llm);//le entrego el layout a mi lista\n\n }", "public ViewHolder(View itemView) {\n super(itemView);\n\n listName = (TextView) itemView.findViewById(R.id.listName);\n remainingItems = (TextView) itemView.findViewById(R.id.remainingItems);\n listButtonLayout = (LinearLayout) itemView.findViewById(R.id.listButtonLayout);\n btnView = (Button) listButtonLayout.findViewById(R.id.btnEditList);\n btnDeleteList = (Button) listButtonLayout.findViewById(R.id.btnDeleteList);\n\n\n }", "public ViewHolder(View itemView) {\n super(itemView);\n\n tvMessageLeft = (TextView) itemView.findViewById(R.id.tvMessageLeft);\n tvMessageRight = (TextView) itemView.findViewById(R.id.tvMessageRight);\n ivUserIcon = (ImageView) itemView.findViewById(R.id.ivProfPicMessageList);\n // tvTime_stamp = (TextView) itemView.findViewById(R.id.tvTime);\n\n\n //llItemListTop = (LinearLayout) itemView.findViewById(R.id.llListItemTop);\n //llItemListMiddle = (LinearLayout) itemView.findViewById(R.id.llListItemMiddle);\n //llItemListBottom = (LinearLayout) itemView.findViewById(R.id.llListItemTop);\n\n\n }", "@Override\n public listAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // create a new view\n LayoutInflater inflater = LayoutInflater.from(parent.getContext());\n View v = inflater.inflate(R.layout.row_layout, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "private void setUpLayout() {\n myLinearLayout=(LinearLayout)rootView.findViewById(R.id.container_wartaMingguan);\n\n // Add LayoutParams\n params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n params.setMargins(0, 10, 0, 0);\n\n // Param untuk deskripsi\n paramsDeskripsi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n paramsDeskripsi.setMargins(0, 0, 0, 0);\n\n tableParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);\n rowTableParams = new TableLayout.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n\n // Untuk tag \"warta\"\n LinearLayout rowLayout = new LinearLayout(getActivity());\n rowLayout.setOrientation(LinearLayout.HORIZONTAL);\n\n // Membuat linear layout vertical untuk menampung kata-kata\n LinearLayout colLayout = new LinearLayout(getActivity());\n colLayout.setOrientation(LinearLayout.VERTICAL);\n colLayout.setPadding(0, 5, 0, 0);\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View item = LayoutInflater.from(parent.getContext()).inflate(R.layout.item, parent, false);\n// Pasar la vista (item.xml) al ViewHolder\n ViewHolder viewHolder = new ViewHolder(item);\n return viewHolder;\n }", "@Override\n public TreatRecyclerAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.treat_item_row,\n parent, false);\n // set the view's size, margins, paddings and layout parameters\n //...\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.list_maker, parent, false);\n return new MyViewHolder(v);\n }", "@Override\n protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n// int childLeft = getPaddingLeft();\n// int childRight = right - left - getPaddingRight();\n// int childTop = getPaddingTop();\n// int childBottom = bottom - top - getPaddingBottom();\n//\n// int tempLeftBottom = childTop + leftLabel.getMeasuredHeight();\n// leftLabel.item_personal_center_prefix(childLeft, childTop, childRight, tempLeftBottom);\n// childTop += leftLabel.getMeasuredHeight();\n//\n// int tempRightTop = childBottom - rightLebel.getMeasuredHeight();\n// rightLebel.item_personal_center_prefix(childLeft, tempRightTop, childRight, childBottom);\n// childBottom -= rightLebel.getMeasuredHeight();\n//\n//\n// inputEdit.item_personal_center_prefix(childLeft, childTop, childRight, childBottom);\n int childLeft = getPaddingLeft();\n int childTop = getPaddingTop();\n int childBottom = leftLabel.getMeasuredHeight();\n int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);\n int h = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);\n leftLabel.measure(w, h);\n inputEdit.measure(w, h);\n rightLebel.measure(w, h);\n divider.measure(w, h);\n\n int childRight = leftLabel.getMeasuredWidth();\n leftLabel.layout(childLeft, childTop, childRight, childBottom);\n\n childLeft += leftLabel.getMeasuredWidth();\n childRight = right - getPaddingRight() - rightLebel.getMeasuredWidth();\n childBottom = inputEdit.getMeasuredHeight();\n inputEdit.layout(childLeft, childTop, childRight, childBottom);\n\n childLeft = right - rightLebel.getMeasuredWidth() - getPaddingRight();\n childRight = right - getPaddingRight();\n childBottom = rightLebel.getMeasuredHeight();\n rightLebel.layout(childLeft, childTop, childRight, childBottom);\n\n childLeft = getPaddingLeft();\n childRight= right - getPaddingRight();\n childTop = getPaddingTop() + inputEdit.getMeasuredHeight();\n childBottom = childTop + 1;\n divider.layout(childLeft, childTop + dividerPadding, childRight, childBottom);\n }", "public ItemAdapter(Context context, int textViewResourceId, ArrayList<item> objects) {\n\t\tsuper(context, textViewResourceId, objects);\n\t\tthis.objects = objects;\n\t}", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n View itemLayoutView = LayoutInflater.from(parent.getContext())\n .inflate(resLayout, parent,false);\n\n // create ViewHolder\n return new ViewHolder(itemLayoutView);\n }", "public static void setTextFonts2(Context mContext, String[] fonts, String[] texts, TextView textViewItem) {\n\n\t\tString content = texts[0];\n\t\tTypeface content_font = Typefaces.get(mContext, fonts[0]);\n\t\t// set texts\n\t\tif(texts.length > 1) {\n\t\t\tint i = 0;\n\t\t\twhile(i < texts.length) {\n\t\t\t\tString text = texts[i];\n\t\t\t\tif(content.contains(\"{\" + (i-1) + \"}\")) {\n\t\t\t\t\tcontent = content.replace(\"{\" + (i-1) + \"}\", text);\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t// set fonts\n\t\tSpannableStringBuilder SS = new SpannableStringBuilder(content);\n\t\tint last_index = 0;\n\t\tchar[] last_array = null;\n\t\tif(texts.length > 1) {\n\t\t\tint index = 1;\n\t\t\twhile(index < texts.length) {\n\t\t\t\tString text = texts[index];\n\n\t\t\t\tint current_index = content.indexOf(text);\n\n\t\t\t\tchar[] charArrayCurrent = text.toCharArray();\n\t\t\t\tTypeface current_font = Typefaces.get(mContext, fonts[index]);\n\n\t\t\t\tif(last_index <= 0) {\n\t\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", content_font), 0, current_index, Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", current_font), current_index, current_index + charArrayCurrent.length,Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t\t} else {\n\t\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", content_font), last_index + last_array.length + 1, current_index,Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", current_font), current_index, current_index + charArrayCurrent.length,Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t\t}\n\n\t\t\t\tlast_index = current_index;\n\t\t\t\tlast_array = charArrayCurrent;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tif(last_index + last_array.length < content.length()) {\n\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", content_font), last_index + last_array.length + 1, content.length(),Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t}\n\t\t}\n\t\t// set text\n\t\ttextViewItem.setText(SS);\n\n\t}", "@SuppressLint(\"SetTextI18n\")\n @Override\n public Object instantiateItem(ViewGroup container, int position) {\n TextView tv = new TextView(getContext());\n tv.setBackgroundColor(Colors[position]);\n tv.setTextColor(Color.WHITE);\n tv.setText(\"\"+position);\n container.addView(tv);\n return tv;\n }", "private void initBaseLayout() {\n if (topText != null) {\n TextView topicText = new TextView(mainContext);\n topicText.setText(topText);\n dimensionsContainer.setViewStyle(KEY_TOPIC_TEXT, topicText);\n topicText.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_topic));\n topicText.setClickable(true);\n topicText.setOnClickListener(generalClickListener);\n blankLayout.addView(topicText);\n }\n//Add topLayout\n //if (topLayout == null) {\n topLayout = new LinearLayout(mainContext);\n topLayout.setOrientation(LinearLayout.HORIZONTAL);\n topLayout.setLayoutParams(layoutParams_WC_WC);\n topLayout.setBackgroundColor(bgColor_Table);\n blankLayout.addView(topLayout);\n//Add numTop\n TextView numTop = new TextView(mainContext);\n numTop.setText(R.string.symbol_num);\n dimensionsContainer.setViewStyle(KEY_NUM_TOP, numTop);\n numTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_top));\n numTop.setClickable(true);\n numTop.setOnClickListener(generalClickListener);\n topLayout.addView(numTop);\n//Add nameTop\n TextView nameTop = new TextView(mainContext);\n nameTop.setText(nameTopTextResId);\n dimensionsContainer.setViewStyle(KEY_NAME_TOP, nameTop);\n nameTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_name_top));\n nameTop.setClickable(true);\n nameTop.setOnClickListener(generalClickListener);\n topLayout.addView(nameTop);\n\n\n\n\n\n\n//Add topHScrollView\n// if (layoutHandler.topHScrollView == null) {\n topHScrollView = new SyncedHorizontalScrollView(mainContext);\n topHScrollView.setLayoutParams(layoutParams_WC_MP);\n topHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor() !=\n null) //OverScrollColor\n {\n topHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor());\n }\n topLayout.addView(topHScrollView);\n\n//Add topScrollLayout\n // if(layoutHandler.topScrollLayout == null) {\n topScrollLayout = new LinearLayout(mainContext);\n topScrollLayout.setBackgroundColor(bgColor_Table);\n topHScrollView.addView(topScrollLayout);\n\n//Add bodyScrollView\n //if(layoutHandler.bodyScrollView == null) {\n bodyScrollView = new ScrollView(mainContext);\n bodyScrollView.setLayoutParams(layoutParams_MP_WC);\n bodyScrollView.setVerticalScrollBarEnabled(false);\n //bodyScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER);\n blankLayout.addView(bodyScrollView);\n//Add bodyLayout\n //if(layoutHandler.bodyLayout == null) {\n bodyLayout = new LinearLayout(mainContext);\n bodyLayout.setOrientation(LinearLayout.HORIZONTAL);\n bodyLayout.setLayoutParams(layoutParams_WC_WC);\n bodyScrollView.addView(bodyLayout);\n\n//Add bodyLeftLayout\n //if(layoutHandler.bodyLeftLayout == null) {\n bodyLeftLayout = new LinearLayout(mainContext);\n bodyLeftLayout.setOrientation(LinearLayout.VERTICAL);\n bodyLeftLayout.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.setBackgroundColor(bgColor_Table);\n bodyLayout.addView(bodyLeftLayout);\n\n//Add bodyHScrollView\n //if(layoutHandler.bodyHScrollView == null) {\n bodyHScrollView = new SyncedHorizontalScrollView(mainContext);\n bodyHScrollView.setLayoutParams(layoutParams_WC_WC);\n bodyHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor() !=\n null)//OverScrollColor\n {\n bodyHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor());\n }\n bodyLayout.addView(bodyHScrollView);\n\n//Add bodyRightLayout\n //if(layoutHandler.bodyRightLayout == null) {\n bodyRightLayout = new LinearLayout(mainContext);\n bodyRightLayout.setOrientation(LinearLayout.VERTICAL);\n bodyRightLayout.setBackgroundColor(bgColor_Table);\n bodyHScrollView.addView(bodyRightLayout);\n\n//Add Scroll Listeners\n\n ScrollManager scrollManager = new ScrollManager();\n scrollManager.setScrollDirection(ScrollManager.SCROLL_HORIZONTAL);\n scrollManager.addScrollClient(topHScrollView);\n scrollManager.addScrollClient(bodyHScrollView);\n\n// bodyScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// bodyHScrollView.getParent().requestDisallowInterceptTouchEvent(false);\n// return false;\n// }\n// });\n// bodyHScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// v.getParent().requestDisallowInterceptTouchEvent(true);\n// return false;\n// }\n// });\n\n //ScrollManager.disallowParentScroll(bodyHScrollView, 100);\n //ScrollManager.disallowChildScroll(bodyHScrollView, bodyLayout, 100);\n //bodyHScrollView.getWidth());\n //Dimensions.dipToPixels(mainContext, 800));\n// ScrollManager\n// .disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 200));\n //TODO: disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 50));\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n /* Get the incoming data from the calling activity */\n String itemKey = getIntent().getStringExtra(\"com.gimranov.zandy.client.itemKey\");\n item = Item.load(itemKey);\n \n // When an item in the view has been updated via a sync, the temporary key may have\n // been swapped out, so we fall back on the DB ID\n if (item == null) {\n String itemDbId = getIntent().getStringExtra(\"com.gimranov.zandy.client.itemDbId\");\n \titem = Item.loadDbId(itemDbId);\n }\n \t\n // Set the activity title to the current item's title, if the title works\n if (item.getTitle() != null && !item.getTitle().equals(\"\"))\n \tthis.setTitle(item.getTitle());\n else\n \tthis.setTitle(\"Item Data\");\n \n ArrayList<Bundle> rows = item.toBundleArray();\n \n /* \n * We use the standard ArrayAdapter, passing in our data as a Bundle.\n * Since it's no longer a simple TextView, we need to override getView, but\n * we can do that anonymously.\n */\n setListAdapter(new ArrayAdapter<Bundle>(this, R.layout.list_data, rows) {\n \t@Override\n \tpublic View getView(int position, View convertView, ViewGroup parent) {\n \t\tView row;\n \t\t\n // We are reusing views, but we need to initialize it if null\n \t\tif (null == convertView) {\n LayoutInflater inflater = getLayoutInflater();\n \t\t\trow = inflater.inflate(R.layout.list_data, null);\n \t\t} else {\n \t\t\trow = convertView;\n \t\t}\n \n \t\t/* Our layout has just two fields */\n \t\tTextView tvLabel = (TextView) row.findViewById(R.id.data_label);\n \t\tTextView tvContent = (TextView) row.findViewById(R.id.data_content);\n \t\t\n \t \t/* Since the field names are the API / internal form, we\n \t \t * attempt to get a localized, human-readable version. */\n \t\ttvLabel.setText(Item.localizedStringForString(\n \t\t\t\t\tgetItem(position).getString(\"label\")));\n \t\t\n \t\tString content = getItem(position).getString(\"content\");\n \t\t\n \t\ttvContent.setText(content);\n \n \t\treturn row;\n \t}\n });\n \n ListView lv = getListView();\n lv.setTextFilterEnabled(true);\n lv.setOnItemClickListener(new OnItemClickListener() {\n \t// Warning here because Eclipse can't tell whether my ArrayAdapter is\n \t// being used with the correct parametrization.\n \t@SuppressWarnings(\"unchecked\")\n \t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n \t\t\t// If we have a click on an entry, do something...\n \t\tArrayAdapter<Bundle> adapter = (ArrayAdapter<Bundle>) parent.getAdapter();\n \t\tBundle row = adapter.getItem(position);\n \t\tif (row.getString(\"label\").equals(\"url\")) {\n \t\t\trow.putString(\"url\", row.getString(\"content\"));\n \t\t\tremoveDialog(DIALOG_CONFIRM_NAVIGATE);\n \t\t\tshowDialog(DIALOG_CONFIRM_NAVIGATE, row);\n \t\t\treturn;\n \t\t} else if (row.getString(\"label\").equals(\"DOI\")) {\n \t\t\tString url = \"http://dx.doi.org/\"+Uri.encode(row.getString(\"content\"));\n \t\t\trow.putString(\"url\", url);\n \t\t\tremoveDialog(DIALOG_CONFIRM_NAVIGATE);\n \t\t\tshowDialog(DIALOG_CONFIRM_NAVIGATE, row);\n \t\t\treturn;\n \t\t} else if (row.getString(\"label\").equals(\"creators\")) {\n \t \tLog.d(TAG, \"Trying to start creators activity\");\n \t \tIntent i = new Intent(getBaseContext(), CreatorActivity.class);\n \t\t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t \treturn;\n \t\t} else if (row.getString(\"label\").equals(\"tags\")) {\n \t \tLog.d(TAG, \"Trying to start tag activity\");\n \t \tIntent i = new Intent(getBaseContext(), TagActivity.class);\n \t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t\t\treturn;\n \t \t\t} else if (row.getString(\"label\").equals(\"children\")) {\n \t \t \tLog.d(TAG, \"Trying to start attachment activity\");\n \t \t \tIntent i = new Intent(getBaseContext(), AttachmentActivity.class);\n \t \t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \t \tstartActivity(i);\n \t \t\t\treturn;\n \t \t\t}\n \t\t\n \t\t\t\tToast.makeText(getApplicationContext(), row.getString(\"content\"), \n \t\t\t\tToast.LENGTH_SHORT).show();\n \t}\n });\n \n /*\n * On long click, we bring up an edit dialog.\n */\n lv.setOnItemLongClickListener(new OnItemLongClickListener() {\n \t/*\n \t * Same annotation as in onItemClick(..), above.\n \t */\n \t@SuppressWarnings(\"unchecked\")\n \t\t\tpublic boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n \t\t\t// If we have a long click on an entry, we'll provide a way of editing it\n \t\tArrayAdapter<Bundle> adapter = (ArrayAdapter<Bundle>) parent.getAdapter();\n \t\tBundle row = adapter.getItem(position);\n \t\t// Show the right type of dialog for the row in question\n \t\tif (row.getString(\"label\").equals(\"itemType\")) {\n \t\t\t// XXX \n \tToast.makeText(getApplicationContext(), \"Item type cannot be changed.\", \n \t\t\t\tToast.LENGTH_SHORT).show();\n \t\t\t//removeDialog(DIALOG_ITEM_TYPE);\n \t\t\t//showDialog(DIALOG_ITEM_TYPE, row);\n \t\t\treturn true;\n \t\t} else if (row.getString(\"label\").equals(\"children\")) {\n \t \tLog.d(TAG, \"Not starting children activity on click-and-hold\");\n \t \treturn true;\n \t\t} else if (row.getString(\"label\").equals(\"creators\")) {\n \t \tLog.d(TAG, \"Trying to start creators activity\");\n \t \tIntent i = new Intent(getBaseContext(), CreatorActivity.class);\n \t\t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t \treturn true;\n \t\t} else if (row.getString(\"label\").equals(\"tags\")) {\n \t \tLog.d(TAG, \"Trying to start tag activity\");\n \t \tIntent i = new Intent(getBaseContext(), TagActivity.class);\n \t \ti.putExtra(\"com.gimranov.zandy.client.itemKey\", item.getKey());\n \t \tstartActivity(i);\n \t\t\treturn true;\n \t\t}\n \t\t\tremoveDialog(DIALOG_SINGLE_VALUE);\n \t\tshowDialog(DIALOG_SINGLE_VALUE, row);\n \t\treturn true;\n }\n });\n \n }", "public static void setTextFonts(Context mContext, String[] fonts, String[] texts, TextView textViewItem) {\n\t\t\n\t\tString content = texts[0];\n\t\tTypeface content_font = Typefaces.get(mContext, fonts[0]);\n\t\t// set texts\n\t\tif(texts.length > 1) {\n\t\t\tint i = 0;\n\t\t\twhile(i < texts.length) {\n\t\t\t\tString text = texts[i];\n\t\t\t\tif(content.contains(\"{\" + (i-1) + \"}\")) {\n\t\t\t\t\tcontent = content.replace(\"{\" + (i-1) + \"}\", text);\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t// set fonts\n\t\tSpannableStringBuilder SS = new SpannableStringBuilder(content);\n\t\tint last_index = 0;\n\t\tchar[] last_array = null;\n\t\tif(texts.length > 1) {\n\t\t\tint index = 1;\n\t\t\twhile(index < texts.length) {\n\t\t\t\tString text = texts[index];\n\t\t\t\t\n\t\t\t\tint current_index = content.indexOf(text);\n\t\t\t\t\n\t\t\t\tchar[] charArrayCurrent = text.toCharArray();\n\t\t\t\tTypeface current_font = Typefaces.get(mContext, fonts[index]);\n\t\t\t\t\n\t\t\t\tif(last_index <= 0) {\n\t\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", content_font), 0, current_index, Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", current_font), current_index, current_index + charArrayCurrent.length,Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t\t} else {\n\t\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", content_font), last_index + last_array.length + 1, current_index,Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t SS.setSpan (new CustomTypefaceSpan(\"\", current_font), current_index, current_index + charArrayCurrent.length,Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t\t}\n\t\t\t\t\n\t\t last_index = current_index;\n\t\t last_array = charArrayCurrent;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tif(last_index + last_array.length < content.length()) {\n\t\t\t\tSS.setSpan (new CustomTypefaceSpan(\"\", content_font), last_index + last_array.length + 1, content.length(),Spanned.SPAN_EXCLUSIVE_INCLUSIVE);\n\t\t\t}\n\t\t}\n // set text\n textViewItem.setText(SS);\n\t\t\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tTextView text;\n\t\t\ttext = new TextView(mContext);\n\t\t\ttext.setPadding(2, 2, 2, 2);\n\t\t\tQuestion theCom = questions.get(questions.size() - 1 - position);\n\t\t\ttext.setText(theCom.getUser() + \" - \"+ (theCom.getDate().getMonth() + 1) +\"/\" + theCom.getDate().getDate() + \"/\" + theCom.getDate().getYear() + \"\\n\" + theCom.getComment());\n\t\t\tLinearLayout.LayoutParams items = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\ttext.setLayoutParams(items);\n\t\t\tGradientDrawable qgd = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\tqgd.setCornerRadius(0f);\n\t\t\t\n\t\t\ttext.setBackgroundDrawable(qgd);\n\t\t\tLinearLayout ans = new LinearLayout(mContext);\n\t\t\tans.setOrientation(LinearLayout.VERTICAL);\n\t\t\tans.addView(text, 0);\n\t\t\ttext.setTextSize(21);\n\t\t\tif (openQuestion == position){\n\t\t\t\t//GradientDrawable qgd2 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF98BEE0, 0xFF418ACD});\n\t\t\t\tGradientDrawable qgd2 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\t\ttext.setBackgroundDrawable(qgd2);\n\t\t\t\ttext.setTextColor(0xFFFFFFFF);\n\t\t\t\tif (theCom.getAnswers().size() > 0){\n\t\t\t\t\t\n\t\t\t\t\tint ind = 0;\n\t\t\t\t\tfor(int i = 0; i <theCom.getAnswers().size(); i++){\n\t\t\t\t\t\tif (i > 0){ //Add a line between the items in the form of a view\n\t\t\t\t\t\t\tView theLine = new View(mContext);\n\t\t\t\t\t\t\tint pixels = (int) (1 * scale + 0.5f);\n\t\t\t\t\t\t\tLinearLayout.LayoutParams linPar = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, pixels);\n\t\t\t\t\t\t\ttheLine.setLayoutParams(linPar);\n\t\t\t\t\t\t\ttheLine.setBackgroundColor(Color.parseColor(\"#00284D\"));\n\t\t\t\t\t\t\tind++;\n\t\t\t\t\t\t\tans.addView(theLine, ind);//ind++ or 1\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tTextView anAns = new TextView(mContext);\n\t\t\t\t\t\tanAns.setText(theCom.getAnswers().get(i).getUser() + \" - \"+ (theCom.getAnswers().get(i).getDate().getMonth() + 1) +\"/\" + theCom.getAnswers().get(i).getDate().getDate() + \"/\" + theCom.getAnswers().get(i).getDate().getYear() + \"\\n\" + theCom.getAnswers().get(i).getComment());\n\t\t\t\t\t\tLinearLayout.LayoutParams ansPar = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\tansPar.setMargins(30, 0, 0, 0);\n\t\t\t\t\t\tanAns.setLayoutParams(ansPar);\n\t\t\t\t\t\tind++;\n\t\t\t\t\t\tanAns.setTextSize(21);\n\t\t\t\t\t\t//GradientDrawable qgd3 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF98BEE0, 0xFF418ACD});\n\t\t\t\t\t\t//GradientDrawable qgd3 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\t\t\t\tanAns.setTextColor(0xFFFFFFFF);\n\t\t\t\t\t\t//anAns.setBackgroundDrawable(qgd3);\n\t\t\t\t\t\tans.addView(anAns, ind); //ind or 1\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTextView anAns = new TextView(mContext);\n\t\t\t\t\tanAns.setText(\"no answers\");\n\t\t\t\t\tLinearLayout.LayoutParams ansPar = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\t\t\tansPar.setMargins(30, 0, 0, 0);\n\t\t\t\t\tanAns.setLayoutParams(ansPar);\n\t\t\t\t\tanAns.setTextSize(21);\n\t\t\t\t\tanAns.setTextColor(0xFFFFFFFF);\n\t\t\t\t\t//GradientDrawable qgd3 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\t\t\t//anAns.setBackgroundDrawable(qgd3);\n\t\t\t\t\tans.addView(anAns); //ind or 1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (openQuestion == -1){\n\t\t\t\t\n\t\t\t\ttext.setTextColor(0xFFFFFFFF);\n\t\t\t} else {\n\t\t\t\tGradientDrawable qgd4 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0x08004684, 0x8000284D});\n\t\t\t\ttext.setBackgroundDrawable(qgd4);\n\t\t\t\ttext.setTextColor(0x80FFFFFF);\n\t\t\t}\n\t\t\t\n\t\t\tAbsListView.LayoutParams params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\tans.setLayoutParams(params);\n\t\t\treturn ans;\n\t\t}", "@Override\n public MovieAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.list_item, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@Override\n public listAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n\n\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.listitemamentitylayout, parent, false);\n\n listAdapter.ViewHolder vh = new listAdapter.ViewHolder(v);\n\n\n\n return vh;\n\n\n\n }", "public void createSetUI(final LinearLayout linearLayout, final int setNum, Set set){\n final RelativeLayout relativeLayout=new RelativeLayout(this);\n RelativeLayout.LayoutParams params=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n RelativeLayout.LayoutParams edittxtWeightParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n params.setMargins(0,5,0,0);\n relativeLayout.setLayoutParams(params);\n RelativeLayout.LayoutParams edittxtRepParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n RelativeLayout.LayoutParams lblxParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n RelativeLayout.LayoutParams lblSetsParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n RelativeLayout.LayoutParams btndelParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n\n EditText editTextWeight=new EditText(this);\n editTextWeight.setId(View.generateViewId());\n weightsIds.add(editTextWeight.getId());\n editTextWeight.setInputType(InputType.TYPE_CLASS_NUMBER);\n\n EditText editTextRep=new EditText(this);\n editTextRep.setId(View.generateViewId());\n editTextRep.setInputType(InputType.TYPE_CLASS_NUMBER);\n\n repsids.add(editTextRep.getId());\n TextView xdivider=new TextView(this);\n xdivider.setId(View.generateViewId());\n TextView setNumlbl=new TextView(this);\n setNumlbl.setId(View.generateViewId());\n Button btnDelSet=new Button(this);\n btnDelSet.setId(View.generateViewId());\n btnDelSet.setText(\"x\");\n btnDelSet.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) { delSet(v); }});\n btnDelSet.setTextColor(Color.RED);\n btnDelSet.setHeight(80);\n btnDelSet.setWidth(80);\n btnDelSet.setBackgroundColor(Color.TRANSPARENT);\n editTextWeight.setHint(\"Weight\");\n editTextWeight.setHeight(125);\n editTextWeight.setWidth(350);\n editTextRep.setWidth(350);\n editTextRep.setHeight(125);\n setNumlbl.setTextSize(20);\n\n Typeface bold=Typeface.defaultFromStyle(Typeface.BOLD);\n setNumlbl.setTypeface(bold);\n editTextRep.setHint(\"Rep\");\n xdivider.setText(\"X\");\n setNumlbl.setText(\"Set \"+setNum);\n\n edittxtWeightParams.addRule(RelativeLayout.BELOW, setNumlbl.getId());\n edittxtWeightParams.addRule(RelativeLayout.LEFT_OF, xdivider.getId());\n lblSetsParams.setMargins(10, 10, 10, 10);\n edittxtWeightParams.setMargins(10, 0, 10, 10);\n edittxtRepParams.addRule(RelativeLayout.BELOW, setNumlbl.getId());\n edittxtRepParams.addRule(RelativeLayout.RIGHT_OF, xdivider.getId());\n edittxtRepParams.setMargins(10, 0, 10, 10);\n lblxParams.setMargins(10, 0, 10, 10);\n btndelParams.setMargins(5, 5,10,10);\n btndelParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n btndelParams.addRule(RelativeLayout.ALIGN_BASELINE, setNumlbl.getId());\n lblxParams.addRule(RelativeLayout.BELOW, setNumlbl.getId());\n lblxParams.addRule(RelativeLayout.CENTER_HORIZONTAL);\n lblxParams.addRule(RelativeLayout.ALIGN_BASELINE, editTextRep.getId());\n editTextWeight.setLayoutParams(edittxtWeightParams);\n editTextRep.setLayoutParams(edittxtRepParams);\n setNumlbl.setLayoutParams(lblSetsParams);\n xdivider.setLayoutParams(lblxParams);\n btnDelSet.setLayoutParams(btndelParams);\n if (set!=null){\n editTextWeight.setText(set.getWeight()+\"\");\n editTextRep.setText(set.getReps()+\"\");\n }\n relativeLayout.addView(editTextWeight, edittxtWeightParams);\n relativeLayout.addView(editTextRep, edittxtRepParams);\n relativeLayout.addView(xdivider, lblxParams);\n relativeLayout.addView(setNumlbl, lblSetsParams);\n relativeLayout.addView(btnDelSet, btndelParams);\n\n View divider=new View(this);\n divider.setLayoutParams(new LinearLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, 1));\n divider.setBackgroundColor(Color.parseColor(\"#B3B3B3\"));\n linearLayout.addView(relativeLayout, params);\n linearLayout.addView(divider);\n setsViewList.add(relativeLayout);\n }", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.departmentnames, parent, false);\n context = parent.getContext();\n// set the view's size, margins, paddings and layout parameters\n MyViewHolder vh = new MyViewHolder(v); // pass the view to View Holder\n return vh;\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n Log.v(TAG, \"onLayout l = \" + l + \"; t = \" + t + \"; r = \" + r + \"; b = \" + b);\n int count = getChildCount();\n int x = l;\n int y = t;\n for(int i = 0; i < count; i++){\n View child = (View)getChildAt(i);\n child.layout(x, y, x + r, y + b);\n x = x + r;\n }\n }", "@Override\n protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n measureChildren(widthMeasureSpec, heightMeasureSpec);\n int maxWidth = MeasureSpec.getSize(widthMeasureSpec);\n int maxHeight = MeasureSpec.getSize(heightMeasureSpec);\n int viewListSize = viewList.size();\n for (int i = 0; i < viewListSize; i++) {\n View child = this.getChildAt(i);\n //this.measureChild(child, widthMeasureSpec, heightMeasureSpec);\n child.measure( MeasureSpec.makeMeasureSpec(getWidth()/2 + 100,\n MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(getHeight(),\n MeasureSpec.UNSPECIFIED));\n LayoutParams lParams = (LayoutParams) child.getLayoutParams();\n lParams.left = 250;\n lParams.right = maxWidth - 250;\n }\n setMeasuredDimension(maxWidth, maxHeight);\n viewGroupWidth = getMeasuredWidth();\n viewGroupHeight = getMeasuredHeight();\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n int viewType = getItemViewType(cursor.getPosition());\n int layoutId = -1;\n switch (viewType) {\n case VIEW_TYPE_FIRST_ITEM: {\n layoutId = R.layout.list_item_news_first;\n break;\n }\n case VIEW_TYPE_OTHER_ITEM: {\n layoutId = R.layout.list_item_news;\n break;\n }\n }\n View view = LayoutInflater.from(context).inflate(layoutId, parent, false);\n\n ViewHolder viewHolder = new ViewHolder(view);\n view.setTag(viewHolder);\n\n return view;\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tViewHolder holder=null;\n\t\tNewsItem item=newsList.get(position);\n\t\tif(convertView==null){\n\t\t\tholder=new ViewHolder();\n\t\t\t//将layout.xml转换为View\n\t\t\tswitch(item.getStyle()){\n\t\t\tcase 0:\n\t\t\t\t\n\t\t\t\tconvertView=LayoutInflater.from(mActivity).inflate(R.layout.news_item1, null);\n\t\t\t\tholder.ivImg1=(ImageView)convertView.findViewById(R.id.ivNewsImg);\n\t\t\t\tholder.ivImg1.setLayoutParams(new RelativeLayout.LayoutParams(100, 100));\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tconvertView=LayoutInflater.from(mActivity).inflate(R.layout.news_item2, null);\n\t\t\t\tholder.ivImg1=(ImageView)convertView.findViewById(R.id.ivImg1);\n\t\t\t\tholder.ivImg2=(ImageView)convertView.findViewById(R.id.ivImg2);\n\t\t\t\tholder.ivImg3=(ImageView)convertView.findViewById(R.id.ivImg3);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t\n\t\t\t\tconvertView=LayoutInflater.from(mActivity).inflate(R.layout.news_item1, null);\n\t\t\t\tholder.ivImg1=(ImageView)convertView.findViewById(R.id.ivNewsImg);\n\t\t\t\tholder.ivImg1.setLayoutParams(new RelativeLayout.LayoutParams(100, 100));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tholder.tvTilte=(TextView)convertView.findViewById(R.id.tvTitle);\t\n\t\t\tconvertView.setTag(holder);//记录个标识\n\t\t}else{\n\t\t\tholder=(ViewHolder)convertView.getTag();\n\t\t}\n\t\t//向ui元素绑定数据\n\t\tholder.tvTilte.setText(item.getTitle());\n\t\t\n\t\t\n\t\tswitch(item.getStyle()){\n\t\tcase 0:\n\t\t\timageLoader.get(item.getImgUrl()[0], ImageLoader.getImageListener(holder.ivImg1,\n\t\t\t\t\tR.drawable.default_big, R.drawable.default_big));//加载图片,先从内存中加载,内存没有再从网络加载\n\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\timageLoader.get(item.getImgUrl()[1], ImageLoader.getImageListener(holder.ivImg2,\n\t\t\t\t\t\tR.drawable.default_big, R.drawable.default_big));//加载图片,先从内存中加载,内存没有再从网络加载\n\t\t\t\timageLoader.get(item.getImgUrl()[2], ImageLoader.getImageListener(holder.ivImg3,\n\t\t\t\t\t\tR.drawable.default_big, R.drawable.default_big));//加载图片,先从内存中加载,内存没有再从网络加载\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tString imgStr = item.getImgUrl()[0];\n\t\t\t\tbyte[] picByte = Base64.decode(imgStr, Base64.DEFAULT);\n\t\t\t\tBitmap bmp = BitmapFactory.decodeByteArray(picByte, 0, picByte.length);\n\t\t\t\tholder.ivImg1.setImageBitmap(bmp);\n\t\t\t\tbreak;\n\t\t}\n\t\tLog.d(\"jereh\",\"getView()\");\n\t\treturn convertView;\n\t}", "@Override\n public ListadoHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n //INFLATE A VIEW FROM XML\n View v= LayoutInflater.from(parent.getContext()).inflate(R.layout.listado_card_item,null);\n\n //HOLDER\n ListadoHolder holder=new ListadoHolder(v);\n\n return holder;\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tViewHolder viewHolder = null;\n\t\tif(convertView == null){\n\t\t\tviewHolder = new ViewHolder();\n\t\t\tLayoutInflater inflater = LayoutInflater.from(activity);\n\t\t\tconvertView = inflater.inflate(R.layout.nrc_review_litigant_item, null);\n\t\t\tviewHolder.litigantName = (TextView) convertView.findViewById(R.id.litigant_name);\n\t\t\tviewHolder.litigantType = (TextView) convertView.findViewById(R.id.litigant_type);\n\t\t\tviewHolder.litigantDetail = (TextView) convertView.findViewById(R.id.litigant_detail);\n\t\t\tviewHolder.litigantCardInfo = (LinearLayout) convertView.findViewById(R.id.litigant_card_info);\n\t\t\tviewHolder.litigantCard = (TextView) convertView.findViewById(R.id.litigant_card);\n\t\t\tviewHolder.litigantBrithdayInfo = (LinearLayout) convertView.findViewById(R.id.litigant_brithday_info);\n\t\t\tviewHolder.litigantBrithday = (TextView) convertView.findViewById(R.id.litigant_brithday);\n\t\t\tviewHolder.litigantPhoneInfo = (LinearLayout) convertView.findViewById(R.id.litigant_phone_info);\n\t\t\tviewHolder.litigantPhone = (TextView) convertView.findViewById(R.id.litigant_phone);\n\t\t\tviewHolder.litigantAddressInfo = (LinearLayout) convertView.findViewById(R.id.litigant_address_info);\n\t\t\tviewHolder.litigantAddress = (TextView) convertView.findViewById(R.id.litigant_address);\n\t\t\tviewHolder.representativeInfo = (LinearLayout) convertView.findViewById(R.id.representative_info);\n\t\t\tviewHolder.representativeName = (TextView) convertView.findViewById(R.id.representative_name);\n\t\t\tviewHolder.representativePhoneInfo = (LinearLayout) convertView.findViewById(R.id.representative_phone_info);\n\t\t\tviewHolder.representativePhone = (TextView) convertView.findViewById(R.id.representative_phone);\n\t\t\tconvertView.setTag(viewHolder);\n\t\t\t\n\t\t}else{\n\t\t\tviewHolder = (ViewHolder)convertView.getTag();\n\t\t}\n\t\tTLayyDsr litigant = litigantList.get(position);\n\t\tint nType = litigant.getNType();\n\t\tif(nType ==NrcConstants.DSR_TYPE_NORMAL){\n\t\t\tint nXb = litigant.getNXb();\n\t\t\tInteger nAge = litigant.getNAge();\n\t\t\tString cAge = \"\";\n\t\t\tif (nAge == null || Integer.valueOf(0).equals(nAge)) {\n\t\t\t\tcAge = \"\";\n\t\t\t} else {\n\t\t\t\tcAge = String.valueOf(nAge) + \"岁\";\n\t\t\t}\n\t\t\tviewHolder.litigantDetail.setText(NrcUtils.getGenderNameByCode(nXb)+\" \"+ cAge);\n\t\t\tString cIdcard = litigant.getCIdcard();\n\t\t\tint nIdcardType = litigant.getNIdcardType();\n\t\t\tString cAddress = litigant.getCAddress();//北京市-北京市西城区-2\n\t\t\tviewHolder.litigantAddress.setText(cAddress);\n\t\t\tif(cIdcard.equals(\"\")){\n\t\t\t\tviewHolder.litigantCardInfo.setVisibility(View.GONE);\n\t\t\t}else{\n\t\t\t\tviewHolder.litigantCard.setText(NrcUtils.getCertificateNameByCode(nIdcardType)+\":\"+cIdcard);\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tString dCsrq = litigant.getDCsrq();\n\t\t\tif(dCsrq == null){\n\t\t\t\tviewHolder.litigantBrithdayInfo.setVisibility(View.GONE);\n\t\t\t}else{\n\t\t\t\tviewHolder.litigantBrithday.setText(NrcUtils.getFormatDate(dCsrq));\t\t\t\t\t\n\t\t\t}\n\t\t\tString cSjhm = litigant.getCSjhm();\n\t\t\tif(cSjhm.equals(\"\")){\n\t\t\t\tviewHolder.litigantPhoneInfo.setVisibility(View.GONE);\n\t\t\t}else{\n\t\t\t\tviewHolder.litigantPhone.setText(cSjhm);\t\t\t\t\t\n\t\t\t}\n\t\t\tviewHolder.representativeInfo.setVisibility(View.GONE);\n\t\t}else{\n\t\t\tviewHolder.litigantDetail.setVisibility(View.GONE);\n\t\t\tviewHolder.litigantCardInfo.setVisibility(View.GONE);\n\t\t\tviewHolder.litigantBrithdayInfo.setVisibility(View.GONE);\n\t\t\tString cCompanyAddress = litigant.getCDwdz();//北京市-北京市西城区-2\n\t\t\tviewHolder.litigantAddress.setText(cCompanyAddress);\n\t\t\tString cLxdh = litigant.getCLxdh();\n\t\t\tif(cLxdh.equals(\"\")){\n\t\t\t\tviewHolder.litigantPhoneInfo.setVisibility(View.GONE);\n\t\t\t}else{\t\t\t\t\n\t\t\t\tviewHolder.litigantPhone.setText(cLxdh);\n\t\t\t}\n\t\t\tString cFddbr = litigant.getCFddbr();\n\t\t\tif(cFddbr.equals(\"\")){\n\t\t\t\tviewHolder.representativeName.setVisibility(View.GONE);\n\t\t\t}else{\n\t\t\t\tString representativeType = (nType == NrcConstants.DSR_TYPE_CORPORATION?\"法定人代表:\":\"负责人代表:\") + cFddbr;\n\t\t\t\tviewHolder.representativeName.setText(representativeType);\n\t\t\t\tString cFddbrSjhm = litigant.getCFddbrSjhm();\n\t\t\t\tif(cFddbrSjhm.equals(\"\")){\n\t\t\t\t\tviewHolder.representativePhoneInfo.setVisibility(View.GONE);\n\t\t\t\t}else{\t\t\t\t\t\n\t\t\t\t\tviewHolder.representativePhone.setText(cFddbrSjhm);\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tString cName = litigant.getCName();\n\t\tviewHolder.litigantName.setText(cName);\n\t\tviewHolder.litigantType.setText(NrcUtils.getLitigantTypeNameByCode(nType));\n\t\treturn convertView;\n\t}", "@Override\n public ListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType)\n {\n // create a new view\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_row, parent, false);\n // set the view's size, margins, paddings and layout parameters\n\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "public void init() {\n\t\t\n\t\tint padding = displayUtils.getDIP(4);\n\t\t\n\t\tListView.LayoutParams masterParams = new ListView.LayoutParams(ListView.LayoutParams.FILL_PARENT, displayUtils.getDIP(48));\n\t\t\n\t\tsetBackgroundColor(colors.getColor(Colors.LOADING_ITEM_BG));\n\t\t\n\t\tsetLayoutParams(masterParams);\n\t\tsetOrientation(HORIZONTAL);\n\t\t\n\t\tProgressBar progress = new ProgressBar(getContext(), null, android.R.attr.progressBarStyleSmall);\n\t\tprogress.setPadding(padding, padding, padding, padding);\n\t\t\n\t\tTextView text = new TextView(getContext());\n\t\ttext.setTextColor(Color.GRAY);\n\t\ttext.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);\n\t\ttext.setText(\"Loading...\");\n\t\ttext.setPadding(0, padding, padding, padding);\n\t\t\n\t\tLayoutParams progressLayoutParams = new LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tprogressLayoutParams.gravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL;\n\t\tprogressLayoutParams.weight = 0.0f;\n\t\t\n\t\tLayoutParams textParams = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);\n\t\ttextParams.gravity = Gravity.LEFT | Gravity.CENTER_VERTICAL;\n\t\ttextParams.weight = 1.0f;\n\t\ttextParams.setMargins(0, 0, 0, 0);\n\t\t\n\t\tsetLayoutParams(masterParams);\n\t\tprogress.setLayoutParams(progressLayoutParams);\n\t\ttext.setLayoutParams(textParams);\n\t\ttext.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);\n\t\t\n\t\taddView(progress);\n\t\taddView(text);\t\t\n\t}", "public ViewHolder(View v) {\n super(v);\n Typeface oldLondon = Typeface.createFromAsset(context.getAssets(), \"fonts/Blackwood Castle.ttf\");\n\n iView = (ImageView) v.findViewById(to[0]);\n nameView = (TextView) v.findViewById(to[1]);\n nameView.setTypeface(oldLondon);\n descView = (TextView) v.findViewById(to[2]);\n boostView = (TextView) v.findViewById(to[3]);\n }", "public OrderAdapter() {\n super(new ArrayList<MultiItemEntity>());\n addItemType(TYPE_HEAD, R.layout.item_order_head);\n addItemType(TYPE_CONTENT, R.layout.item_order_content);\n addItemType(TYPE_FOOTER, R.layout.item_order_foot);\n }", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tLayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\t\tView v=inflater.inflate(R.layout.custom, null);\n\t\t\t\n\t\t\ttv1=(TextView)v.findViewById(R.id.text1);\n\t\t\ttv1.setText(names[position]);\n\t\t\t\n\t\t\t\n\t\t\ttv2=(TextView)v.findViewById(R.id.text2);\n\t\t\ttv2.setText(phones[position]);\n\t\t\t\n\t\t\t\n\t\t\treturn v;\n\t\t}", "@Override\n public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n //new view creation\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item,parent, false);\n return new MyViewHolder(v);\n }", "@Override\n public Viewholder onCreateViewHolder(ViewGroup parent, int viewType) {\n LayoutInflater layoutInflater=LayoutInflater.from(context);\n View view=layoutInflater.inflate(R.layout.listitem,null);\n return new Viewholder(view);\n }", "public void redrawDrawerLinearLayout() {\n this.drawerLinearLayout.removeAllViews();\n this.drawerLinearLayout.invalidate();\n boolean groupTextAdded = false;\n int secondaryTextColor = ContextCompat.getColor(getApplicationContext(), R.color.secondaryLightTextColor);\n Iterator it = this.groups.iterator();\n while (it.hasNext()) {\n LinkedList<Light> group = (LinkedList) it.next();\n final LinearLayout drawerGroup = new LinearLayout(this);\n if (!group.isEmpty()) {\n Log.i(tag, \"redraw drawer group \" + ((Light) group.get(0)).getGroupNumber());\n } else {\n Log.i(tag, \"redraw drawer empty group\");\n }\n if (!group.isEmpty() && ((Light) group.get(0)).getGroupNumber() != 0) {\n LinearLayout linearLayout = new LinearLayout(this);\n LayoutParams layoutParams = new LayoutParams(-1, -2);\n linearLayout.setLayoutParams(layoutParams);\n linearLayout.setPadding(0, pxToDp(5), 0, pxToDp(5));\n linearLayout.setOrientation(1);\n this.drawerLinearLayout.addView(linearLayout);\n if (!groupTextAdded) {\n groupTextAdded = true;\n LinearLayout linearLayout2 = new LinearLayout(this);\n LayoutParams layoutParams2 = new LayoutParams(-1, pxToDp(1));\n linearLayout2.setLayoutParams(layoutParams2);\n linearLayout2.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.secondaryLightTextColor));\n linearLayout.addView(linearLayout2);\n TextView textView = new TextView(this);\n LayoutParams layoutParams3 = new LayoutParams(-2, -2);\n layoutParams3.setMargins(pxToDp(16), 0, 0, 0);\n textView.setLayoutParams(layoutParams3);\n textView.setPadding(0, pxToDp(3), 0, pxToDp(3));\n textView.setText(getResources().getString(R.string.Groups));\n textView.setTextSize(this.drawerGroupSize);\n textView.setTextColor(secondaryTextColor);\n textView.setTypeface(this.font);\n linearLayout.addView(textView);\n }\n LinearLayout linearLayout3 = new LinearLayout(this);\n LayoutParams layoutParams4 = new LayoutParams(-1, pxToDp(1));\n linearLayout3.setLayoutParams(layoutParams4);\n linearLayout3.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.secondaryLightTextColor));\n linearLayout.addView(linearLayout3);\n LayoutParams layoutParams5 = new LayoutParams(-1, pxToDp(48));\n drawerGroup.setLayoutParams(layoutParams5);\n drawerGroup.setOrientation(0);\n drawerGroup.setPadding(pxToDp(16), 0, pxToDp(16), 0);\n drawerGroup.setGravity(16);\n drawerGroup.setTag(group);\n this.drawerLinearLayout.addView(drawerGroup);\n ImageView imageView = new ImageView(this);\n LayoutParams layoutParams6 = new LayoutParams(pxToDp(30), pxToDp(30));\n imageView.setLayoutParams(layoutParams6);\n imageView.setImageResource(R.drawable.drawer_app_groupoption2_128px);\n drawerGroup.addView(imageView);\n EditText groupName = (EditText) getLayoutInflater().inflate(R.layout.navigation_drawer_edittext, null);\n LayoutParams layoutParams7 = new LayoutParams(-2, -2, 1.0f);\n layoutParams7.setMargins(pxToDp(10), 0, 0, 0);\n groupName.setLayoutParams(layoutParams7);\n groupName.setText(((Light) group.get(0)).getGroupName().trim());\n groupName.setTextSize(this.drawerTextSize);\n groupName.setTextColor(secondaryTextColor);\n groupName.setSingleLine(false);\n groupName.setHorizontallyScrolling(false);\n groupName.setMaxLines(2);\n groupName.setImeOptions(6);\n groupName.setInputType(663697);\n groupName.setTypeface(this.font);\n groupName.setBackgroundColor(0);\n groupName.setPadding(0, pxToDp(1), 0, 0);\n groupName.setFilters(new InputFilter[]{new LengthFilter(16)});\n if (this.userEdittingUnlocked) {\n groupName.setFocusable(true);\n groupName.setFocusableInTouchMode(true);\n } else {\n groupName.setFocusable(false);\n groupName.setFocusableInTouchMode(false);\n }\n drawerGroup.addView(groupName);\n AnonymousClass6 r0 = new OnLongClickListener() {\n public boolean onLongClick(View view) {\n return true;\n }\n };\n groupName.setOnLongClickListener(r0);\n final EditText editText = groupName;\n final LinkedList linkedList = group;\n AnonymousClass7 r02 = new OnFocusChangeListener() {\n public void onFocusChange(View view, boolean hasFocus) {\n InputMethodManager inputMethodManager = (InputMethodManager) MainActivity.this.getSystemService(\"input_method\");\n if (hasFocus) {\n Log.i(MainActivity.tag, \"groupName hasFocus\");\n inputMethodManager.showSoftInput(editText, 2);\n editText.setSelection(editText.getText().length());\n return;\n }\n Log.i(MainActivity.tag, \"groupName lost focus\");\n String newGroupName = editText.getText().toString().trim();\n if (newGroupName.length() == 0) {\n newGroupName = \"Group\";\n editText.setText(newGroupName);\n }\n Log.i(MainActivity.tag, \"user entered new groupname \" + newGroupName);\n boolean currentLightInGroup = false;\n Iterator it = linkedList.iterator();\n while (it.hasNext()) {\n Light light = (Light) it.next();\n light.setGroupName(newGroupName, false);\n if (light == MainActivity.this.currentLight) {\n currentLightInGroup = true;\n }\n }\n if (MainActivity.this.broadcastingToGroup && currentLightInGroup) {\n MainActivity.this.setToolbarTitle();\n }\n }\n };\n groupName.setOnFocusChangeListener(r02);\n final EditText editText2 = groupName;\n AnonymousClass8 r03 = new OnEditorActionListener() {\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n switch (actionId) {\n case 0:\n case 5:\n case 6:\n editText2.clearFocus();\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(editText2.getWindowToken(), 0);\n return true;\n default:\n return false;\n }\n }\n };\n groupName.setOnEditorActionListener(r03);\n final EditText editText3 = groupName;\n AnonymousClass9 r04 = new TextWatcher() {\n public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n }\n\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n }\n\n public void afterTextChanged(Editable editable) {\n boolean enterPressed = false;\n while (editable.toString().contains(\"\\n\")) {\n enterPressed = true;\n int index = editable.toString().indexOf(\"\\n\");\n editable.delete(index, index + 1);\n }\n if (enterPressed) {\n editText3.clearFocus();\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(editText3.getWindowToken(), 0);\n }\n }\n };\n groupName.addTextChangedListener(r04);\n final EditText editText4 = groupName;\n AnonymousClass10 r05 = new OnClickListener() {\n public void onClick(View view) {\n if (!editText4.hasFocus() || !MainActivity.this.userEdittingUnlocked) {\n if (editText4.hasFocus()) {\n editText4.clearFocus();\n }\n drawerGroup.performClick();\n }\n }\n };\n groupName.setOnClickListener(r05);\n final EditText editText5 = groupName;\n final LinkedList linkedList2 = group;\n OnDragListener drawerGroupDragListener = new OnDragListener() {\n public boolean onDrag(View view, DragEvent dragEvent) {\n if (!MainActivity.this.userEdittingUnlocked) {\n return false;\n }\n switch (dragEvent.getAction()) {\n case 2:\n MainActivity.this.checkIfScrollNeeded(view, dragEvent);\n return true;\n case 3:\n return MainActivity.this.setLightForGroupingToGroup(linkedList2);\n case 5:\n editText5.setFocusable(false);\n editText5.setFocusableInTouchMode(false);\n return true;\n case 6:\n editText5.setFocusable(true);\n editText5.setFocusableInTouchMode(true);\n return true;\n default:\n return true;\n }\n }\n };\n groupName.setOnDragListener(drawerGroupDragListener);\n if (this.userEdittingUnlocked) {\n ImageView imageView2 = new ImageView(this);\n LayoutParams layoutParams8 = new LayoutParams(pxToDp(36), pxToDp(36));\n imageView2.setLayoutParams(layoutParams8);\n imageView2.setPadding(pxToDp(6), pxToDp(6), pxToDp(6), pxToDp(6));\n imageView2.setImageResource(R.drawable.ic_create_white_36dp);\n imageView2.setScaleType(ScaleType.FIT_CENTER);\n drawerGroup.addView(imageView2);\n final EditText editText6 = groupName;\n AnonymousClass12 r06 = new OnClickListener() {\n public void onClick(View view) {\n if (!MainActivity.this.userEdittingUnlocked) {\n return;\n }\n if (editText6.hasFocus()) {\n editText6.clearFocus();\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(editText6.getWindowToken(), 0);\n return;\n }\n editText6.requestFocus();\n }\n };\n imageView2.setOnClickListener(r06);\n }\n final LinkedList linkedList3 = group;\n AnonymousClass13 r07 = new OnClickListener() {\n public void onClick(View view) {\n if (!MainActivity.this.userEdittingUnlocked) {\n Fragment currentFragment = MainActivity.this.getSupportFragmentManager().findFragmentById(R.id.frameLayout);\n if (!(currentFragment instanceof FirmwareUpdateFragment) || !((FirmwareUpdateFragment) currentFragment).isUpdating()) {\n MainActivity.this.currentLight = (Light) linkedList3.get(0);\n Iterator it = linkedList3.iterator();\n while (true) {\n if (!it.hasNext()) {\n break;\n }\n Light light = (Light) it.next();\n if (light instanceof DreamScreen) {\n MainActivity.this.currentLight = light;\n break;\n }\n }\n MainActivity.this.currentLight.setMode(MainActivity.this.currentLight.getMode(), true);\n Iterator it2 = linkedList3.iterator();\n while (it2.hasNext()) {\n ((Light) it2.next()).initMode(MainActivity.this.currentLight.getMode());\n }\n MainActivity.this.broadcastingToGroup = true;\n MainActivity.this.redrawDrawerLinearLayout();\n MainActivity.this.highlightDrawerSelection();\n MainActivity.this.startDreamScreenFragment();\n MainActivity.this.drawerLayout.closeDrawers();\n return;\n }\n Log.i(MainActivity.tag, \"dont do anything while firmware updating\");\n }\n }\n };\n drawerGroup.setOnClickListener(r07);\n drawerGroup.setOnDragListener(drawerGroupDragListener);\n }\n int lightIndex = 0;\n Iterator it2 = group.iterator();\n while (it2.hasNext()) {\n Light light = (Light) it2.next();\n final LinearLayout drawerLight = new LinearLayout(this);\n drawerLight.setLayoutParams(new LayoutParams(-1, pxToDp(48)));\n drawerLight.setOrientation(0);\n if (light.getGroupNumber() == 0) {\n drawerLight.setPadding(pxToDp(16), 0, pxToDp(16), 0);\n } else {\n drawerLight.setPadding(pxToDp(55), 0, pxToDp(16), 0);\n }\n drawerLight.setGravity(16);\n drawerLight.setTag(light);\n this.drawerLinearLayout.addView(drawerLight);\n ImageView imageView3 = new ImageView(this);\n imageView3.setLayoutParams(new LayoutParams(pxToDp(30), pxToDp(30)));\n drawerLight.addView(imageView3);\n if (light.getProductId() == 1) {\n imageView3.setImageResource(R.drawable.dreamscreen_icon);\n } else if (light.getProductId() == 2) {\n imageView3.setImageResource(R.drawable.dreamscreen4k_icon);\n } else if (light.getProductId() == 7) {\n imageView3.setImageResource(R.drawable.dreamscreensolo_icon);\n } else if (light.getProductId() == 3) {\n imageView3.setImageResource(R.drawable.sidekick_icon);\n } else if (light.getProductId() == 4) {\n imageView3.setImageResource(R.drawable.connect_icon);\n } else {\n Log.i(tag, \"redrawDrawer icon error\");\n imageView3.setImageResource(R.drawable.sidekick_icon);\n }\n EditText lightName = (EditText) getLayoutInflater().inflate(R.layout.navigation_drawer_edittext, null);\n LayoutParams layoutParams9 = new LayoutParams(-2, -2, 1.0f);\n layoutParams9.setMargins(pxToDp(10), 0, 0, 0);\n lightName.setLayoutParams(layoutParams9);\n lightName.setText(light.getName().trim());\n lightName.setTextSize(this.drawerTextSize);\n lightName.setTextColor(secondaryTextColor);\n lightName.setGravity(16);\n lightName.setSingleLine(false);\n lightName.setHorizontallyScrolling(false);\n lightName.setMaxLines(2);\n lightName.setImeOptions(6);\n lightName.setInputType(663697);\n lightName.setTypeface(this.font);\n lightName.setBackgroundColor(0);\n lightName.setPadding(0, pxToDp(1), 0, 0);\n lightName.setFilters(new InputFilter[]{new LengthFilter(16)});\n if (this.userEdittingUnlocked) {\n lightName.setFocusable(true);\n lightName.setFocusableInTouchMode(true);\n } else {\n lightName.setFocusable(false);\n lightName.setFocusableInTouchMode(false);\n }\n drawerLight.addView(lightName);\n final EditText editText7 = lightName;\n final Light light2 = light;\n AnonymousClass14 r08 = new OnFocusChangeListener() {\n public void onFocusChange(View view, boolean hasFocus) {\n InputMethodManager inputMethodManager = (InputMethodManager) MainActivity.this.getSystemService(\"input_method\");\n if (hasFocus) {\n Log.i(MainActivity.tag, editText7.getText().toString() + \" has focus\");\n inputMethodManager.showSoftInput(editText7, 2);\n editText7.setSelection(editText7.getText().length());\n return;\n }\n Log.i(MainActivity.tag, editText7.getText().toString() + \" lost focus\");\n String newName = editText7.getText().toString().trim();\n if (newName.length() == 0) {\n if (light2.getProductId() == 1) {\n newName = \"DreamScreen HD\";\n } else if (light2.getProductId() == 2) {\n newName = \"DreamScreen 4K\";\n } else if (light2.getProductId() == 7) {\n newName = \"DreamScreen Solo\";\n } else if (light2.getProductId() == 3) {\n newName = \"SideKick\";\n } else if (light2.getProductId() == 4) {\n newName = Connect.DEFAULT_NAME;\n } else {\n Log.i(MainActivity.tag, \"error, bad productId\");\n newName = \"Light\";\n }\n editText7.setText(newName);\n }\n Log.i(MainActivity.tag, \"user entered new lightName \" + newName);\n light2.setName(newName);\n if (MainActivity.this.currentLight == light2 && !MainActivity.this.broadcastingToGroup) {\n Log.i(MainActivity.tag, \"currentLight == light && !broadcastingToGroup; calling setToolbarTitle\");\n MainActivity.this.setToolbarTitle();\n }\n }\n };\n lightName.setOnFocusChangeListener(r08);\n final EditText editText8 = lightName;\n AnonymousClass15 r09 = new OnEditorActionListener() {\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n Log.i(MainActivity.tag, \"lightname onEditorActionListener\");\n switch (actionId) {\n case 0:\n case 5:\n case 6:\n editText8.clearFocus();\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(editText8.getWindowToken(), 0);\n return true;\n default:\n return false;\n }\n }\n };\n lightName.setOnEditorActionListener(r09);\n final EditText editText9 = lightName;\n AnonymousClass16 r010 = new TextWatcher() {\n public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n }\n\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n }\n\n public void afterTextChanged(Editable editable) {\n boolean enterPressed = false;\n while (editable.toString().contains(\"\\n\")) {\n enterPressed = true;\n int index = editable.toString().indexOf(\"\\n\");\n editable.delete(index, index + 1);\n }\n if (enterPressed) {\n editText9.clearFocus();\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(editText9.getWindowToken(), 0);\n }\n }\n };\n lightName.addTextChangedListener(r010);\n final EditText editText10 = lightName;\n AnonymousClass17 r011 = new OnClickListener() {\n public void onClick(View view) {\n if (!editText10.hasFocus() || !MainActivity.this.userEdittingUnlocked) {\n if (editText10.hasFocus()) {\n editText10.clearFocus();\n }\n drawerLight.performClick();\n }\n }\n };\n lightName.setOnClickListener(r011);\n final EditText editText11 = lightName;\n AnonymousClass18 r012 = new OnLongClickListener() {\n public boolean onLongClick(View view) {\n if (!editText11.hasFocus() || !MainActivity.this.userEdittingUnlocked) {\n drawerLight.performLongClick();\n }\n return true;\n }\n };\n lightName.setOnLongClickListener(r012);\n if (this.userEdittingUnlocked) {\n ImageView imageView4 = new ImageView(this);\n imageView4.setLayoutParams(new LayoutParams(pxToDp(36), pxToDp(36)));\n imageView4.setPadding(pxToDp(6), pxToDp(6), pxToDp(6), pxToDp(6));\n imageView4.setImageResource(R.drawable.ic_create_white_36dp);\n imageView4.setScaleType(ScaleType.FIT_CENTER);\n drawerLight.addView(imageView4);\n imageView4.setFocusable(false);\n imageView4.setFocusableInTouchMode(false);\n drawerLight.setFocusable(false);\n drawerLight.setFocusableInTouchMode(false);\n final EditText editText12 = lightName;\n AnonymousClass19 r013 = new OnClickListener() {\n public void onClick(View view) {\n if (!MainActivity.this.userEdittingUnlocked) {\n return;\n }\n if (editText12.hasFocus()) {\n Log.i(MainActivity.tag, \"editbutton, lightname clear focus, hide soft input\");\n editText12.clearFocus();\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(editText12.getWindowToken(), 0);\n return;\n }\n Log.i(MainActivity.tag, \"editbutton, lightname request focus\");\n editText12.requestFocus();\n }\n };\n imageView4.setOnClickListener(r013);\n }\n final Light light3 = light;\n AnonymousClass20 r014 = new OnClickListener() {\n public void onClick(View view) {\n if (!MainActivity.this.userEdittingUnlocked) {\n Fragment currentFragment = MainActivity.this.getSupportFragmentManager().findFragmentById(R.id.frameLayout);\n if (!(currentFragment instanceof FirmwareUpdateFragment) || !((FirmwareUpdateFragment) currentFragment).isUpdating()) {\n MainActivity.this.currentLight = light3;\n MainActivity.this.broadcastingToGroup = false;\n MainActivity.this.redrawDrawerLinearLayout();\n MainActivity.this.highlightDrawerSelection();\n MainActivity.this.startDreamScreenFragment();\n MainActivity.this.drawerLayout.closeDrawers();\n return;\n }\n Log.i(MainActivity.tag, \"dont do anything while firmware updating\");\n }\n }\n };\n drawerLight.setOnClickListener(r014);\n final Light light4 = light;\n AnonymousClass21 r015 = new OnLongClickListener() {\n public boolean onLongClick(View view) {\n Fragment currentFragment = MainActivity.this.getSupportFragmentManager().findFragmentById(R.id.frameLayout);\n if ((currentFragment instanceof FirmwareUpdateFragment) && ((FirmwareUpdateFragment) currentFragment).isUpdating()) {\n Log.i(MainActivity.tag, \"dont do anything while firmware updating\");\n return true;\n } else if (!MainActivity.this.userEdittingUnlocked) {\n return false;\n } else {\n MainActivity.this.lightForGrouping = light4;\n ClipData clipData = ClipData.newPlainText(\"\", \"\");\n DragShadowBuilder dragShadow = new DragShadowBuilder(drawerLight);\n if (VERSION.SDK_INT >= 24) {\n view.startDragAndDrop(clipData, dragShadow, null, 0);\n } else {\n view.startDrag(clipData, dragShadow, null, 0);\n }\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(drawerLight.getWindowToken(), 0);\n return true;\n }\n }\n };\n drawerLight.setOnLongClickListener(r015);\n final EditText editText13 = lightName;\n final LinkedList linkedList4 = group;\n OnDragListener drawerLightDragListener = new OnDragListener() {\n public boolean onDrag(View view, DragEvent dragEvent) {\n if (!MainActivity.this.userEdittingUnlocked) {\n return false;\n }\n switch (dragEvent.getAction()) {\n case 2:\n MainActivity.this.checkIfScrollNeeded(view, dragEvent);\n return true;\n case 3:\n return MainActivity.this.setLightForGroupingToGroup(linkedList4);\n case 5:\n editText13.setFocusable(false);\n editText13.setFocusableInTouchMode(false);\n return true;\n case 6:\n editText13.setFocusable(true);\n editText13.setFocusableInTouchMode(true);\n return true;\n default:\n return true;\n }\n }\n };\n drawerLight.setOnDragListener(drawerLightDragListener);\n lightName.setOnDragListener(drawerLightDragListener);\n lightIndex++;\n }\n }\n if (this.userEdittingUnlocked) {\n LinearLayout linearLayout4 = new LinearLayout(this);\n LayoutParams layoutParams10 = new LayoutParams(-1, pxToDp(1));\n layoutParams10.setMargins(0, pxToDp(5), 0, pxToDp(5));\n linearLayout4.setLayoutParams(layoutParams10);\n linearLayout4.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.secondaryLightTextColor));\n this.drawerLinearLayout.addView(linearLayout4);\n LinearLayout drawerAddNewGroup = new LinearLayout(this);\n drawerAddNewGroup.setId(R.id.newGroup);\n LayoutParams layoutParams11 = new LayoutParams(-1, pxToDp(48));\n drawerAddNewGroup.setLayoutParams(layoutParams11);\n drawerAddNewGroup.setOrientation(0);\n drawerAddNewGroup.setPadding(pxToDp(16), 0, pxToDp(16), 0);\n drawerAddNewGroup.setGravity(16);\n this.drawerLinearLayout.addView(drawerAddNewGroup);\n ImageView imageView5 = new ImageView(this);\n imageView5.setLayoutParams(new LayoutParams(pxToDp(30), pxToDp(30)));\n imageView5.setImageResource(R.drawable.drawer_app_groupoption2_128px);\n drawerAddNewGroup.addView(imageView5);\n TextView addNewGroupText = new TextView(this);\n LayoutParams layoutParams12 = new LayoutParams(-2, -2);\n layoutParams12.setMargins(pxToDp(10), 0, 0, 0);\n addNewGroupText.setLayoutParams(layoutParams12);\n addNewGroupText.setText(getResources().getString(R.string.dragDropText));\n addNewGroupText.setTextSize(this.drawerTextSize);\n addNewGroupText.setTypeface(this.font);\n addNewGroupText.setTextColor(secondaryTextColor);\n drawerAddNewGroup.addView(addNewGroupText);\n AnonymousClass23 r016 = new OnDragListener() {\n public boolean onDrag(View view, DragEvent dragEvent) {\n if (!MainActivity.this.userEdittingUnlocked) {\n return false;\n }\n switch (dragEvent.getAction()) {\n case 1:\n return true;\n case 2:\n MainActivity.this.checkIfScrollNeeded(view, dragEvent);\n return true;\n case 3:\n LinkedList<Light> groupToRemove = null;\n boolean afterFirstGroup = false;\n ArrayList<Integer> groupNumberList = new ArrayList<>();\n Iterator it = MainActivity.this.groups.iterator();\n while (it.hasNext()) {\n LinkedList<Light> group = (LinkedList) it.next();\n group.remove(MainActivity.this.lightForGrouping);\n if (afterFirstGroup && group.isEmpty()) {\n groupToRemove = group;\n } else if (!group.isEmpty()) {\n groupNumberList.add(Integer.valueOf(((Light) group.get(0)).getGroupNumber()));\n }\n afterFirstGroup = true;\n }\n if (!groupNumberList.contains(Integer.valueOf(0))) {\n groupNumberList.add(Integer.valueOf(0));\n }\n if (groupToRemove != null) {\n MainActivity.this.groups.remove(groupToRemove);\n }\n int emptyIndex = -1;\n if (!groupNumberList.isEmpty()) {\n Collections.sort(groupNumberList);\n int i = 0;\n while (true) {\n if (i < groupNumberList.size() - 1) {\n if (((Integer) groupNumberList.get(i)).intValue() + 1 != ((Integer) groupNumberList.get(i + 1)).intValue()) {\n emptyIndex = ((Integer) groupNumberList.get(i)).intValue() + 1;\n } else {\n i++;\n }\n }\n }\n }\n if (emptyIndex == -1) {\n emptyIndex = ((Integer) groupNumberList.get(groupNumberList.size() - 1)).intValue() + 1;\n }\n Log.i(MainActivity.tag, emptyIndex + \" empty index groupNumberList \" + groupNumberList);\n LinkedList<Light> newGroup = new LinkedList<>();\n MainActivity.this.lightForGrouping.setGroupName(\"New Group\", false);\n MainActivity.this.lightForGrouping.setGroupNumber(emptyIndex, false);\n newGroup.add(MainActivity.this.lightForGrouping);\n MainActivity.this.groups.add(newGroup);\n if (MainActivity.this.currentLight == MainActivity.this.lightForGrouping && MainActivity.this.broadcastingToGroup) {\n MainActivity.this.setToolbarTitle();\n }\n MainActivity.this.redrawDrawerLinearLayout();\n MainActivity.this.highlightDrawerSelection();\n if ((MainActivity.this.currentLight instanceof SideKick) || (MainActivity.this.currentLight instanceof Connect)) {\n Fragment currentFragment = MainActivity.this.getSupportFragmentManager().findFragmentById(R.id.frameLayout);\n if (currentFragment instanceof DreamScreenFragment) {\n ((DreamScreenFragment) currentFragment).redrawFragment();\n }\n }\n return true;\n case 4:\n return true;\n case 5:\n return true;\n case 6:\n return true;\n default:\n return true;\n }\n }\n };\n drawerAddNewGroup.setOnDragListener(r016);\n }\n RelativeLayout relativeLayout = new RelativeLayout(this);\n RelativeLayout.LayoutParams layoutParams13 = new RelativeLayout.LayoutParams(-1, -1);\n relativeLayout.setLayoutParams(layoutParams13);\n relativeLayout.setVerticalGravity(80);\n relativeLayout.setPadding(pxToDp(8), pxToDp(16), pxToDp(8), pxToDp(16));\n this.drawerLinearLayout.addView(relativeLayout);\n final RelativeLayout relativeLayout2 = relativeLayout;\n AnonymousClass24 r017 = new OnClickListener() {\n public void onClick(View view) {\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(relativeLayout2.getWindowToken(), 0);\n }\n };\n relativeLayout.setOnClickListener(r017);\n LinearLayout edittingLayout = new LinearLayout(this);\n RelativeLayout.LayoutParams layoutParams14 = new RelativeLayout.LayoutParams(-2, -2);\n layoutParams14.addRule(20);\n edittingLayout.setLayoutParams(layoutParams14);\n edittingLayout.setOrientation(1);\n edittingLayout.setGravity(1);\n relativeLayout.addView(edittingLayout);\n ImageButton imageButton = new ImageButton(this);\n imageButton.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));\n if (this.userEdittingUnlocked) {\n imageButton.setImageResource(R.drawable.ic_lock_open_white_36dp);\n } else {\n imageButton.setImageResource(R.drawable.ic_lock_outline_white_36dp);\n }\n imageButton.setBackgroundColor(0);\n AnonymousClass25 r018 = new OnClickListener() {\n public void onClick(View view) {\n if (!MainActivity.this.groups.isEmpty()) {\n Log.i(MainActivity.tag, \"userEdittingLockButton\");\n MainActivity.this.userEdittingUnlocked = !MainActivity.this.userEdittingUnlocked;\n MainActivity.this.redrawDrawerLinearLayout();\n MainActivity.this.highlightDrawerSelection();\n ((InputMethodManager) MainActivity.this.getSystemService(\"input_method\")).hideSoftInputFromWindow(MainActivity.this.drawerLinearLayout.getWindowToken(), 0);\n }\n }\n };\n imageButton.setOnClickListener(r018);\n edittingLayout.addView(imageButton);\n TextView edittingText = new TextView(this);\n edittingText.setLayoutParams(new ViewGroup.LayoutParams(pxToDp(75), -2));\n edittingText.setTextSize(this.drawerTextSize);\n edittingText.setTypeface(this.font);\n edittingText.setTextColor(secondaryTextColor);\n edittingText.setGravity(1);\n edittingText.setText(\"Edit\");\n edittingLayout.addView(edittingText);\n LinearLayout addNewLayout = new LinearLayout(this);\n RelativeLayout.LayoutParams layoutParams15 = new RelativeLayout.LayoutParams(-2, -2);\n layoutParams15.addRule(21);\n addNewLayout.setLayoutParams(layoutParams15);\n addNewLayout.setOrientation(1);\n addNewLayout.setGravity(1);\n relativeLayout.addView(addNewLayout);\n ImageButton addDeviceButton = new ImageButton(this);\n addDeviceButton.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));\n addDeviceButton.setImageResource(R.drawable.ic_add_circle_outline_white_36dp);\n addDeviceButton.setBackgroundColor(0);\n addDeviceButton.setAdjustViewBounds(true);\n AnonymousClass26 r019 = new OnClickListener() {\n public void onClick(View view) {\n MainActivity.this.drawerLayout.closeDrawers();\n Fragment currentFragment = MainActivity.this.getSupportFragmentManager().findFragmentById(R.id.frameLayout);\n if ((currentFragment instanceof NewDeviceFragment) || ((currentFragment instanceof FirmwareUpdateFragment) && ((FirmwareUpdateFragment) currentFragment).isUpdating())) {\n Log.i(MainActivity.tag, \"dont let user start newDeviceFragment if currently NewDeviceFragment or FirmwareUpdateFragment\");\n return;\n }\n MainActivity.this.groups = new LinkedList();\n MainActivity.this.currentLight = null;\n MainActivity.this.broadcastingToGroup = false;\n MainActivity.this.lightForGrouping = null;\n MainActivity.this.toolbarTitle.setText(\"\");\n MainActivity.this.toolbarGroupIcon.setVisibility(8);\n MainActivity.this.redrawDrawerLinearLayout();\n FragmentManager fragmentManager = MainActivity.this.getSupportFragmentManager();\n for (int i = 0; i < fragmentManager.getBackStackEntryCount(); i++) {\n fragmentManager.popBackStack();\n }\n fragmentManager.beginTransaction().replace(R.id.frameLayout, NewDeviceFragment.newInstance()).commitAllowingStateLoss();\n MainActivity.this.handler.postDelayed(new Runnable() {\n public void run() {\n MainActivity.this.hideToolbarButtons();\n }\n }, 50);\n }\n };\n addDeviceButton.setOnClickListener(r019);\n addNewLayout.addView(addDeviceButton);\n TextView addNewText = new TextView(this);\n addNewText.setLayoutParams(new ViewGroup.LayoutParams(pxToDp(75), -2));\n addNewText.setTextSize(this.drawerTextSize);\n addNewText.setTypeface(this.font);\n addNewText.setTextColor(secondaryTextColor);\n addNewText.setGravity(17);\n addNewText.setText(getResources().getString(R.string.AddNew));\n addNewLayout.addView(addNewText);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n\n // Declarar y referenciar el RecyclerView que definimos en el XML\n RecyclerView recyclerView = view.findViewById(R.id.recyclerView);\n\n /*\n * Setear el LayoutManager al RecyclerView (recordar que podemos definir distintos tipos de\n * LayoutManager según la forma en la cual queremos mostrar nuestra lista.)\n */\n\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL, false);\n\n /*\n * Setear el LayoutManager que hayamos elegido al RecyclerView referenciado en el paso 1:\n * recyclerView.setLayoutManager(layoutManager);\n */\n recyclerView.setLayoutManager(linearLayoutManager);\n\n\n // Creo la lista que tiene los items.\n List<ItemLista> itemsDeLista = new ArrayList<>();\n\n\n // cargo la lista con los items\n itemsDeLista.add(new ItemLista(\"Batman\",\"Accion\",R.drawable.batman));\n itemsDeLista.add(new ItemLista(\"Damages\", \"Drama\", R.drawable.damages));\n itemsDeLista.add(new ItemLista(\"Destroyer\", \"Drama\", R.drawable.destroyer));\n itemsDeLista.add(new ItemLista(\"El Juicio\", \"Drama\", R.drawable.eljuicio));\n itemsDeLista.add(new ItemLista(\"Inocente\", \"Drama\", R.drawable.inocente));\n itemsDeLista.add(new ItemLista(\"Intern\", \"Drama\", R.drawable.intern));\n itemsDeLista.add(new ItemLista(\"Jhon Wick 2\", \"Accion\", R.drawable.johnwick2));\n itemsDeLista.add(new ItemLista(\"King Kong\", \"Accion\", R.drawable.kong));\n itemsDeLista.add(new ItemLista(\"La Boda de mi Amigo\", \"Comedia\", R.drawable.labodademi));\n itemsDeLista.add(new ItemLista(\"Prometo\", \"Drama\", R.drawable.prometo));\n itemsDeLista.add(new ItemLista(\"Second\", \"Drama\", R.drawable.second));\n itemsDeLista.add(new ItemLista(\"The Good Doctor\", \"Drama\", R.drawable.thegoogdoctor));\n\n /*\n * Crear un Adapter, utilizando la clase definida anteriormente.\n * ItemListaAdapter itemListaAdapter = new ItemAdapter(itemsDeLista);\n *\n */\n ItemListaAdapter itemListaAdapter = new ItemListaAdapter(itemsDeLista);\n\n // Setear al RecyclerView el adapter creado.\n recyclerView.setAdapter(itemListaAdapter);\n\n return view;\n }", "private void LoopData() {\n\t\tfor (int i = 0; i < drawable.length; i++) {\n\t\t\titems_list items_list = new items_list();\n\t\t\titems_list.setDrawable(getResources().getDrawable(drawable[i]));\n\t\t\titems_list.setLek(string[i]);\n\t\t\tlists.add(items_list);\n\t\t}\n\n\t}", "@Override\n public CustomAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.recycler_list_item, parent, false);\n // set the view's size, margins, paddings and layout parameters\n\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@Override\n public LanguagesAdapter.LanguagesAdapterViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n int layoutId = -1;\n switch (viewType) {\n case REGULAR_ITEM_VIEW_TYPE:\n layoutId = R.layout.language_item;\n break;\n case ADD_A_LANGUAGE_VIEW_TYPE:\n // We might want to change this in the future.\n layoutId = R.layout.language_add_new_item;\n break;\n }\n\n // Inflate layout and create (& return!) ViewHolder.\n View view = LayoutInflater.from(parent.getContext()).inflate(layoutId, parent, false);\n\n return new LanguagesAdapterViewHolder(view);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.main_list_item, parent, false);\n ViewHolder viewHolder = new ViewHolder(view);\n view.setTag(viewHolder);\n return view;\n }", "private void positionItems()\n\t{\n\t\t// Log.v(TAG, \".positionItems\");\n\n\t\tint left = 0;\n\n\t\t// Find what should be the \"left\" value of the first child displayed.\n\t\t// This is needed in order to know how much to offset the first item\n\t\t// to the left when it started before the grid's starting time.\n\t\t// So, we find the time difference from the start in minutes,\n\t\t// and convert it to pixels.\n\t\tTimeBasedRelativeLayout firstChild = (TimeBasedRelativeLayout) getChildAt(0);\n\t\tif (firstChild != null)\n\t\t{\n\t\t\tProgram firstProgram = (Program) _adapter.getItem(_firstItemPosition);\n\n\t\t\tint firstChildWidth = firstChild.getMeasuredWidth();\n\t\t\tint thisWidth = getWidth();\n\n\t\t\tif (firstChildWidth > thisWidth)\n\t\t\t{\n\t\t\t\t// This is needed so that programs that are too long to fit the\n\t\t\t\t// visible area of the grid are resized to the grid's width.\n\t\t\t\t// Thus, the program title remains visible to the user at all\n\t\t\t\t// times even during horizontal pagination.\n\n\t\t\t\tfirstChild.setDesiredWidth(thisWidth);\n\t\t\t\tfirstChild.measure(MeasureSpec.AT_MOST, MeasureSpec.EXACTLY);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlong deltaMillis = _gridStartTimeMillis - firstProgram.getStartTime().getTimeInMillis();\n\t\t\t\tdouble roundingOffset = deltaMillis > 0 ? 0.5 : -0.5;\n\t\t\t\tlong deltaMin = (long) (deltaMillis / 60000.0 + roundingOffset);\n\t\t\t\tleft = -(int) (deltaMin * firstChild.getPixelsPerOneMinute());\n\t\t\t}\n\t\t}\n\n\t\tint top = 0;\n\n\t\tint childCount = getChildCount();\n\t\tfor (int index = 0; index < childCount; index++)\n\t\t{\n\t\t\tView child = getChildAt(index);\n\n\t\t\tint width = child.getMeasuredWidth();\n\t\t\tint height = child.getMeasuredHeight();\n\n\t\t\tchild.layout(left, top, left + width, top + height);\n\t\t\tleft += width;\n\t\t}\n\t}", "protected abstract ReadCell<DataType> createItemCell(LayoutInflater inflater, View convertView, ViewGroup parent);", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.main_menu_item, parent, false);\n }\n\n String currentItem = getItem(position);\n String[] itemParts = currentItem.split(\",\");\n TextView textIcon = (TextView) listItemView.findViewById(R.id.text_icon);\n textIcon.setTypeface(awsomefont);\n textIcon.setText(itemParts[0]);\n TextView textItem = (TextView) listItemView.findViewById(R.id.text_item);\n textItem.setText(itemParts[1]);\n return listItemView;\n\n }", "@NonNull\n @Override\n public Adapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int i) {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_rv, parent, false);\n return new ViewHolder(view);\n }", "public void reconstructViews() {\n for (int i = 0; i < getChildCount(); i++) {\n VerificationCustomItem item = (VerificationCustomItem) getChildAt(i);\n item.reconstructView();\n }\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.item_list, container, false);\r\n\r\n final ArrayList<Item> items = new ArrayList<>();\r\n items.add(new Item(R.drawable.lake_myvatn, getString(R.string.lakemyvatntitle), getString(R.string.lakemyvatn)));\r\n items.add(new Item(R.drawable.godafoss_image, getString(R.string.godafosstitle), getString(R.string.godafoss)));\r\n items.add(new Item(R.drawable.dimmuborgir_image, getString(R.string.dimmuborgirtitle), getString(R.string.dimmuborgir)));\r\n items.add(new Item(R.drawable.laufas_image, getString(R.string.laufastitle), getString(R.string.laufas)));\r\n items.add(new Item(R.drawable.hrisey_island, getString(R.string.hriseytitle), getString(R.string.hrisey)));\r\n items.add(new Item(R.drawable.krafla, getString(R.string.kraflatitle), getString(R.string.krafla)));\r\n\r\n ItemAdapter adapter = new ItemAdapter(getActivity(), items);\r\n\r\n ListView listView = (ListView) rootView.findViewById(R.id.list);\r\n\r\n listView.setAdapter(adapter);\r\n\r\n //set click listener so the user can view more details if they click on an item\r\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n @Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n //get the position of the current list item\r\n Item item = items.get(position);\r\n\r\n //create a bundle object and add data to present in the details activity\r\n Bundle extras = new Bundle();\r\n extras.putInt(\"image\", item.getImageResourceId());\r\n extras.putString(\"title\", item.getTitleResourceId());\r\n extras.putString(\"text\", item.getTextResourceId());\r\n\r\n //create and initialise the intent\r\n Intent detailsIntent = new Intent(getActivity(), DetailsActivity.class);\r\n\r\n //attach the bundle to the intent object\r\n detailsIntent.putExtras(extras);\r\n\r\n //start the activity\r\n startActivity(detailsIntent);\r\n\r\n }\r\n });\r\n\r\n return rootView;\r\n }", "@NonNull\n @Override\n public ChatListAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n LinearLayout v = (LinearLayout) LayoutInflater.from(parent.getContext())\n .inflate(R.layout.chat_item, parent, false);\n return new MyViewHolder(v);\n }", "@Override\n public void setUpAdapterAndView(List<ListItem> listOfData) {\n this.listOfData = listOfData;\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n\n recyclerView.setLayoutManager(layoutManager);\n\n adapter = new CustomAdapter();\n recyclerView.setAdapter(adapter);\n\n DividerItemDecoration itemDecoration = new DividerItemDecoration(\n recyclerView.getContext(),\n layoutManager.getOrientation()\n );\n\n itemDecoration.setDrawable(\n ContextCompat.getDrawable(\n ListActivity.this,\n R.drawable.divider_white\n )\n );\n\n recyclerView.addItemDecoration(\n itemDecoration\n );\n\n ItemTouchHelper itemTouchHelper = new ItemTouchHelper(createHelperCallback());\n itemTouchHelper.attachToRecyclerView(recyclerView);\n\n\n }", "public void DisplayCraftEssences(){\n LinearLayout servantList = findViewById(R.id.craft_essences_list_view);\n for(int i = 0; i < listOfCraftEssences.size(); i++){\n LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n LinearLayout child = (LinearLayout) inflater.inflate(R.layout.servant_small_preview, null);\n\n final ImageView craftEssencePicture = (ImageView) child.getChildAt(0);\n TextView craftEssenceName = (TextView) child.getChildAt(1);\n\n Drawable drawable = getResources().getDrawable(getResources()\n .getIdentifier(\"ce_\" + (i+1), \"drawable\", getPackageName()));\n craftEssencePicture.setImageDrawable(drawable);\n\n craftEssenceName.setText(listOfCraftEssences.get(i).getCraftEssenceName());\n\n final int craftEssenceNumber = i;\n\n craftEssencePicture.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n viewCraftEssenceDetails(craftEssenceNumber, craftEssencePicture);\n }\n });\n\n TextView btnChooseCE = new TextView(this);\n btnChooseCE.setLayoutParams(child.getChildAt(1).getLayoutParams());\n btnChooseCE.setText(\"CHOOSE\");\n btnChooseCE.setBackground(getResources().getDrawable(R.drawable.colors));\n btnChooseCE.setTextSize(10);\n btnChooseCE.setTextColor(getResources().getColor(R.color.color_white));\n btnChooseCE.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n\n final int ceNumber = i+1;\n\n btnChooseCE.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n chooseCraftEssence(ceNumber);\n }\n });\n\n child.addView(btnChooseCE);\n\n servantList.addView(child, i);\n }\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView addContainerView = inflater.inflate(R.layout.activity_addcontainer, container);\n\t\t\n\t\tcontext = getActivity();\n\t\t\n\t\t// Get and set UI elements\n\t\taddContainerSpinner = (Spinner) addContainerView.findViewById(R.id.containerSpinner);\n\t\tlength = (EditText) addContainerView.findViewById(R.id.containerLength);\n\t\twidth = (EditText) addContainerView.findViewById(R.id.containerWidth);\n\t\theight = (EditText) addContainerView.findViewById(R.id.containerHeight);\n\t\tlinearLayout = (LinearLayout) addContainerView.findViewById(R.id.linearLayout);\n\t\t\n\t\t// Set background image transparency\n\t\tlinearLayout.getBackground().setAlpha(85);\n\t\t\n\t\tArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(context,\n\t\t\t\tandroid.R.layout.simple_spinner_item, containerTypes);\n\t\tspinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\t\taddContainerSpinner.setAdapter(spinnerAdapter);\n\t\t\n\t\tcontainerTypes.add(\"Fish Tank\");\n\t\tcontainerTypes.add(\"Sump Tank\");\n\t\tcontainerTypes.add(\"Grow Bed\");\n\n\t\tspinnerAdapter.notifyDataSetChanged();\n\t\t\n\t\taddContainerSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcontainerType = containerTypes.get(position);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\treturn addContainerView;\n\t}", "@Override\n public void onAnimationUpdate(ValueAnimator arg0) {\n LinearLayout.LayoutParams llpitem = (LinearLayout.LayoutParams) item.getLayoutParams();\n llpitem.width = (Integer) arg0.getAnimatedValue();\n item.setLayoutParams(llpitem);\n }", "@Override\n\tpublic View getView(final int position, View convertView, ViewGroup parent) {\n\t\tfinal HolderView holder;\n\t\tif (convertView == null) {\n\t\t\tholder = new HolderView();\n\t\t\t// convertView = mInflater.inflate(R.layout.layout_item_history,\n\t\t\t// null);\n\t\t\t// holder.lblResNameHistory = (TextView)\n\t\t\t// convertView.findViewById(R.id.lblResName_History);\n\t\t\t// convertView = mInflater.inflate(R.layout.row_list_item, null);\n\t\t\tconvertView = mInflater.inflate(R.layout.row_list_item_vs_order,\n\t\t\t\t\tnull);\n\t\t\tholder.layInCart = (LinearLayout) convertView\n\t\t\t\t\t.findViewById(R.id.layInCart);\n\t\t\tholder.btnDelete = (ImageView) convertView\n\t\t\t\t\t.findViewById(R.id.btnDelete);\n\t\t\tholder.btnAddTopping = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.btnAddTopping);\n\t\t\tholder.lblToppingPrice = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.lblToppingPrice);\n\t\t\tholder.btnAddIntroduction = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.btnAddIntroduction);\n\t\t\tholder.lblAddQuantity = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.lblAddQuantity);\n\n\t\t\tholder.imgFood = (ImageView) convertView.findViewById(R.id.imgFood);\n\t\t\tholder.progess = (ProgressBar) convertView\n\t\t\t\t\t.findViewById(R.id.progess);\n\t\t\tholder.lblFoodName = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.lblFoodName);\n\t\t\tholder.lblCategoryName = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.lblCategory);\n\t\t\tholder.lblCookMethod = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.lblCookMethod);\n\t\t\tholder.lblPrice = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.lblPrice);\n\t\t\tholder.btnAddItem = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.btnAddItem);\n\n\t\t\tconvertView.setTag(holder);\n\t\t} else {\n\t\t\tholder = (HolderView) convertView.getTag();\n\t\t}\n\t\tfinal Item item = arrItems.get(position);\n\t\tif (item != null) {\n\t\t\tboolean inCart = false;\n\t\t\tItemCart itemcart = new ItemCart();\n\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\t\t\t\t\titemcart = btem;\n\t\t\t\t\tinCart = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tholder.btnAddItem.setVisibility(View.VISIBLE);\n\t\t\tholder.layInCart.setVisibility(View.GONE);\n\t\t\tholder.lblPrice.setText(\"$ \" + item.getPrice());\n\t\t\tholder.btnDelete.setVisibility(View.GONE);\n\t\t\tholder.lblCookMethod.setVisibility(View.GONE);\n\t\t\t// Add new\n\t\t\t// if (inCart) {\n\t\t\t// // holder.btnDelete.setVisibility(View.VISIBLE);\n\t\t\t// // holder.btnAddItem.setVisibility(View.GONE);\n\t\t\t// // holder.layInCart.setVisibility(View.VISIBLE);\n\t\t\t// holder.lblPrice.setText(\"$ \" + item.getPrice() + \" (+$ \"\n\t\t\t// + itemcart.getPriceTopping() + \")\");\n\t\t\t// String temp = \"\";\n\t\t\t// for (Relish relishItem : itemcart.getArrRelish()) {\n\t\t\t// if (!relishItem.getSelectedOption().getName()\n\t\t\t// .equals(Constant.NONE)) {\n\t\t\t// temp += relishItem.getName().trim()\n\t\t\t// + \":\"\n\t\t\t// + relishItem.getSelectedOption().getName()\n\t\t\t// .trim() + \",\";\n\t\t\t// }\n\t\t\t// }\n\t\t\t// if (temp.length() > 1) {\n\t\t\t// temp = temp.substring(0, temp.length() - 1);\n\t\t\t// holder.lblToppingPrice.setText(temp);\n\t\t\t// holder.lblToppingPrice.setSelected(true);\n\t\t\t// } else {\n\t\t\t// holder.lblToppingPrice.setText(\"\");\n\t\t\t// }\n\t\t\t// holder.lblAddQuantity.setText(itemcart.getQuantities() + \"\");\n\t\t\t// } else {\n\t\t\t// holder.lblPrice.setText(\"$ \" + item.getPrice());\n\t\t\t// // holder.btnDelete.setVisibility(View.GONE);\n\t\t\t// // holder.btnAddItem.setVisibility(View.VISIBLE);\n\t\t\t// // holder.layInCart.setVisibility(View.GONE);\n\t\t\t// }\n\n\t\t\t// Start Remove by Cuongpm\n\t\t\t// if (item.getSelectedCookMethod() != null) {\n\t\t\t// holder.lblCookMethod.setText(item.getSelectedCookMethod()\n\t\t\t// .getName());\n\t\t\t// holder.lblCookMethod.setVisibility(View.VISIBLE);\n\t\t\t// } else {\n\t\t\t// holder.lblCookMethod.setVisibility(View.GONE);\n\t\t\t// }\n\t\t\t// End Remove by Cuongpm\n\n\t\t\tAQuery aq = lstAq.recycle(convertView);\n\t\t\tholder.lblFoodName.setText(item.getName());\n\t\t\tholder.lblCategoryName.setText(item.getCategory().getName());\n\t\t\taq.id(holder.imgFood)\n\t\t\t\t\t.progress(holder.progess)\n\t\t\t\t\t.image(item.getThumb(), true, true, 0, R.drawable.no_image,\n\t\t\t\t\t\t\tnew BitmapAjaxCallback() {\n\t\t\t\t\t\t\t\t@SuppressLint(\"NewApi\")\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void callback(String url, ImageView iv,\n\t\t\t\t\t\t\t\t\t\tBitmap bm, AjaxStatus status) {\n\t\t\t\t\t\t\t\t\tif (bm != null) {\n\t\t\t\t\t\t\t\t\t\tDrawable d = new BitmapDrawable(context\n\t\t\t\t\t\t\t\t\t\t\t\t.getResources(), bm);\n\t\t\t\t\t\t\t\t\t\tholder.imgFood.setBackgroundDrawable(d);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tholder.imgFood\n\t\t\t\t\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.no_image);\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\n\t\t\tholder.btnAddTopping.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tint tempPosition = 0;\n\t\t\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttempPosition++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistener.clickAddTopping(tempPosition,\n\t\t\t\t\t\t\tarrCart.get(tempPosition));\n\t\t\t\t}\n\t\t\t});\n\t\t\tholder.btnAddIntroduction.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tint tempPosition = 0;\n\t\t\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttempPosition++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistener.clickAddIntroduction(tempPosition,\n\t\t\t\t\t\t\tarrCart.get(tempPosition));\n\t\t\t\t}\n\t\t\t});\n\t\t\tholder.btnDelete.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tint tempPosition = 0;\n\t\t\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttempPosition++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistener.clickDelete(tempPosition);\n\t\t\t\t}\n\t\t\t});\n\t\t\tholder.lblAddQuantity.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tint tempPosition = 0;\n\t\t\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttempPosition++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistener.clickAddQuantities(tempPosition,\n\t\t\t\t\t\t\tarrCart.get(tempPosition));\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tholder.btnAddItem.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tint tempPosition = 0;\n\t\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttempPosition++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlistener.clickAddButton(tempPosition, item);\n\t\t\t}\n\t\t});\n\n\t\tholder.lblCookMethod.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlistener.clickDisplaylistMethod(position, item.getCategory()\n\t\t\t\t\t\t.getArrCookMethods());\n\t\t\t}\n\t\t});\n\n\t\treturn convertView;\n\t}", "@Override\n public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { //RECETA\n // create a new view\n LayoutInflater inflater = LayoutInflater.from (parent.getContext());\n View v = inflater.inflate(R.layout.row_layout, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "public void init(){\n elements = new ArrayList<>();\r\n elements.add(new ListElement(\"Aeshnidae\",this));\r\n ListElement element1 = createItem(\"Baetidae\");\r\n elements.add(element1);\r\n\r\n //elements.add(new ListElement(\"Aeshnidae\", 6, R.drawable.aeshnidaem));\r\n //elements.add(new ListElement(\"Baetidae\", 4, R.drawable.baetidae));\r\n elements.add(new ListElement(\"Blepharoceridae\", 10, R.drawable.blepharoceridae));\r\n elements.add(new ListElement(\"Calamoceratidae\", 10, R.drawable.calamoceridae));\r\n elements.add(new ListElement(\"Ceratopogonidae\", 4, R.drawable.ceratopogonidae));\r\n elements.add(new ListElement(\"Chironomidae\", 2, R.drawable.chironomidae));\r\n elements.add(new ListElement(\"Coenagrionidae\", 6, R.drawable.coenagrionidae));\r\n elements.add(new ListElement(\"Corydalidae\", 6, R.drawable.corydalidae));\r\n elements.add(new ListElement(\"Culicidae\", 2, R.drawable.culicidae));\r\n elements.add(new ListElement(\"Dolichopodidae\", 4, R.drawable.dolichopodidae));\r\n elements.add(new ListElement(\"Dystiscidae\", 3, R.drawable.dytiscidae));\r\n elements.add(new ListElement(\"Elmidae\", 5, R.drawable.elmidae));\r\n elements.add(new ListElement(\"Elmidae Larvae\", 5, R.drawable.elmidae_larvae));\r\n elements.add(new ListElement(\"Empididae\", 8, R.drawable.empididaem));\r\n elements.add(new ListElement(\"Ephydridae\", 8, R.drawable.ephydridaem));\r\n elements.add(new ListElement(\"Eprilodactylidae\", 5, R.drawable.eprilodactylidaem));\r\n elements.add(new ListElement(\"Gyrinidae\", 3, R.drawable.gyrinidae));\r\n elements.add(new ListElement(\"Helicopsychidae\", 10, R.drawable.helicopsychidae));\r\n elements.add(new ListElement(\"Hidrophilidae\", 3, R.drawable.hidrophilidae));\r\n elements.add(new ListElement(\"Hidropsychidae\", 5, R.drawable.hidropsychidae));\r\n elements.add(new ListElement(\"Hirudinea\", 5, R.drawable.hirudineam));\r\n elements.add(new ListElement(\"Hyalellidae\", 6, R.drawable.hyalellidaem));\r\n elements.add(new ListElement(\"Hydracarina\", 4, R.drawable.hydracarinam));\r\n elements.add(new ListElement(\"Hydrobiosidae\", 8, R.drawable.hydrobiosidae));\r\n elements.add(new ListElement(\"Hydroptilidae\", 6, R.drawable.hydroptilidae));\r\n elements.add(new ListElement(\"Leptoceridae\", 8, R.drawable.leptoceridae));\r\n elements.add(new ListElement(\"Leptohyphidea\", 7, R.drawable.leptohyphideam));\r\n elements.add(new ListElement(\"Leptophlebiidae\", 10, R.drawable.leptophlebiidae));\r\n elements.add(new ListElement(\"Lestidae\", 8, R.drawable.lestidaem));\r\n elements.add(new ListElement(\"Libellulidae\", 6, R.drawable.libellulidaem));\r\n elements.add(new ListElement(\"Lymnaeidae\", 3, R.drawable.lymnaeidaem));\r\n elements.add(new ListElement(\"Muscidae\", 2, R.drawable.muscidae));\r\n elements.add(new ListElement(\"Nematoda\", 0, R.drawable.nematodam));\r\n elements.add(new ListElement(\"Odontoceridae\", 10, R.drawable.odontoceridae));\r\n elements.add(new ListElement(\"Oligochaeta\", 1, R.drawable.oligochaetam));\r\n elements.add(new ListElement(\"Ostrachoda\", 3, R.drawable.ostracodam));\r\n elements.add(new ListElement(\"Perlidae\", 10, R.drawable.perlidae));\r\n elements.add(new ListElement(\"Philopotamidae\", 8, R.drawable.philopotamidae));\r\n elements.add(new ListElement(\"Physidae\", 3, R.drawable.physidaem));\r\n elements.add(new ListElement(\"Planaridae\", 5, R.drawable.planaridae));\r\n elements.add(new ListElement(\"Planorbidae\", 3, R.drawable.planorbidaem));\r\n elements.add(new ListElement(\"Psephenidae\", 5, R.drawable.psephenidae));\r\n elements.add(new ListElement(\"Psychodidae\", 3, R.drawable.psychodidae));\r\n elements.add(new ListElement(\"Scirtidae\", 5, R.drawable.scirtidae));\r\n elements.add(new ListElement(\"Sialidea\", 6, R.drawable.sialidaem));\r\n elements.add(new ListElement(\"Simuliidae\", 5, R.drawable.simuliidae));\r\n elements.add(new ListElement(\"Sphaeriidae\", 3, R.drawable.sphaeriidaem));\r\n elements.add(new ListElement(\"Stratiomidae\", 4, R.drawable.stratiomidae));\r\n elements.add(new ListElement(\"Syrphidae\", 1, R.drawable.syrphidaem));\r\n elements.add(new ListElement(\"Tabanidae\", 4, R.drawable.tabanidae));\r\n elements.add(new ListElement(\"Thiaridae\", 3, R.drawable.thiaridaem));\r\n elements.add(new ListElement(\"Tipulidae\", 5, R.drawable.tipulidae));\r\n elements.add(new ListElement(\"Xiphocentronidae\", 8, R.drawable.xiphocentronidaem));\r\n\r\n ListAdapter listAdapter = new ListAdapter(elements, this, new ListAdapter.OnItemClickListener() {\r\n @Override\r\n public void onItemClick(ListElement item) {\r\n moveToDescription(item);\r\n }\r\n });\r\n RecyclerView recyclerView = findViewById(R.id.listRecyclerView);\r\n recyclerView.setHasFixedSize(true);\r\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\r\n recyclerView.setAdapter(listAdapter);\r\n\r\n }", "public void setLayoutParams(int width, int height) {\n\t\titemsContainer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n\n final LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n// View view = null;\n\n// java.lang.String label;\n// java.lang.String image = null;\n java.lang.String template = null;\n JSONArray itemsArray = null;\n List<JSONObject> itemObjects = new ArrayList<JSONObject>();\n\n try {\n// label = objects.get(position).getString(TAG_LABEL);\n// image = objects.get(position).getString(TAG_IMAGE);\n template = objects.get(position).getString(TAG_TEMPLATE);\n itemsArray = objects.get(position).getJSONArray(TAG_ITEMS);\n\n for (int i = 0; i < itemsArray.length(); i++) {\n itemObjects.add(itemsArray.getJSONObject(i));\n }\n\n if(\"product-template-1\".equals(template)){\n\n Log.i(LOGTAG, \"Position = \" + position);\n View layoutView = layoutInflater.inflate(R.layout.template_one_layout, parent, false);\n// View imageView = layoutInflater.inflate(R.layout.template_one, parent, false);\n\n LinearLayout linearLayout = (LinearLayout) layoutView.findViewById(R.id.vertical_layout);\n\n for (int i = 0; i < itemsArray.length(); i++) {\n\n// ImageView image = (ImageView) imageView.findViewById(R.id.image_1);\n ImageView image = new ImageView(context);\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);\n image.setLayoutParams(params);\n image.setScaleType(ImageView.ScaleType.FIT_XY);\n\n View divider = new View(context);\n LinearLayout.LayoutParams paramsDivider = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT, 20);\n divider.setLayoutParams(paramsDivider);\n\n try {\n java.lang.String imageString = itemsArray.getJSONObject(i).getString(TAG_IMAGE);\n Log.i(LOGTAG, \"Template 1 : URL = \" + imageString);\n Picasso.with(getApplicationContext()).load(imageString).into(image);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n linearLayout.addView(image);\n linearLayout.addView(divider);\n }\n\n return layoutView;\n\n }else if(\"product-template-2\".equals(template)){\n\n Log.i(LOGTAG, \"Position = \" + position);\n\n /*View view = layoutInflater.inflate(R.layout.template_two, parent, false);\n RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);\n // recyclerView.setHasFixedSize(true);\n\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);\n recyclerView.setLayoutManager(linearLayoutManager);\n\n RecyclerAdapter recyclerAdapter = new RecyclerAdapter(itemObjects);\n recyclerView.setAdapter(recyclerAdapter);\n return view;*/\n\n View layoutView = layoutInflater.inflate(R.layout.template_two_layout, parent, false);\n LinearLayout linearLayout = (LinearLayout) layoutView.findViewById(R.id.horizontal_layout);\n\n for (int i = 0; i < itemsArray.length(); i++) {\n\n View imageView = layoutInflater.inflate(R.layout.template_two_detail, null/*, false*/);\n LinearLayout templateTwoDetailLayout = (LinearLayout) imageView.findViewById(R.id.template_two_layout);\n ImageView image = (ImageView) imageView.findViewById(R.id.image_2);\n\n View divider = new View(context);\n LinearLayout.LayoutParams paramsDivider = new LinearLayout.LayoutParams(\n 20, LinearLayout.LayoutParams.MATCH_PARENT);\n divider.setLayoutParams(paramsDivider);\n\n try {\n java.lang.String imageString = itemsArray.getJSONObject(i).getString(TAG_IMAGE);\n Log.i(LOGTAG, \"Template 2 : URL = \" + imageString);\n Picasso.with(getApplicationContext()).load(imageString).into(image);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n linearLayout.addView(templateTwoDetailLayout);\n linearLayout.addView(divider);\n }\n\n return layoutView;\n\n }else if(\"product-template-3\".equals(template)){\n\n Log.i(LOGTAG, \"Position = \" + position);\n\n View layoutView = layoutInflater.inflate(R.layout.template_three_layout, parent, false);\n ViewPager viewPager = (ViewPager) layoutView.findViewById(R.id.pager);\n\n Log.i(LOGTAG, \"Size of itemsArray template 3 \" + itemsArray.length());\n ScreenSlidePagerAdapter pagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager(), itemsArray);\n viewPager.setAdapter(pagerAdapter);\n viewPager.setOffscreenPageLimit(5);\n\n CirclePageIndicator circlePageIndicator = (CirclePageIndicator) layoutView.findViewById(R.id.circlePageInd);\n circlePageIndicator.setViewPager(viewPager);\n\n return layoutView;\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return new View(context);\n }", "@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\n\t\tmListPadding.left = super.getPaddingLeft();\n\t\tmListPadding.top = super.getPaddingTop();\n\t\tmListPadding.right = super.getPaddingRight();\n\t\tmListPadding.bottom = super.getPaddingBottom();\n\n\t\tint widthMode = MeasureSpec.getMode(widthMeasureSpec);\n\t\tint heightMode = MeasureSpec.getMode(heightMeasureSpec);\n\t\tint widthSize = MeasureSpec.getSize(widthMeasureSpec);\n\t\tint heightSize = MeasureSpec.getSize(heightMeasureSpec);\n\n\t\tint childWidth = 0;\n\t\tint childHeight = 0;\n\n\t\tmItemCount = mAdapter == null ? 0 : mAdapter.getCount();\n\t\tif (mItemCount > 0\n\t\t\t\t&& (widthMode == MeasureSpec.UNSPECIFIED || heightMode == MeasureSpec.UNSPECIFIED)) {\n\t\t\tfinal View child = obtainView(0);\n\n\t\t\tmeasureScrapChild(child, 0, heightMeasureSpec);\n\n\t\t\tchildWidth = child.getMeasuredWidth();\n\t\t\tchildHeight = child.getMeasuredHeight();\n\n\t\t\tmRemovedViewQueue.offer(child);\n\t\t}\n\n\t\tif (widthMode == MeasureSpec.UNSPECIFIED) {\n\t\t\twidthSize = mListPadding.left + mListPadding.right + childWidth\n\t\t\t\t\t+ getVerticalScrollbarWidth();\n\t\t}\n\n\t\tif (heightMode == MeasureSpec.UNSPECIFIED) {\n\t\t\theightSize = mListPadding.top + mListPadding.bottom + childHeight\n\t\t\t\t\t+ getVerticalFadingEdgeLength() * 2;\n\t\t}\n\n\t\tif (widthMode == MeasureSpec.AT_MOST) {\n\t\t\t// TODO: after first layout we should maybe start at the first\n\t\t\t// visible position, not 0\n\t\t\twidthSize = measureWidthOfChildren(heightMeasureSpec, 0,\n\t\t\t\t\tNO_POSITION, widthSize, -1);\n\t\t}\n\n\t\tsetMeasuredDimension(widthSize, heightSize);\n\t\tmWidthMeasureSpec = widthMeasureSpec;\n\t}", "private void addStep(String step) {\n stepView = View.inflate(NewRecipe.this, R.layout.new_step_layout, null);\n\n txtInstruction = stepView.findViewById(R.id.txtInstruction);\n\n //count current item\n int count = stepListLayout.getChildCount();\n LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n param.setMargins(0, 10, 0, 10);\n stepView.setLayoutParams(param);\n stepView.setTag(\"step\" + count);\n\n stepListLayout.setBackgroundColor(Color.TRANSPARENT);\n stepListLayout.addView(stepView);\n\n //// set value after adding new row\n count = stepListLayout.getChildCount();\n stepText = stepView.findViewById(R.id.step);\n\n for (int i = 0; i < count; i++) {\n itemView = stepListLayout.getChildAt(i);\n if (itemView instanceof LinearLayout) {\n\n ImageButton imgDel = stepView.findViewById(R.id.imgDel);\n imgDel.setTag(stepView);\n imgDel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeView((View) v.getTag());\n }\n });\n stepText.setText((i + 1) + \":\");\n txtInstruction.setTag(\"Instruction\" + (i + 1));\n if (!step.equals(\"\")) {\n txtInstruction.setText(step);\n }\n }\n }\n\n }", "private void createListView()\n {\n itens = new ArrayList<ItemListViewCarrossel>();\n ItemListViewCarrossel item1 = new ItemListViewCarrossel(\"Guilherme Biff\");\n ItemListViewCarrossel item2 = new ItemListViewCarrossel(\"Lucas Volgarini\");\n ItemListViewCarrossel item3 = new ItemListViewCarrossel(\"Eduardo Ricoldi\");\n\n\n ItemListViewCarrossel item4 = new ItemListViewCarrossel(\"Guilh\");\n ItemListViewCarrossel item5 = new ItemListViewCarrossel(\"Luc\");\n ItemListViewCarrossel item6 = new ItemListViewCarrossel(\"Edu\");\n ItemListViewCarrossel item7 = new ItemListViewCarrossel(\"Fe\");\n\n ItemListViewCarrossel item8 = new ItemListViewCarrossel(\"iff\");\n ItemListViewCarrossel item9 = new ItemListViewCarrossel(\"Lucini\");\n ItemListViewCarrossel item10 = new ItemListViewCarrossel(\"Educoldi\");\n ItemListViewCarrossel item11 = new ItemListViewCarrossel(\"Felgo\");\n\n itens.add(item1);\n itens.add(item2);\n itens.add(item3);\n itens.add(item4);\n\n itens.add(item5);\n itens.add(item6);\n itens.add(item7);\n itens.add(item8);\n\n itens.add(item9);\n itens.add(item10);\n itens.add(item11);\n\n //Cria o adapter\n adapterListView = new AdapterLsitView(this, itens);\n\n //Define o Adapter\n listView.setAdapter(adapterListView);\n //Cor quando a lista é selecionada para ralagem.\n listView.setCacheColorHint(Color.TRANSPARENT);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot)\n //Inflate a new view hierarchy from the specified XML node\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public WordListAdapter.WordViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View mItemView = mInflater.inflate(\n R.layout.wordlist_item, parent, false);\n return new WordViewHolder(mItemView, this);\n }", "private void drawStudentViews() {\n Dimensions dimsNum = dimensionsContainer.findDimensions(KEY_NUM_LEFT);\n Dimensions dimsName = dimensionsContainer.findDimensions(KEY_NAME_LEFT);\n Integer iPref = Integer.valueOf(PrefsManager.getInstance(mainContext).getPrefs()\n .getString(PrefsManager.PREFS_BLANK_NAME_FORMAT,\n \"0\"));\n String str;\n BlankTagHandler tagHandler;\n if ((studentList != null) && (!studentList.isEmpty())) {\n for (int i = 0; i < studentList.size(); i++) {\n //Add LayoutLeft\n LinearLayout layoutLeft = new LinearLayout(mainContext);\n layoutLeft.setOrientation(LinearLayout.HORIZONTAL);\n layoutLeft.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.addView(layoutLeft);\n //Add numBody\n TextView numBody = new TextView(mainContext);\n numBody.setText(String.valueOf(i + 1));\n dimsNum.setStyle(numBody);\n numBody.setTag(\n new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_body));\n numBody.setClickable(true);\n numBody.setOnClickListener(generalClickListener);\n layoutLeft.addView(numBody);\n //Add nameBody\n TextView nameBody = new TextView(mainContext);\n int formatId;\n if ((studentList.get(i).getMiddleName() == null)\n || ((studentList.get(i).getMiddleName().equals(\"\")))) {\n if (iPref == 0) { formatId = 4; } else formatId = 3;\n } else { formatId = iPref; }\n switch (formatId) {\n case 0:\n str = String.format(\"%s %c.%c.\",\n studentList.get(i).getLastName(),\n studentList.get(i).getFirstName().charAt(0),\n studentList.get(i).getMiddleName().charAt(0));\n break;\n case 1:\n str = String.format(\"%s %s %s\",\n studentList.get(i).getLastName(),\n studentList.get(i).getFirstName(),\n studentList.get(i).getMiddleName());\n break;\n case 2:\n str = String.format(\"%s %s %c.\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName(),\n studentList.get(i).getMiddleName().charAt(0));\n break;\n case 3:\n str = String.format(\"%s %s\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName());\n break;\n case 4:\n str = String.format(\"%s %c.\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName().charAt(0));\n break;\n default:\n str = \"err\";\n }\n nameBody.setText(str);\n dimsName.setStyle(nameBody);\n setClickableView(nameBody, dimsName.getBgColor());\n //nameBody.setMinHeight(Dimensions.dipToPixels(mainContext,48));\n //Add tagHandler\n tagHandler =\n new BlankTagHandler(BlankTagHandler.CeilType.STUDENT, R.id.blank_name_body);\n tagHandler.setStudentId(studentList.get(i).getId());\n tagHandler.setTextView(nameBody);\n nameBody.setTag(tagHandler);\n //DebugUtils.testStudentCols(nameBody);\n layoutLeft.addView(nameBody);\n\n }\n }\n//Add addRowCeil / Absent Row\n if (studentList == null || studentList.isEmpty() || (classList != null && !classList.isEmpty())\n || (studentList.isEmpty() && summaryEntryList != null &&\n !summaryEntryList.isEmpty())) {\n //Add LayoutLeft\n LinearLayout layoutLeft = new LinearLayout(mainContext);\n layoutLeft.setOrientation(LinearLayout.HORIZONTAL);\n layoutLeft.setLayoutParams(layoutParams_MP_WC);\n //layoutLeft.setX(dims.getViewWidth()+dims.getMarginsLeft()*2);\n layoutLeft.setGravity(Gravity.RIGHT);\n layoutLeft.setBackgroundColor(bgColor_Table);\n bodyLeftLayout.addView(layoutLeft);\n //Add nameBody\n TextView nameBody = new TextView(mainContext);\n //nameBody.setWidth(dims.getViewWidth());\n //nameBody.setGravity(Gravity.CENTER);\n\n Dimensions dimsAbsent = dimensionsContainer.findDimensions(KEY_ABSENT_CEIL);\n dimsAbsent.setStyle(nameBody);\n nameBody.setGravity(Gravity.CENTER);\n int width = 0;\n if (dimsName.getViewWidth() != null) width += dimsName.getViewWidth();\n if (dimsNum.getViewWidth() != null) width += dimsNum.getViewWidth();\n if (width != 0) {\n width += dimsNum.getMarginsLeft() + dimsNum.getMarginsRight();\n nameBody.setWidth(width);\n }\n if (studentList.isEmpty()) {\n nameBody.setText(R.string.symbol_row_add);\n tagHandler = new BlankTagHandler(BlankTagHandler.CeilType.ADD_ROW_CEIL,\n R.id.blank_absent_row);\n setClickableView(nameBody, dimsAbsent.getBgColor());\n } else {\n nameBody.setText(R.string.blank_absent_row);\n tagHandler =\n new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_absent_row);\n nameBody.setClickable(true);\n nameBody.setOnClickListener(generalClickListener);\n }\n tagHandler.setTextView(nameBody);\n nameBody.setTag(tagHandler);\n layoutLeft.addView(nameBody);\n }\n\n }" ]
[ "0.6294343", "0.61409056", "0.5899468", "0.5574812", "0.5567005", "0.5537363", "0.5520245", "0.55089635", "0.54610187", "0.5459691", "0.54474574", "0.5440849", "0.5425356", "0.5408935", "0.5400728", "0.5375098", "0.5319501", "0.530951", "0.5291781", "0.5276188", "0.5265819", "0.52653205", "0.52587146", "0.52564806", "0.5237701", "0.52376735", "0.5230762", "0.5219992", "0.52138895", "0.5199975", "0.51930267", "0.51887363", "0.51870036", "0.51868826", "0.51858234", "0.51831794", "0.518285", "0.51818895", "0.51804066", "0.5170064", "0.51565295", "0.51548654", "0.5148483", "0.5141728", "0.51329017", "0.513039", "0.5128131", "0.51232374", "0.5120898", "0.5118287", "0.510711", "0.51061296", "0.51048875", "0.51041883", "0.5099458", "0.5095249", "0.5094641", "0.5089891", "0.5084452", "0.50803447", "0.50787854", "0.5062007", "0.5058899", "0.5052305", "0.50396514", "0.50345457", "0.50334316", "0.503275", "0.5025539", "0.50247747", "0.5024282", "0.50221527", "0.5020343", "0.50149477", "0.5013485", "0.50109863", "0.5006057", "0.50044256", "0.5003235", "0.50007975", "0.49921623", "0.49904776", "0.4989082", "0.49890772", "0.49861512", "0.49854907", "0.49798346", "0.49781647", "0.4969141", "0.4968419", "0.4967528", "0.49618104", "0.49567562", "0.49523592", "0.49512565", "0.49502277", "0.49374226", "0.4935154", "0.49348468", "0.49323535", "0.4922132" ]
0.0
-1
If there are less lines than the line limit, then hide the more button.
@Override public void run() { if(body.getLineCount() < 4) { more.setVisibility(GONE); } body.setMaxLines(3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setLinesCount(String description, boolean isClicked) {\n mBinding.tvPdpProductDescription.setMaxLines(!isClicked ? (FOUR * moreIndex) : mLineCount);\n mBinding.tvPdpProductDescription.setEllipsize(\n mLineCount > FOUR * moreIndex ? TextUtils.TruncateAt.END : null);\n mBinding.tvPdpProductDesMore.setVisibility(\n (!isClicked) ? View.VISIBLE : View.GONE);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tif (moreSummaryBtn.getText().toString().equals(getResources().getString(com.rs.mobile.wportal.R.string.more))) {\n\t\t\t\t\t\n\t\t\t\t\t\tmoreSummaryBtn.setText(getResources().getString(com.rs.mobile.wportal.R.string.hide));\n\t\t\t\t\t\t\n\t\t\t\t\t\tsummaryTextView.setSingleLine(false);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsummaryTextView.invalidate();\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\tmoreSummaryBtn.setText(getResources().getString(com.rs.mobile.wportal.R.string.more));\n\t\t\t\t\t\t\n\t\t\t\t\t\tsummaryTextView.setMaxLines(4);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsummaryTextView.invalidate();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "int getLinesLimit();", "public void showMore() throws Exception {\n\t\tif(getControl(\"showMore\").queryVisible()) {\n\t\t\tgetControl(\"showMore\").click();\n\t\t}\n\t}", "boolean isMore();", "public void hideSubLines(){\n\t\tfor (int i = 1; i < lineLists.size(); i++){\n\t\t\tLinkedList<Line> lines = lineLists.get(i);\n\t\t\tfor (Line l : lines){\n\t\t\t\tl.setVisible(false);\n\t\t\t}\n\t\t}\n\t\tshowSubLines = false;\n\t}", "void setLinesLimit(int value);", "void showLoadingMoreMessages(boolean show);", "public boolean hasMoreItems();", "@Override\n public void setVisibleLength(int length) {}", "public void setMaxLines(int maxLines) {\n if (mMaxLines == maxLines || maxLines <= 0) {\n return;\n }\n mMaxLines = maxLines;\n mNeedUpdateLayout = true;\n }", "public void setMoreAvailable(Boolean moreAvailable) {\n this.moreAvailable = moreAvailable;\n }", "int getMaxOutputLines();", "public static void invalidShowRemainingLimitPrinter() {\n System.out.println(line);\n System.out.println(INVALID_FORMAT_MSG);\n System.out.println(SHOW_FORMAT_MSG);\n System.out.println(line);\n }", "public void loadMoreEnd() {\n loadMoreEnd(false);\n }", "public boolean isLineVisible(int line){\n return (getFirstVisibleLine() <= line && line <= getLastVisibleLine());\n }", "boolean hasMore();", "private boolean isTooLarge(String name) {\n Dimension d = faFile.getDimension(name);\n return (d.width > theDialog.getWidth() - 10);\n }", "public boolean getHideEmptyLines() {\n return hideEmptyLines;\n }", "@Override\n\tpublic boolean hasMore() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean onMoreTouchUp(View moreView, int pullHeight) {\n\t\tif(pullHeight>moreView.getMeasuredHeight()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void showSubLines(){\n\t\tfor (int i = 1; i < lineLists.size(); i++){\n\t\t\tLinkedList<Line> lines = lineLists.get(i);\n\t\t\tfor (Line l : lines){\n\t\t\t\tl.setVisible(true);\n\t\t\t}\n\t\t}\n\t\tshowSubLines = true;\n\t}", "@Override\n\tprotected void onCompleteLoadMore(View moreView) {\n\t\tCustomProgressBar progressBar = (CustomProgressBar) moreView.findViewById(R.id.progressBar);\n\t\tprogressBar.setVisibility(View.GONE);\n\t\tprogressBar.stopAnimating();\n\t\t\n\t\tTextView textView = (TextView) moreView\n\t\t\t\t.findViewById(R.id.textView);\n\t\ttextView.setText(\"Pull up load more.\");\n\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 expandDescription(final View v){\n if(!descriptionExpanded) {\n //Set line number to unlimited\n mDescription.setMaxLines(Integer.MAX_VALUE);\n\n //Animate expansion\n mAdditionalDetailsLayout.setVisibility(View.VISIBLE);\n\n mFAB.setImageDrawable(getResources().getDrawable(R.drawable.ic_minimize_white));\n descriptionExpanded = true;\n }else{\n //Set line limit\n mDescription.setMaxLines(getApplicationContext().getResources().getInteger(R.integer.lines));\n\n mFAB.setImageDrawable(getResources().getDrawable(R.drawable.ic_add_white));\n\n\n //Animate collapse\n mAdditionalDetailsLayout.setVisibility(View.GONE);\n\n descriptionExpanded = false;\n }\n }", "private void setupMoreActionButton() {\n moreButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n InterfaceAction.startMoreActionButtonAnimation(moreButton);\n\n boolean isCurrentUserThePostCreator = Helper.isPrismUserCurrentUser(prismPost.getPrismUser());\n AlertDialog morePrismPostAlertDialog = InterfaceAction.createMorePrismPostAlertDialog(context, prismPost, isCurrentUserThePostCreator);\n morePrismPostAlertDialog.show();\n }\n });\n }", "private void lineCheck(int linesToAdd) {\n\n\t\tTermio terminal = new Termio();\n\n\t\tif (lineCount >= maxLinesDisplayed) {\n\n\t\t\tlineCount = 0;\n\t\t\tSystem.out.print(\"\\n*** Press Enter To Continue ***\");\n\t\t\tterminal.keyboardReadChar();\n\n\t\t} else {\n\n\t\t\tlineCount += linesToAdd;\n\n\t\t} // if\n\n\t}", "private boolean more() {\n return regEx.length() > 0;\n }", "public void showLess() throws Exception {\n\t\tif(getControl(\"showLess\").queryVisible()) {\n\t\t\tgetControl(\"showLess\").click();\n\t\t}\n\t}", "public void setNoOfRelevantLines(int norl) { this.noOfRelevantLines = norl; }", "public boolean getMaximizeVisible() {\n checkWidget();\n return showMax;\n }", "@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tString content = mEditTextContent.getText().toString();\n\t\t\t\tif (StringUtil.isEmpty(content)) {\n\t\t\t\t\ttv_send.setVisibility(View.GONE);\n\t\t\t\t\tmoreBtn.setVisibility(View.VISIBLE);\n\t\t\t\t} else {\n\t\t\t\t\ttv_send.setVisibility(View.VISIBLE);\n\t\t\t\t\tmoreBtn.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}", "public boolean isOverMaxX(int line,float posOnScreen) {\n float xx = posOnScreen + getOffsetX() - mDividerMargin * 2 - mDividerWidth - measureLineNumber();\n prepareLine(line);\n return xx > (measureText(mChars,0,mText.getColumnCount(line)) + 2 * mDpUnit);\n }", "public void stopLoadMore() {\n\t\tpullLoadMore = true;\n\t\tif (mPullLoading == true) {\n\t\t\tmPullLoading = false;\n\t\t\tmFooterView.setState(RefreshLoadScrollViewFooter.STATE_NORMAL);\n\t\t}\n\t}", "public static boolean isTextEllipsized(TextView textView){\n\n Layout textViewLayout = textView.getLayout();\n\n if (textViewLayout != null) {\n\n int lines = textViewLayout.getLineCount();\n\n if (lines > 0) {\n\n if (textViewLayout.getEllipsisCount(lines-1) > 0) return true;\n }\n }\n\n return false;\n }", "private void showNoFavoriteMoviesTextView(){\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.VISIBLE);\n }", "public final boolean checkAppendOverLimit(int i) {\n boolean z = false;\n if (this.mLastVisibleIndex < 0) {\n return false;\n }\n if (!this.mReversedFlow ? findRowMax(false, null) >= i - this.mSpacing : findRowMin(true, null) <= i + this.mSpacing) {\n z = true;\n }\n return z;\n }", "public ArchivePage clickUnBlockNumberFrmMoreOptn(){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\t\tUtils.uBase.clickByImage(\"threeDots\");\n\t\t\t\t\t\tAdvanceReporting.addLogs(\"pass\", \"Click Three Dots BtnImg\");\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t\tUtils.uBase.clickByImage(\"UnblockNumber\");\n\t\t\t\t\t\tAdvanceReporting.addLogs(\"info\", \"UnBlock number clicked\");\n\t\t\t\t\t\tAdvanceReporting.addLogs(\"pass\", \"UnBlock number clicked\");\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t\tUtils.uBase.clickByImage(\"UnblockButton\");\n\t\t\t\t\t\tAdvanceReporting.addLogs(\"info\", \"UnBlock number clicked\");\n\t\t\t\t\t\tAdvanceReporting.addLogs(\"pass\", \"UnBlock number clicked\");\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tAdvanceReporting.addLogs(\"info\", \"UnBlock number not clicked\");\n\t\t\t\t\t\tAdvanceReporting.addLogs(\"fail\", \"Error Message: \" + e.getMessage());\n\t\t\t\t\t\te.printStackTrace(); Assert.fail();\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}", "@Override\n\t\tpublic boolean hasMoreElements() {\n\t\t\treturn cursor != size();\n\t\t}", "public void showRemoveFooter() {\n\t\t/**\n\t\t * 原始代码是这样,为了适配GridView,做了一点改变,以后有问题,可以变换回来\n\t\t */\n\n\t\tif (!mIsRemoveFooterdAdd && !isGridType) {\n\t\t\t// 需要隐藏“更多”时,注释下面这句代码\n\t\t\tmListView.addFooterView( mRemoveFooter );\n\t\t}\n\t\tmIsRemoveFooterdAdd = true;\n\t}", "public boolean hasMore() {\n if (currentCursor != null && !NULL.equalsIgnoreCase(currentCursor)) {\n return true;\n } else {\n return false;\n }\n }", "protected void setMaxLineCount(int maxLineCount) {\n\t\tthis.maxLineCount = maxLineCount;\n\t}", "@Override\n\tprotected void onMoreViewHeightChange(View moreView, int pullHeight) {\n\t\tif (getXListView().getLoadMoreState() != XListView.MORE_STATE_LOADING) {\n\t\t\tTextView textView = (TextView) moreView\n\t\t\t\t\t.findViewById(R.id.textView);\n\t\t\tif (pullHeight > moreView.getMeasuredHeight()) {\n\t\t\t\ttextView.setText(\"Release to loading.\");\n\t\t\t} else {\n\t\t\t\ttextView.setText(\"Pull up load more.\");\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLinearLayout downLayout = (LinearLayout)findViewById(R.id.extraInfo);\n\t\t\t\tString additionalText = additional.getText().toString();\n\t\t\t\t\n\t\t\t\tif(additionalText.equals(\"Show Additional Fields\")) {\n\t\t\t\t\tdownLayout.setVisibility(View.VISIBLE);\n\t\t\t\t} else {\n//\t\t\t\t\tadditional.setText(\"Hide Additional Fields\");\n\t\t\t\t\tdownLayout.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n public boolean scrolled(int amount) {\n return false;\n }", "@Override\n public boolean scrolled(final int amount) {\n return false;\n }", "public boolean isLineClear() {\r\n return lineActivity.haveAverage() && (lineActivity.getAverage() < 0.5);\r\n }", "public void readMore10(View view) {\n String readMore10 = \"Founder: Amanda Gicharu\" + \"\\nWebsite: http://www.techrepublicafrica.com/\";\n displayMessage10(readMore10);\n }", "private void hideTemporaryUntilFixed() {\n //\n// jButton8.setVisible(false);// Add cursors button (cursors for the graph to the right)\n// jButton9.setVisible(false);// Remove cursors button (cursors for the graph to the right)\n //\n }", "public Boolean getHasMoreItems()\n {\n return hasMoreItems;\n }", "public boolean isHasMorePages() {\n\t\treturn (this.skipEntries + this.NUM_PER_PAGE - 1) < this.totalEntries;\n\t}", "public boolean hasRemaining() {\r\n\t\treturn cursor < limit - 1;\r\n\t}", "public boolean hasMore(){\r\n return curr != null;\r\n }", "private void hideShowEmpty() {\n this.mEmpty.setVisibility(View.GONE);\n }", "@Override\r\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\r\n\t}", "private void hideElements(){\n question.setVisibility(View.GONE);\n yes_for_joke.setVisibility(View.GONE);\n no_for_joke.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n }", "void newconsume() {\n\t\tfor (;;) {\n\t\t\tif (printnewline > newinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tif (newinfo.other[printnewline] < 0)\n\t\t\t\tshowinsert();\n\t\t\telse showmove();\n\t\t}\n\t}", "public void removeLines() {\n int compLines = 0;\n int cont2 = 0;\n\n for(cont2=20; cont2>0; cont2--) {\n while(completeLines[compLines] == cont2) {\n cont2--; compLines++;\n }\n this.copyLine(cont2, cont2+compLines);\n }\n\n lines += compLines;\n score += 10*(level+1)*compLines;\n level = lines/20;\n if(level>9) level=9;\n\n for(cont2=1; cont2<compLines+1; cont2++) copyLine(0,cont2);\n for(cont2=0; cont2<5; cont2++) completeLines[cont2] = -1;\n }", "private WebElement button_FindOutMore(){\n return findElementByText(waitForElements(button_FindOutMoreLocator, allPresence), \"Find Out More\");\n }", "public int getNoOfRelevantLines() { return this.noOfRelevantLines; }", "@Override\n\tpublic boolean isUnlimited() {\n\t\treturn false;\n\t}", "private void limitRows()\n {\n paginate(currentPage, getResultsPerPage());\n }", "public boolean hasLimit() {\n return instance.hasLimit();\n }", "public boolean hasMoreTokens()\n {\n return (currentPosition >= maxPosition) ? false : true;\n }", "private void emptyViewForFilter(){\n if(adapter.getItemCount() <= 0){\n v.setVisibility(View.GONE);\n filempty.setVisibility(View.VISIBLE);\n } else {\n v.setVisibility(View.VISIBLE);\n filempty.setVisibility(View.GONE);\n }\n }", "public void readMore15(View view) {\n String readMore15 = \"Website: http://gomyway.com\";\n displayMessage15(readMore15);\n }", "public void truncate(int limit);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public boolean hasLimit() {\n return result.hasLimit();\n }", "public void hidePrimaryLines(){\n\t\tLinkedList<Line> primary = lineLists.get(0);\n\t\tfor (Line l : primary){\n\t\t\tl.setVisible(false);\n\t\t}\n\t\tshowPrimaryLines = false;\n\t}", "public void hideView(int size)\n {\n Utility.printLog(\"value is this : unassigned: \"+size);\n if (mSwipeRefreshLayout != null && mSwipeRefreshLayout.isRefreshing())\n mSwipeRefreshLayout.setRefreshing(false);\n\n if (this.size == 0)\n ll_history_empty.setVisibility(View.VISIBLE);\n else\n ll_history_empty.setVisibility(View.GONE);\n }", "private void hideButton(){\n // Si onget Client\n if(numOnglet() == 0 ){\n jBtn_ProspectToClient.setVisible(false);\n if(jTable_Clients.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n }\n }else{\n if(jTable_Prospects.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n jBtn_ProspectToClient.setVisible(false);\n }\n }\n }", "private String checkLimitText(String s, int limit) {\n\n if (s == null) {\n s = \"\";\n }\n\n if (s.length() > limit) {\n s = s.substring(0, limit);\n s = s + \"...\";\n }\n\n return s;\n }", "public void setShowLineNumbers(boolean aValue)\n {\n if (aValue == isShowLineNumbers()) return;\n _showLineNumbers = aValue;\n\n // Adjust PrefWidth\n setPrefWidth(getSuggestedPrefWidth());\n }", "public void readMore13(View view) {\n String readMore13 = \"Founder: Harouna Ba\" + \"\\nWebsite: http://greenwashafrica.com/\";\n displayMessage13(readMore13);\n }", "public ArchivePage clickBlockNumberFrmMoreOptn(){\n\t\t\ttry {\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tUtils.uBase.clickByImage(\"blockNumber\");\n\t\t\t\tAdvanceReporting.addLogs(\"info\", \"Block number clicked\");\n\t\t\t\tAdvanceReporting.addLogs(\"pass\", \"Block number clicked\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAdvanceReporting.addLogs(\"info\", \"Block number not clicked\");\n\t\t\t\tAdvanceReporting.addLogs(\"fail\", \"Error Message: \" + e.getMessage());\n\t\t\t\te.printStackTrace(); Assert.fail();\n\t\t\t}\n\t\t\treturn this;\n\t\t}", "boolean getMoreResults();", "public boolean hasMoreElements() {\r\n \t\tif(numItems == 0 || currentObject == numItems) {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "@Override\r\n public boolean hasMoreObjects() {\r\n return hasMore;\r\n }", "public void loadMore() {\n String[] moreSymbols = mListManipulator.getMoreToLoad();\n\n if (moreSymbols != null) {\n mLoadingMore = true;\n\n // Start service to load a few\n Intent serviceIntent = new Intent(getActivity(), MainService.class);\n serviceIntent.setAction(Constants.ACTION_LOAD_MORE);\n serviceIntent.putExtra(Constants.KEY_LOAD_MORE_QUERY, moreSymbols);\n getActivity().startService(serviceIntent);\n\n } else {\n mLoadingMore = false;\n }\n }" ]
[ "0.62028503", "0.60248584", "0.59905857", "0.59535384", "0.5709524", "0.56778336", "0.56602025", "0.5464981", "0.5389811", "0.53639394", "0.53407407", "0.5263808", "0.52596605", "0.52035993", "0.51553184", "0.514547", "0.5131217", "0.5127575", "0.51263094", "0.51190823", "0.5106139", "0.50908256", "0.5085832", "0.50801015", "0.507856", "0.5077757", "0.5065525", "0.50484407", "0.50330794", "0.49967948", "0.49945012", "0.49859694", "0.49761745", "0.4971049", "0.49594527", "0.49391657", "0.4931475", "0.4919084", "0.48969522", "0.48896143", "0.48834822", "0.4881849", "0.48755813", "0.4866965", "0.48537183", "0.48537183", "0.48537183", "0.48537183", "0.4853047", "0.48530307", "0.4849266", "0.48448312", "0.48399544", "0.48317868", "0.4831065", "0.4824509", "0.4816028", "0.4815761", "0.48124418", "0.48074913", "0.48040324", "0.48019662", "0.4801336", "0.48010126", "0.48004997", "0.47972083", "0.47921592", "0.47878194", "0.4787074", "0.47842994", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.4781211", "0.47769338", "0.47760195", "0.4770009", "0.4768934", "0.47678387", "0.47423434", "0.47383657", "0.4738247", "0.4737573", "0.47347063", "0.4734361", "0.4728152" ]
0.7513057
0
Changes the state of the book description. If the state is not expanded when invoked, then it will set the details visibility to visible. If the state is expanded, then it will set the details visibility to gone.
public void expandDescription(final View v){ if(!descriptionExpanded) { //Set line number to unlimited mDescription.setMaxLines(Integer.MAX_VALUE); //Animate expansion mAdditionalDetailsLayout.setVisibility(View.VISIBLE); mFAB.setImageDrawable(getResources().getDrawable(R.drawable.ic_minimize_white)); descriptionExpanded = true; }else{ //Set line limit mDescription.setMaxLines(getApplicationContext().getResources().getInteger(R.integer.lines)); mFAB.setImageDrawable(getResources().getDrawable(R.drawable.ic_add_white)); //Animate collapse mAdditionalDetailsLayout.setVisibility(View.GONE); descriptionExpanded = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDescription(State state);", "public void setStateDescription(String value) {\n setAttributeInternal(STATEDESCRIPTION, value);\n }", "public void showDescription() {\r\n\t\tshowDescription(true);\r\n\t}", "private void toggleDetails() {\n Dimension dialogSize = getSize();\n\n if (detailsVisible) {\n detailsButton.setText(\"Details >>\");\n getContentPane().remove(detailsPane);\n Dimension detailsPaneSize = detailsPane.getSize();\n dialogSize.height -= detailsPaneSize.height;\n } else {\n detailsButton.setText(\"Details <<\");\n getContentPane().add(detailsPane, BorderLayout.CENTER);\n Dimension detailsPaneSize;\n if (detailsBeenVisible) {\n detailsPaneSize = detailsPane.getSize();\n } else {\n detailsBeenVisible = true;\n detailsPaneSize = detailsPane.getPreferredSize();\n }\n dialogSize.height += detailsPaneSize.height;\n }\n\n detailsVisible = !detailsVisible;\n\n setSize(dialogSize);\n invalidate();\n validate();\n }", "@NonNull\n public Builder setStateDescription(@NonNull StringProp stateDescription) {\n mImpl.setStateDescription(stateDescription.toProto());\n mFingerprint.recordPropertyUpdate(\n 3, checkNotNull(stateDescription.getFingerprint()).aggregateValueAsInt());\n return this;\n }", "public void setDescription(String description) {\n this.description = description;\r\n // changeSupport.firePropertyChange(\"description\", oldDescription, description);\r\n }", "private void hideDescription() {\r\n\t\tdescriptionText.hide();\r\n\t\tdescriptionInputMatrix.hide();\r\n\t\tdescriptionOutputMatrix.hide();\r\n\t\tdescriptionArrow.hide();\r\n\t}", "public void editDescription(String description) {\n this.description = description;\n }", "public void doChangeItemDescription(ActionEvent actionEvent) {\n // find the item that the user is clicking\n // do setDescription()\n }", "public void setDescription(String Description) {\n this.Description = Description;\n }", "public void setDescription(String description) {\n mDescription = description;\n }", "public void setDescription(String sDescription);", "public boolean isSetStatedescription() {\n return this.statedescription != null;\n }", "@Then(\"detailed description is displaying\")\n public void detailed_description_is_displaying() {\n }", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription(String description) { this.description = description; }", "void setActiveDescription(MultiViewDescription description) {\n \n if (currentEditor == description) return;\n MultiViewDescription old = currentEditor;\n currentEditor = description;\n // fireSelectionChanged(old, description);\n }", "public void setDescription(String newDesc){\n\n //assigns the value of newDesc to the description field\n this.description = newDesc;\n }", "public void setDescription(String description){this.description=description;}", "public void setShowDetails( boolean showDetails ) {\n this.showDetails = showDetails;\n details.setVisible(showDetails);\n }", "public void setBookDesc(java.lang.String value);", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription (String description);", "public void setDescription(String newdescription) {\n description=newdescription;\n }", "public void setAccessibleDescription(String name) {\n // Not supported\n }", "public void setDescription(String description){\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "void setDescription(java.lang.String description);", "public final void setDetailDescription(java.lang.String detaildescription)\r\n\t{\r\n\t\tsetDetailDescription(getContext(), detaildescription);\r\n\t}", "public void setDescription(String _description) {\n this._description = _description;\n }", "public void setDescription(String descr);", "public void changeState(String state) {\n CardLayout cl = (CardLayout)(basePanel.getLayout());\n cl.show(basePanel, state);\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription(String description) {\n _description = description;\n }", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void hideDetails () {\n\t\tdetailDisplay.show(\"empty\");\n\t}", "public void setDescription(String description)\n {\n this.description = description;\n }", "@Override\n public void setState(BookStatus bookStatus) {\n this.state = bookStatus;\n }", "public void setDescription(String description )\n {\n this.description = description;\n }", "public void setDescription(String desc) {\n sdesc = desc;\n }", "public void setDescription(String description)\n/* */ {\n/* 67 */ this.description = description;\n/* */ }", "public abstract void setContentDescription(String description);", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setCatalogDescriptionToInactive();", "void setDescription(final String description);", "public void setDescription(String desc);", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String desc) {\n this.desc = desc;\n }", "boolean isSetDescription();", "boolean isSetDescription();", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "void setDescription(String description);", "public void setDescription(String desc) {\n description = desc;\n }", "public void setDescription(String desc)\r\n {\r\n\tthis.desc = desc;\r\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n \tthis.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }" ]
[ "0.6762457", "0.62223935", "0.61159414", "0.59794754", "0.5829119", "0.57654583", "0.5741981", "0.5716371", "0.56975347", "0.5663828", "0.56633496", "0.5655568", "0.5613647", "0.55925703", "0.5586827", "0.5586827", "0.5586827", "0.5586827", "0.5586827", "0.5586827", "0.5542293", "0.5540553", "0.5536548", "0.5520654", "0.5516856", "0.55117106", "0.5506999", "0.5506999", "0.54977477", "0.5497604", "0.54892546", "0.54807436", "0.54765534", "0.54756516", "0.5474985", "0.54691136", "0.5461639", "0.5460138", "0.54521817", "0.54521817", "0.54521817", "0.5445109", "0.5442731", "0.5442731", "0.5442731", "0.5442731", "0.5442731", "0.54355454", "0.5434002", "0.54287267", "0.54262024", "0.5424408", "0.54237616", "0.54231155", "0.54203475", "0.5418064", "0.5411542", "0.5409794", "0.5407064", "0.54058266", "0.54058266", "0.54058266", "0.54053855", "0.5403061", "0.5403061", "0.5402162", "0.5402162", "0.5402162", "0.5402162", "0.5402162", "0.5401313", "0.53947794", "0.5394392", "0.5389478", "0.5389478", "0.5389478", "0.5389478", "0.5389478", "0.5385063", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795", "0.5378795" ]
0.0
-1
This method is called when the checkout/return button is pressed. If the book is not yet checked out, then the checkout dialog appears. If the book is out, then the book will be returned
public void checkoutReturnPressed(View view){ try { if (currentBook.copies != null) { if (!checkedOut) { DialogFragment bookFragment = SelectBookFragment.newInstance(BookDetailsActivity.this, currentBook.copies, currentBook.availableCopies); bookFragment.show(getFragmentManager(), "Choose Book"); } else if (mCopy != null) { Log.i("LoginActivity", "RETURNED"); returnBook(mCopy); } } else { Toast.makeText(this, "Book is still loading.", Toast.LENGTH_SHORT).show(); } }catch(Exception E){ E.printStackTrace(); Toast.makeText(this, "Book is still loading.", Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void checkoutBook(){\n\t\tSystem.out.println(\"===Book Checkout===\");\n\t\tScanner string_input = new Scanner(System.in); //gets String values entered by the user\n\t\tScanner integer_input = new Scanner(System.in); //gets integer values entered by the user\n\t\tboolean exit = false; //indicates whether method should be exited\n\t\t\n\t\tSystem.out.println(\"Enter Id of book to be checked out: \");\n\t\tint bookId = getIntegerInput();//ensures user input is an integer value\n\t\t//if bookId entered does not exist then continually ask user to enter bookId until a bookId that exists is entered\n\t\twhile(!ALL_BOOKS.containsKey(bookId)){\n\t\t\tSystem.out.println(\"Book Id entered does not exist! Enter BookId: \");\n\t\t\tbookId = integer_input.nextInt();\n\t\t}\n\t\t\n\t\t/*Print statements to notify book has been found, the book's details, and its availabilty*/\n\t\tSystem.out.println(\"Book Found!\");\n\t\tSystem.out.println(ALL_BOOKS.get(bookId).getBookTitle() + \" | Written By: \" + ALL_BOOKS.get(bookId).getAuthor().toString() + \" | Published By: \" + ALL_BOOKS.get(bookId).getPublisher());\n\t\tString availabilty = !ALL_BOOKS.get(bookId).getBorrowed() ? \"Available\" : \"Currently Borrowed\"; //stores whether book is currently borrowed or not.\n\t\tSystem.out.println(availabilty);\n\t\t\n\t\tif(!ALL_BOOKS.get(bookId).getBorrowed()){//if book is available to be borrowed then change it's status and set the date it should be returned (Next Month From Date of Borrowing)\n\t\t\tSystem.out.println(\"Enter Id of student borrowing the book: \");\n\t\t\tint studentId = getIntegerInput();//ensures user input is an integer value\n\t\t\tif(!studentExists(studentId)){ //if student Id entered does not exists\n\t\t\t\tSystem.out.println(\"Student Id entered does not exist. Do you want to add a new student? (Y --> Yes/ Any other button --> No): \");\n\t\t\t\tString user_option = string_input.next();\n\t\t\t\tif(user_option.equalsIgnoreCase(\"Y\"))\n\t\t\t\t\tstudentId = addNewStudent(); //adds a new student to the ALL_STUDENTS ArrayList and returns this new student's Id \n\t\t\t\telse\n\t\t\t\t\texit = true; //exit to main menu\n\t\t\t}\n\t\t\t\n\t\t\t/*Students cannot borrow more than one book at a time. Thus if the student's bookIdBorrowed is greater than 0 then\n\t\t\t * it implies the student currently has a book borrowed.*/\n\t\t\telse if(ALL_STUDENTS.get(studentId).getBookIdBorrowed() > 0){ \n\t\t\t\tStudentDetails student = ALL_STUDENTS.get(studentId); //stores student trying to checkout the book\n\t\t\t\tBookDetails bookBorrowed = ALL_BOOKS.get(student.getBookIdBorrowed()); //stores book currently borrowed by the student\n\t\t\t\tSystem.out.println(\"Sorry! Only one book can be borrowed at a time.\");\n\t\t\t\tSystem.out.println(student.getFullName() + \" currently has borrowed \" + bookBorrowed.getBookTitle());\n\t\t\t\tSystem.out.println(\"Please come back later when \" + bookBorrowed.getBookTitle() + \" is returned\");\n\t\t\t\texit = true; //exit to main menu\n\t\t\t}\n\t\t\t\n\t\t\t/*If the method has not been exited at this point then it implies the student can be borrow the book.*/\n\t\t\tif(!exit){\n\t\t\t\tBookDetails book = ALL_BOOKS.get(bookId);\n\t\t\t\tCalendar return_date = new GregorianCalendar(); //get the current date\n\t\t\t\treturn_date.add(Calendar.MONTH, 1); //set the return date to the next month from the current date\n\t\t\t\tbook.setBorrowed(true); //indicates book has been borrowed\n\t\t\t\tbook.setDateToReturn(return_date); //set book's return date\n\t\t\t\n\t\t\t\tALL_STUDENTS.get(studentId).setBookIdBorrowed(book.getBookId()); //indicate that the student has borrowed this book\n\t\t\t\tbook.setStudentBorrowed(studentId); //indicates book has been borrowed by the student with the given ID\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"You Are All Set!\");\n\t\t\t\tSystem.out.println(book.getBookId() + \" | \" + book.getBookTitle() + \" is due \" + SDF.format(return_date.getTime()));\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry check back later to borrow this book\");\t\n\t}", "private void butCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butCheckActionPerformed\n\n Borrower bor = createBorrower();\n String date = tfDate.getText();\n\n if (driver.dateFormatValid(date)) {\n //valid date format, perform check out/in\n if (radBorrow.isSelected()) {\n //check out\n\n Book book = createBook();//create book\n\n if (!book.isOnLoan()) {\n //book is not on loan, can be loaned out\n\n //perform loan, inform user of success\n if (bor.borrow(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" loaned successfully to \" + bor.getName());\n\n } else {\n driver.errorMessageNormal(\"Book could not be loaned\");\n }\n\n } else {\n //is on loan\n driver.errorMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is already on loan.\");\n\n }\n\n } else if (radReturn.isSelected()) {\n //check in / returning\n\n Book book = createBook();\n\n if (book.isOnLoan()) {\n //book is on loan, and can be returned\n\n if (bor.returnBook(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" has been returned.\");\n\n } else {\n driver.infoMessageNormal(\"The book could not be returned.\");\n }\n\n } else {\n //not on loan\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is not on loan.\");\n }\n\n } else {\n driver.errorMessageNormal(\"Please select whether the book is being checked in or being returned.\");\n }\n\n } else {\n //invalid format\n driver.errorMessageNormal(\"Please ensure the date is in the format DD/MM/YYY\");\n }\n\n\n }", "public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}", "public boolean checkOut(Book book) {\n int index = find(book);\n if (index == NOT_FOUND){ return false; }\n if (books[index].isCheckedOut()){ return false; }\n books[index].setCheckedOut(true);\n return true;\n }", "public void Checkout_button() {\n\t\tthis.endUser.checkOut();\n\t\tthis.defaultSetup();\n\t}", "public boolean returns(Book book) {\n int index = find(book);\n if (index == NOT_FOUND){ return false; }\n if (!books[index].isCheckedOut()){ return false; }\n books[index].setCheckedOut(false);\n return true;\n }", "@Override\n public void onBackPressed() {\n if (!bookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }\n };\n\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@Override\n public void onBackPressed() {\n if (!bookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, exit the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@FXML\n public void returnOrBorrowBook() {\n LibrarySystem.setScene(\n new SearchBook(reader, null, readerlist, booklist));\n }", "public boolean checkoutBooking() {\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tboolean bookUpdateSuccess = false;\r\n\r\n\t\t/**\r\n\t\t*\tSet the endTime as now\r\n\t\t*/\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(date.getTime());\r\n\r\n\t\t/**\r\n\t\t*\tCalculate the cost base on the time elapsed between the start time and end time\r\n\t\t*\tdurationMinutes = (difference b/w end and start time) / 1000 to convert millis to seconds / 60 to convert seconds to minutes\r\n\t\t*/\r\n\t\tlong start = startTime.getTime();\r\n\t\tlong end = endTime.getTime();\r\n\t\tlong durationMinutes = (end - start)/60000;\r\n\r\n\t\t/**\r\n\t\t*\tThe cost is set as Rs. 1.27 per minuteand hence will be calulated using durationMinutes\r\n\t\t* The cost will be calculated according to absolute minutes and no decimals will be considered there\r\n\t\t*/\r\n\t\tcost = durationMinutes * 1.27;\r\n\r\n\t\t/**\r\n\t\t*\tShow the cost and confirm to checkout.\r\n\t\t*/\r\n\t\tSystem.out.print(\"\\n\\tTotal cost calculated: \" + cost + \"\\n\\n\\t1. Confirm Checkout\\n\\t2. Cancel\\n\\t\\t>> \");\r\n\t\tint opt = scan.nextInt();\r\n\r\n\t\tswitch (opt) {\r\n\t\t\tcase 1: {\t//confirm checkout\r\n\t\t\t\t//do nothing and move ahead towards the checkout procedure\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 2: {\t//Cancel\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tdefault: {\r\n\t\t\t\tSystem.out.println(\"Invalid Option\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and updating data (executeUpdateParklot())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection checkoutBookingConn = new DbConnection();\r\n\r\n\r\n\t\t\t/**\r\n\t\t\t*\tupdate the data in table\r\n\t\t\t*/\r\n\t\t\tbookUpdateSuccess = checkoutBookingConn.executeUpdateBooking(endTime, cost, bookingNo);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No booking with the given booking number found.\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn bookUpdateSuccess;\r\n\t}", "private static void returnBook() {\n\t\tnew ReturnBookUI(new returnBookControl()).run();\t// method name change ReturnBookControl() to returnBookControl(),RuN to run()\r\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJournalTableModel.performEpublicationCheckout(journal, studentInfo, facultyInfo);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The E-Copy of the Journal-paper have been checked-out\");\r\n\t\t\t\tJournalDetailModule.this.setVisible(false);\r\n\t\t\t\tJournalDetailModule.this.dispose();\r\n\t\t\t\treturn;\r\n\t\t\t}", "public void returnBook()\n\t{\n\t\tavailableBooks++;\n\t}", "public void CheckOut(){\n if (isIn == true){\n isIn = false;\n// System.out.println(name + \" has been checked out of the library.\");\n// }else\n// System.out.println(name + \" is already checked out.\");\n }\n }", "@Override\n public void onBackPressed() {\n if (!mBookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }", "private void returnBookButtonMouseClicked(java.awt.event.MouseEvent evt) {\n if (checkList() == true) {\n if (checkReturn().equalsIgnoreCase(\"null\")) {\n try {\n String uQuery = \"update student set day_of_return='\"+ getReturnDateSTR() +\"', fee='\" + getFee() +\"' where book_id=\" + bookIDTextField.getText() + \" and rb_id=\" + studentIDField.getText();\n Connection conn = DBConnector.connectDB();\n PreparedStatement pst = conn.prepareStatement(uQuery);\n pst.execute();\n pst.close();\n System.out.println(\"Return Completed!\");\n\n Connection myConn = DBConnector.connectDB();\n String u2Query = \"update book set availability='Yes' where book_id=\" + bookIDTextField.getText() ;\n PreparedStatement mypststmt = myConn.prepareStatement(u2Query);\n mypststmt.execute();\n System.out.println(\"Update Completed!\");\n\n jLabel_overDue.setText(\"Over Due by \" + Long.toString(getDiffDays()) + \" day(s)\");\n jLabel_totalFee.setText(\"Total Fee: $\" + String.valueOf(getFee()));\n\n JOptionPane.showMessageDialog(null, \"Book Returned Successfully\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Book Already Returned\");\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Book ID or Student ID is Incorrect\");\n }\n }", "private void onOK() {\n String borrowDateString = Borrowed.getSelectID();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n Date borrowDate = sdf.parse(borrowDateString);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(borrowDate);\n calendar.add(Calendar.MONTH, 3);\n long shouldReturn = calendar.getTimeInMillis();\n long returnDate = System.currentTimeMillis();\n long betweenDays = (returnDate - shouldReturn) / (1000 * 60 * 60 * 24);\n if (betweenDays > 0) {\n JOptionPane.showMessageDialog(this, \"请缴费\" + betweenDays * 0.2f + \"元\", \"提示\", JOptionPane.WARNING_MESSAGE);\n BorrowedDao borrowedDao = new BorrowedDao();\n try {\n borrowedDao.returnBook(Reader.getSelectID(), Book.getSelectID(), Borrowed.getSelectID(), true);\n JOptionPane.showMessageDialog(this, \"还书成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n dispose();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"还书失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n } catch (SQLException e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"还书失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n }\n } else {\n BorrowedDao borrowedDao = new BorrowedDao();\n try {\n borrowedDao.returnBook(Reader.getSelectID(), Book.getSelectID(), Borrowed.getSelectID(), true);\n JOptionPane.showMessageDialog(this, \"还书成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n dispose();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"还书失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n } catch (SQLException e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"还书失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n }\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "private void saveBook() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String productName = etTitle.getText().toString().trim();\n String author = etAuthor.getText().toString().trim();\n String price = etPrice.getText().toString().trim();\n String quantity = etEditQuantity.getText().toString().trim();\n String supplier = etSupplier.getText().toString().trim();\n String supplierPhoneNumber = etPhoneNumber.getText().toString().trim();\n\n // If this is a new book and all of the fields are blank.\n if (currentBookUri == null &&\n TextUtils.isEmpty(productName) && TextUtils.isEmpty(author) &&\n TextUtils.isEmpty(price) && quantity.equals(getString(R.string.zero)) &&\n TextUtils.isEmpty(supplier) && TextUtils.isEmpty(supplierPhoneNumber)) {\n // Exit the activity without saving a new book.\n finish();\n return;\n }\n\n // Make sure the book title is entered.\n if (TextUtils.isEmpty(productName)) {\n Toast.makeText(this, R.string.enter_title, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the author is entered.\n if (TextUtils.isEmpty(author)) {\n Toast.makeText(this, R.string.enter_author, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the price is entered.\n if (TextUtils.isEmpty(price)) {\n Toast.makeText(this, R.string.enter_price, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the quantity is entered if it is a new book.\n // Can be zero when editing book, in case the book is out of stock and user wants to change\n // other information, but hasn't received any new inventory yet.\n if (currentBookUri == null && (quantity.equals(getString(R.string.zero)) ||\n quantity.equals(\"\"))) {\n Toast.makeText(this, R.string.enter_quantity, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier is entered.\n if (TextUtils.isEmpty(supplier)) {\n Toast.makeText(this, R.string.enter_supplier, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier's phone number is entered.\n if (TextUtils.isEmpty(supplierPhoneNumber)) {\n Toast.makeText(this, R.string.enter_suppliers_phone_number,\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Convert the price to a double.\n double bookPrice = Double.parseDouble(price);\n\n // Convert the quantity to an int, if there is a quantity entered, if not set it to zero.\n int bookQuantity = 0;\n if (!quantity.equals(\"\")) {\n bookQuantity = Integer.parseInt(quantity);\n }\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n values.put(BookEntry.COLUMN_BOOK_AUTHOR, author);\n values.put(BookEntry.COLUMN_BOOK_PRICE, bookPrice);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, bookQuantity);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER, supplier);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhoneNumber);\n\n // Check if this is a new or existing book.\n if (currentBookUri == null) {\n // Insert a new book into the provider, returning the content URI for the new book.\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the row ID is null, then there was an error with insertion.\n Toast.makeText(this, R.string.save_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful, display a toast.\n Toast.makeText(this, R.string.save_successful, Toast.LENGTH_SHORT).show();\n }\n } else {\n // Check to see if any updates were made if not, no need to update the database.\n if (!bookHasChanged) {\n // Exit the activity without updating the book.\n finish();\n } else {\n // Update the book.\n int rowsUpdated = getContentResolver().update(currentBookUri, values, null,\n null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsUpdated == 0) {\n // If no rows were updated, then there was an error with the update.\n Toast.makeText(this, R.string.update_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful, display a toast.\n Toast.makeText(this, R.string.update_successful,\n Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n // Exit the activity, called here so the user can enter all of the required fields.\n finish();\n }", "public void checkoutBook(Library library, Book book) {\n library.removeBook(book);\n// Add the book to the borrowers booklist\n books.add(book);\n }", "private static void returnBook(){\n\t\tSystem.out.println(\"===Book Return===\");\n\t\tScanner integer_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Id of book being returned: \");\n\t\tint bookId = getIntegerInput();//ensures user input is an integer value\n\t\t//if bookId entered does not exist then continually ask user to enter bookId until a bookId that exists is entered\n\t\t\t\twhile(!ALL_BOOKS.containsKey(bookId)){\n\t\t\t\t\tSystem.out.println(\"Book Id entered does not exist! Enter BookId: \");\n\t\t\t\t\tbookId = integer_input.nextInt();\n\t\t\t\t}\n\t\t\n\t\t/*Print statements to notify book has been found, the book's details, and its availabilty*/\n\t\tSystem.out.println(\"Book Found!\");\n\t\tSystem.out.println(ALL_BOOKS.get(bookId).getBookTitle() + \" | Written By: \" + ALL_BOOKS.get(bookId).getAuthor().toString() + \"| Published By: \" + ALL_BOOKS.get(bookId).getPublisher());\n\t\tString availabilty = !ALL_BOOKS.get(bookId).getBorrowed() ? \"Available\" : \"Currently Borrowed\"; //stores whether book is currently borrowed or not.\n\t\tSystem.out.println(availabilty);\n\t\t\n\t\t\n\t\t\n\t\tif(ALL_BOOKS.get(bookId).getBorrowed()){//if book was borrowed then validate student doing the book return, change the book's status, and calculate how much student should be fined \t\n\t\t\tBookDetails book = ALL_BOOKS.get(bookId);\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Enter Id of student returning the book: \");\n\t\t\tint studentId = getIntegerInput();//ensures user input is an integer value\n\t\t\t\n\t\t\t/*Verify student Id entered matches the Id of the student who borrowed the book*/\n\t\t\tif(studentId == book.getStudentBorrowed()){\n\t\t\t\tFineResult fine = calculateFine(book.getDateToReturn()); //calculate how many days overdue the book was returned and how much student should be fined.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//If book was returned on time then this method will return 0 for both the number of days overdue and the student's fine.\n\t\t\t\tbook.setBorrowed(false); //indicates book has been returned and is now available to be borrowed by someone else\n\t\t\t\tbook.resetDateToReturn();; //reset book's return date\n\t\t\t\tbook.setStudentBorrowed(0); //reset to default value, indicating no student is current borrowing this book\n\t\t\t\t\n\t\t\t\t/*Display Statements to user indicating book was successfully returned, and how much student was fined*/\n\t\t\t\tSystem.out.println(\"You Are All Set!\");\n\t\t\t\tSystem.out.println(\"Book Id: \" + book.getBookId() + \" | \" + book.getBookTitle() + \" has been returned\");\n\t\t\t\tSystem.out.println(ALL_STUDENTS.get(studentId).getFullName() + \" returned the book \" + fine.days_overdue + \" days overdue\" + \" | Fine Amount Charged: \" + fine.days_overdue + \" * \" + FINE_RATE + \" = GHc\" + fine.fine);\n\t\t\t\t\n\t\t\t\tALL_STUDENTS.get(studentId).setBookIdBorrowed(0); //reset to default value, indicating no book is currently borrowed by this student\n\t\t\t\tALL_STUDENTS.get(studentId).addFine(fine.fine); //add the respective fine to this students fine total. If student accrued no fine on this return, fine value added will be 0.\n\t\t\t\tSystem.out.println(\"Total Fine on account: GHc\" + ALL_STUDENTS.get(studentId).getTotalFine());\n\t\t\t\t/*If Student's total fine is greater than 0 then add student to the FINED_STUDENTS Hashtable*/\n\t\t\t\taddFinedStudentsToTable(ALL_STUDENTS.get(studentId));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"ERROR Verifying Student Id: Only Student who borrowed the book can return this book\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"ERROR: Can't return book that was not borrowed!\");\n\t}", "public void checkout() {\n\t}", "private void CheckoutActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private boolean checkout() {\n if (OrderMenuUI.incompleteOrders == null || OrderMenuUI.incompleteOrders.size() == 0) {\n System.out.println(\"No orders ready for checkout. Cancelling Operation\");\n return false;\n }\n HashMap<Integer, Order> tOrders = new HashMap<>();\n OrderMenuUI.incompleteOrders.forEach((s) -> {\n Table c = s.getTable();\n if (c == null) return;\n tOrders.put(c.getTableNum(), s);\n });\n tOrders.put(-1, null);\n OrderMenuUI.printOrderList(OrderMenuUI.incompleteOrders, \"Ready for Checkout\", true);\n int tableNo = ScannerHelper.getIntegerInput(\"Select Table to checkout (-1 to cancel): \", new ArrayList<>(tOrders.keySet()), \"Invalid Table Number. Please select a valid table number or enter -1 to cancel\");\n if (tableNo == -1) {\n System.out.println(\"Checkout Operation Cancelled\");\n return false;\n }\n Order o = tOrders.get(tableNo);\n double total = printOrderDetails(o);\n System.out.println();\n System.out.println(\"Payment Mode\");\n System.out.println(\"1) Cash\");\n System.out.println(\"2) NETS\");\n System.out.println(\"3) Debit/Credit Card\");\n System.out.println(\"4) EZ-Link\");\n System.out.println(\"0) Cancel\");\n int choice = ScannerHelper.getIntegerInput(\"Select Payment Mode (0 to cancel): \", -1, 5);\n double paid;\n Invoice.PaymentType paymentType;\n switch (choice) {\n case 1:\n paid = requestCashPayment(total);\n paymentType = Invoice.PaymentType.PAYMENT_CASH;\n break;\n case 2:\n paymentType = Invoice.PaymentType.PAYMENT_NETS;\n paid = total; // All card payments are presumed paid fully\n break;\n case 3:\n paymentType = Invoice.PaymentType.PAYMENT_CARD;\n paid = total; // All card payments are presumed paid fully\n break;\n case 4:\n paymentType = Invoice.PaymentType.PAYMENT_EZLINK;\n paid = total; // All card payments are presumed paid fully\n break;\n case 0:\n System.out.println(\"Operation Cancelled\");\n return false;\n default:\n throw new MenuChoiceInvalidException(\"Checkout Payment\");\n }\n System.out.println(\"Payment Complete! Payment Mode: \" + paymentType.toString());\n if (paymentType == Invoice.PaymentType.PAYMENT_CASH) {\n System.out.println(\"Change: $\" + String.format(\"%.2f\", (paid - total)));\n }\n\n System.out.println(\"Generating Receipt...\");\n o.markPaid();\n OrderMenuUI.incompleteOrders.remove(o);\n ArrayList<String> receipt = generateReceipt(o, total, paid, paymentType);\n System.out.println();\n receipt.forEach(System.out::println);\n String receiptName = \"-\";\n if (writeReceipt(receipt, o.getOrderID())) {\n receiptName = o.getOrderID() + \".txt\";\n }\n Invoice i = new Invoice(o, receiptName, paymentType, total, paid);\n MainApp.invoices.add(i);\n System.out.println(\"\\n\");\n System.out.println(\"Returning to Main Menu...\");\n return true;\n }", "public void checkOut(Item chooseItem) {\n\t\tif (chooseItem instanceof Book && chooseItem.inLibrary) {\n\t\t\tchooseItem.setInLibrary(false);\n\t\t} else {\n\t\t\tSystem.out.println(\"This book has already been checked out\");\n\t\t}\n\t}", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "public void handleNewItemConfirmAction(ActionEvent event) {\n try{\n String title = newItemTitle.getText();\n String author = newItemAuthor.getText();\n GregorianCalendar publishDate = parseDate(newItemPublishDate.getText());\n String description = newItemDescription.getText();\n if (bookType.isSelected()){\n String ISBN = newBookISBN.getText();\n String genre = newBookGenre.getText();\n if (title.length()>0 && author.length()>0 && description.length()>0 && ISBN.length()>0 && genre.length()>0){\n updateMgr.addNewBook(title, author, publishDate, description, ISBN, genre);\n this.displaySuccess(\"New Item Added\", \"New item \" + title + \" has been successfully added\");\n this.clearNewItemFields();\n }\n else{ \n displayWarning(\"Item Information incomplete\", \"Please fill in the necessary fields\");\n }\n }\n }\n catch(ArrayIndexOutOfBoundsException | NumberFormatException e){\n displayWarning(\"Sorry\",\"Date format is wrong\\n\" + e.getMessage());\n }\n catch(Exception e){\n displayWarning(\"Sorry\",\"One of the fields is wrong:\\n\" + e.getMessage());\n }\n \n }", "private void checkout() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter your Name :\");\n\t\t\tscan.nextLine();\n\t\t\tCartController.getInstance().generateBill(scan.nextLine());\n\t\t} else {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"\\n--------------No Product Available in Cart for Checkout-----------------\\n\");\n\t\t}\n\t}", "public void checkOutBook(String isbn) {\n\n\t\tif (bookExists(isbn)) {\n\t\t\tfor (Book theBook : bookList) {\n\t\t\t\tString bookCode = theBook.getIsbn();\n\t\t\t\tif (bookCode.equals(isbn)) {\n\t\t\t\t\tif (bookType(bookCode) != 3) {\n\t\t\t\t\t\tif (theBook.getAvailable() >= 1) {\n\t\t\t\t\t\t\ttheBook.setAvailable(theBook.getAvailable() - 1);\n\t\t\t\t\t\t\tSystem.out.println(\"Book checked out successfully. Enjoy your reading!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\"Sorry, there are no more copies of this book available to check out. Please try another book.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Sorry, you can't check out periodicals.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"That ISBN does not exist in our system. Please enter a valid ISBN.\");\n\t\t}\n\n\t}", "public void checkout(Document doc){\n if (this.documents.contains(doc)){\n System.out.println(\"user \" + this.name + \" already have this document\");\n return;\n }\n if (doc.copiesNumber() > 0) {\n //System.out.println(\"patron \" + this.name + \" checked \" + doc.getTitle());\n if (doc.getKeys().contains(\"reference\")){\n System.out.println(\"Impossible to checkout. The document \" + doc.getTitle() + \" is reference book\");\n return;\n }\n documents.add(doc);\n doc.setCopies(doc.copiesNumber() - 1);\n if (!doc.getClass().toString().equals(\"class Documents.Book\")){\n doc.daysRemained = 14;\n }\n else if (this.type.equals(\"faculty\")){\n doc.daysRemained = 28;\n } else{\n Book b = (Book) doc;\n if (b.isBestSeller()){\n doc.daysRemained = 14;\n }\n else {\n doc.daysRemained = 21;\n }\n }\n System.out.println(\"The book \\\"\" + doc.getTitle() + \"\\\" are checked out by \" + name);\n }\n\n else{\n System.out.println(\"No available documents for \" + name);\n }\n\n //TODO: rewrite list of documents\n }", "private void shopExitButtonClicked() {\n finish();\n }", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "public void actionPerformed(ActionEvent e){\n boolean sentinel = false;\n try{\n if(listOfEBooks.getSelectedItem() == null) {\n new errorWindow(\"No E-Book was selected\");\n return;\n }\n\n if(nameField.getText().equals(\"\")) {\n new errorWindow(\"Enter a name for the E-Book!\");\n sentinel = true;\n }\n if(classForField.getText().equals(\"\")){\n new errorWindow(\"Enter the name of the class for the E-Book\");\n sentinel = true;\n }\n if(redemptionCodeField.getText().equals(\"\")){\n new errorWindow(\"Enter the redemption code of the E-Book\");\n sentinel = true;\n }\n\n if(sentinel == true){\n return;\n }\n else {\n //Updates the E-Book when it is set to have no owner.\n if(redemptionStatusComboBox.getSelectedItem().equals(\"false\")){\n EBook temp = (EBook)listOfEBooks.getSelectedItem();\n books.remove(temp);\n redemptionCodes.remove(temp.getRedemptionCode()+\",\");\n temp.setBookName(nameField.getText());\n temp.setClassFor(classForField.getText());\n temp.setRedemptionCode(redemptionCodeField.getText());\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n books.put(temp);\n redemptionCodes.put(redemptionCodeField.getText()+\",\");\n DefaultTableModel table = (DefaultTableModel)database.getModel();\n table.setValueAt(nameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 0);\n table.setValueAt(classForField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 1);\n table.setValueAt(redemptionCodeField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 2);\n table.setValueAt(redemptionStatusComboBox.getSelectedItem(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 3);\n dispose();\n }\n else {\n //Checks to see if the inputed changes are appropiate.\n EBook temp = (EBook)listOfEBooks.getSelectedItem();\n books.remove(temp);\n if(studentNameField.getText().equals(\"\")){\n new errorWindow(\"Insert a name\");\n sentinel = true;\n }\n if(gradeLevelField.getText().equals(\"\")){\n new errorWindow(\"Insert a grade level\");\n sentinel = true;\n }\n \n try{\n int gradeLevel = Integer.parseInt(gradeLevelField.getText().trim());\n if(Integer.parseInt(gradeLevelField.getText().trim()) < 1 || Integer.parseInt(gradeLevelField.getText().trim()) > 12){\n new errorWindow(\"Grade Level should be between 1 and 12th\");\n sentinel = true;\n }\n }catch(NumberFormatException nfe){\n new errorWindow(\"Grade Level must be a number\");\n }\n\n \n if(sentinel == true){\n return;\n }\n //Updates the E-Book for an E-Book that has no owner.\n if(temp.getRedemptionStatus() == false){\n redemptionCodes.remove(temp.getRedemptionCode()+\",\");\n unredeemedEBooks.remove(temp);\n temp.setBookName(nameField.getText());\n temp.setClassFor(classForField.getText());\n temp.setRedemptionCode(redemptionCodeField.getText());\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n temp.setOwner(new Student(studentNameField.getText(), Integer.parseInt(gradeLevelField.getText())));\n books.put(temp);\n redemptionCodes.put(redemptionCodeField.getText()+\",\");\n DefaultTableModel table = (DefaultTableModel)database.getModel();\n table.setValueAt(nameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 0);\n table.setValueAt(classForField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 1);\n table.setValueAt(redemptionCodeField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 2);\n table.setValueAt(redemptionStatusComboBox.getSelectedItem(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 3);\n table.setValueAt(studentNameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 4);\n table.setValueAt(gradeLevelField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 5);\n dispose();\n }\n //Updates the E-Book if the E-Book already has an owner.\n else {\n redemptionCodes.remove(temp.getRedemptionCode()+\",\");\n temp.setBookName(nameField.getText());\n temp.setClassFor(classForField.getText());\n temp.setRedemptionCode(redemptionCodeField.getText());\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n temp.setRedemptionStatus(Boolean.parseBoolean(redemptionStatusComboBox.getSelectedItem().toString()));\n temp.setOwner(new Student(studentNameField.getText(), Integer.parseInt(gradeLevelField.getText())));\n books.put(temp);\n redemptionCodes.put(redemptionCodeField.getText()+\",\");\n DefaultTableModel table = (DefaultTableModel)database.getModel();\n table.setValueAt(nameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 0);\n table.setValueAt(classForField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 1);\n table.setValueAt(redemptionCodeField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 2);\n table.setValueAt(redemptionStatusComboBox.getSelectedItem(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 3);\n table.setValueAt(studentNameField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 4);\n table.setValueAt(gradeLevelField.getText(), inputedEBook.getRowLocation() - numberOfRowsRemoved, 5);\n dispose();\n }\n }\n }\n }catch(IOException ex){\n ex.printStackTrace();\n }\n }", "void returnBook(int bookId) {\n\t\t\n\t\t// check if the book id is not valid \n\t\tif (!this.isBookIdValid(bookId)){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// checks if that book was never taken out\n\t\tif (this.isBookAvailable(bookId))\n\t\t{\n\t\t\treturn; \n\t\t}\n\t\t\t\t\n\t\t// sets the counter on that patron as one less \n\t\tthis.patronBookCount[this.bookShelf[bookId].getCurrentBorrowerId()]--;\n\t\t\n\t\t// sets the current borrower to none\n\t\tthis.bookShelf[bookId].returnBook();\n\t}", "public boolean issueBook()\n\t{\n\t\tif(availableBooks==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tavailableBooks--;;\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n protected int generateMenuScreen() {\n printHeader(\"Checkout\");\n System.out.println(\"1) Checkout\");\n System.out.println(\"2) Reprint Invoice\");\n System.out.println(\"3) Back to main menu\");\n System.out.println(\"0) Exit Application\");\n printBreaks();\n\n int choice = doMenuChoice(34, 0);\n switch (choice) {\n case 1:\n if (checkout()) {\n System.out.println();\n return -1; // If completed, go back to main menu\n }\n System.out.println();\n break;\n case 2:\n reprint();\n break;\n case 3:\n return -1;\n case 0:\n return 1;\n\n default:\n throw new MenuChoiceInvalidException(\"Checkout\");\n }\n return 0;\n }", "private void checkout() {\n\t\tif (bag.getSize() == 0) {\n\t\t\tSystem.out.println(\"Unable to check out, the bag is empty!\");\n\t\t} else {\n\t\t\tcheckoutNotEmptyBag();\n\t\t}\n\t}", "public void checkOut() {\n\t}", "@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getSource()==autopay){\n model.getCustomer().getOrder().orderStatus=OrderStatus.paid;\n dispose();\n }\n\n if(e.getSource()==Paywithanothercard){\n if(model.getCustomer().getOrder().orderStatus.name().equals(\"unpaid\")){\n //String orNUm=model.getCustomer().or.orderNumber;\n new Payment(model.getCustomer().getOrder(),model.getCustomer().getOrder().orderType);\n // System.out.println(model.getCustomer().or.orderNumber+\" \"+model.getCustomer().or.orderStatus);\n }else{\n JOptionPane.showMessageDialog(this,\n \"Your order has paied\", \"Error Message\",\n JOptionPane.ERROR_MESSAGE);\n }\n dispose();\n }\n\n\n if(e.getSource()==cancel){\n dispose();\n }\n\n }", "public void checkOut(View view) {\n\n //get the grocery that was pressed\n LayoutInflater li = LayoutInflater.from(mContext);\n\n View promptsView = li.inflate(R.layout.grocery_checkout, null);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mContext);\n\n alertDialogBuilder.setView(promptsView);\n\n final EditText enterAmount = (EditText) promptsView.findViewById(R.id.enter_amount);\n\n alertDialogBuilder\n .setCancelable(false)\n .setPositiveButton(\"Confirm\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (!grocToPurchase.isEmpty()) {\n double totalAmount = Double.parseDouble(enterAmount.getText().toString());\n\n UserList uList = myGroup.getUserList();\n ArrayList arrL = uList.getUserList();\n int userCount = arrL.size();\n\n double amountPerPerson = (totalAmount / userCount);\n\n BillList bl = myGroup.getBillList();\n ArrayList bArr = bl.getBillList();\n\n //bill all users in group evenly\n for (int i = 0; i < userCount; i++) {\n User u = (User) arrL.get(i);\n //TODO add the current user as the userToBill\n Bill newBill = new Bill(\"grocery check out\", amountPerPerson, u.getfName(), currUser.getfName(), myGroup.getGroupId());\n HTTP_Connector.addBill dbAddBill = httpcon.new addBill();\n dbAddBill.execute(newBill);\n }\n\n //set is purchased to true for all things just purchased\n for (int j = 0; j < grocToPurchase.size(); j++) {\n Grocery g = grocToPurchase.get(j);\n\n //change object locally and in database\n g.setIsPurchased(true);\n HTTP_Connector.editGrocery dbEditGroc = httpcon.new editGrocery();\n dbEditGroc.execute(g);\n\n //cant edit two things at once, so do it again\n g.setPurchaseUser(currUser.getfName());\n HTTP_Connector.editGrocery dbEditGroc2 = httpcon.new editGrocery();\n dbEditGroc2.execute(g);\n }\n\n ListView lv = (ListView) findViewById(R.id.list_grocery);\n GroceryRowAdapter adapter = new GroceryRowAdapter(mContext, currentGroc);\n lv.setAdapter(adapter);\n\n String billTest = bArr.toString();\n\n\n //load a new current view to reflect changes\n currentAdapter(lv);\n } else {\n Toast.makeText(GroceryActivity.this, \"You have not purchased anything\", Toast.LENGTH_SHORT).show();\n }\n }\n })\n .setNegativeButton(\"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n // create alert dialog\n alertDialog = alertDialogBuilder.create();\n\n // show it\n alertDialog.show();\n }", "public ReturnBookControl() {\r\n\t\tthis.library = library.getInstance(); //Variable name should start with lowercase and be in camelBack and Changed method name to verb starting with lowercase and in camelBack\r\n\t\tstate = ControlState.INITIALISED; //Variable name should start with lowercase\r\n\t}", "@FXML\r\n\tpublic void goToCheckout() {\r\n\t\tViewNavigator.loadScene(\"Checkout\", ViewNavigator.CHECKOUT_SCENE);\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == btnBack){\n\t\t\tif (e.getSource() == btnBack){\n\t\t\t\t//if user presses back, ask user if they are sure\n\t\t\t\tif (UserInterface.getMethods().yesOrNoDialogBox(\"Are You Sure You Want To Go Back??\", \"Return\")){\n\t\t\t\t\t//if true then create listMenu and dispose current window\n\t\t\t\t\ttry {\n\t\t\t\t\t\tListMenu list = new ListMenu();\n\t\t\t\t\t\t//Catch for errors\n\t\t\t\t\t} catch (NumberFormatException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR: Number Format Error\");\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t\t\t\t}\n\t\t\t\t\tdispose();\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if (e.getSource() ==btnDepositCheq){\n\t\t\t//if deposit chequing button is pressed\n\t\t\t//ask the user the amount you want to deposit into chequings \n\t\t\tDouble amount = Double.parseDouble(JOptionPane.showInputDialog(null, \"What Amount Do You Want To Deposit Into Chequings?\"));\n\t\t\t//deposit into chequing\n\t\t\tchequing.deposit(amount);\n\t\t\t//get the balance and fee\n\t\t\tcheqBal = chequing.getBalance();\n\t\t\tcheqFee = chequing.getFee();\n\t\t\t//set the label as the updated balance and fee\n\t\t\tcheqBalDet.setText(\"Chequing Balance:$\" + String.format(\"%.2f\",cheqBal));\n\t\t\tcheqFeeDet.setText (\"The Fee For Withdrawal is:$\" + String.format(\"%.2f\",cheqFee));\n\t\t\t//get updated info from the account list and save it to the file \n\t\t\tString str2 = UserInterface.getAccountList().print();\n\t\t\tUserInterface.getMethods().writeToFile(UserInterface.getAccFileName(), str2);\n\t\t\t//ask if the user wants to save the transaction\n\t\t\tif (UserInterface.getMethods().yesOrNoDialogBox(\"Do You Want To Save A Receipt?\", \"Receipt\")){\n\t\t\t\t//Call method from MethodClass and print the receipt via JFileChooser\n\t\t\t\tUserInterface.getMethods().printReceipt(globalCustomerName, globalCustomerID, savBal, savFee, cheqBal, cheqFee,amount,true,true);\n\t\t\t}\n\t\t}\n\t\telse if (e.getSource() ==btnDepositSav){\n\t\t\t//if deposit savings button is pressed \n\t\t\t//ask the user for the amount you want to deposit into savings\n\t\t\tDouble amount = Double.parseDouble(JOptionPane.showInputDialog(null, \"What Amount Do You Want To Deposit Into Savings?\"));\n\t\t\t//deposit into savings \n\t\t\tsavings.deposit(amount);\n\t\t\t//get the updated fee and balance \n\t\t\tsavBal = savings.getBalance();\n\t\t\tsavFee = savings.getFee();\n\t\t\t//set the label as the updated balance and fee\n\t\t\tsavBalDet.setText(\"Savings Balance:$\" +String.format(\"%.2f\",savBal));\n\t\t\tsavFeeDet.setText(\"The Fee For Withdrawal is:$\" + String.format(\"%.2f\",savFee));\n\t\t\t//get updated info from the account list and save it to the file \n\t\t\tString str2 = UserInterface.getAccountList().print();\n\t\t\tUserInterface.getMethods().writeToFile(UserInterface.getAccFileName(), str2);\n\t\t\t//ask if the user wants to save the transaction\n\t\t\tif (UserInterface.getMethods().yesOrNoDialogBox(\"Do You Want To Save A Receipt?\", \"Receipt\")){\n\t\t\t\t//Call method from MethodClass and print the receipt via JFileChooser\n\t\t\t\tUserInterface.getMethods().printReceipt(globalCustomerName, globalCustomerID, savBal, savFee, cheqBal, cheqFee,amount,true,false);\n\t\t\t}\n\t\t}\n\t\telse if (e.getSource() ==btnWdCheq){\n\t\t\t//if withdrawal chequings button is pressed \n\t\t\t//ask the user for the amount you want to take out of chequings \n\t\t\tDouble amount = Double.parseDouble(JOptionPane.showInputDialog(null, \"How Much Do You Want To Withdraw From Chequings?\"));\n\t\t\t//take out that amount\n\t\t\tchequing.withdraw(amount);\n\t\t\t//get the updated fee and balance \n\t\t\tcheqBal = chequing.getBalance();\n\t\t\tcheqFee = chequing.getFee();\n\t\t\t//set the label as the updated balance and fee\n\t\t\tcheqBalDet.setText(\"Chequing Balance:$\" + String.format(\"%.2f\",cheqBal));\n\t\t\tcheqFeeDet.setText (\"The Fee For Withdrawal is:$\" + String.format(\"%.2f\",cheqFee));\n\t\t\t//get updated info from the account list and save it to the file \n\t\t\tString str2 = UserInterface.getAccountList().print();\n\t\t\tUserInterface.getMethods().writeToFile(UserInterface.getAccFileName(), str2);\n\t\t\t//ask if the user wants to save the transaction\n\t\t\tif (UserInterface.getMethods().yesOrNoDialogBox(\"Do You Want To Save A Receipt?\", \"Receipt\")){\n\t\t\t\t//Call method from MethodClass and print the receipt via JFileChooser\n\t\t\t\tUserInterface.getMethods().printReceipt(globalCustomerName, globalCustomerID, savBal, savFee, cheqBal, cheqFee,amount, false,true);\n\t\t\t}\n\t\t}\n\t\telse if (e.getSource() == btnWdSav){\n\t\t\t//if withdrawal savings button is pressed \n\t\t\t//ask the user for the amount you want to take out of savings\n\t\t\tDouble amount = Double.parseDouble(JOptionPane.showInputDialog(null, \"How Much Do You Want To Withdraw From Savings?\"));\n\t\t\t//take out that amount\n\t\t\tsavings.withdraw(amount);\n\t\t\t//get the updated fee and balance \n\t\t\tsavBal = savings.getBalance();\n\t\t\tsavFee = savings.getFee();\n\t\t\t//set the label as the updated balance and fee\n\t\t\tsavBalDet.setText(\"Savings Balance:$\" +String.format(\"%.2f\",savBal));\n\t\t\tsavFeeDet.setText(\"The Fee For Withdrawal is:$\" + String.format(\"%.2f\",savFee));\n\t\t\t//get updated info from the account list and save it to the file \n\t\t\tString str2 = UserInterface.getAccountList().print();\n\t\t\tUserInterface.getMethods().writeToFile(UserInterface.getAccFileName(), str2);\n\t\t\t//ask if the user wants to save the transaction\n\t\t\tif (UserInterface.getMethods().yesOrNoDialogBox(\"Do You Want To Save A Receipt?\", \"Receipt\")){\n\t\t\t\t//Call method from MethodClass and print the receipt via JFileChooser\n\t\t\t\tUserInterface.getMethods().printReceipt(globalCustomerName, globalCustomerID, savBal, savFee, cheqBal, cheqFee,amount,false,false);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "public void checkOut() {\n\n }", "public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }", "public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }", "public void onDiscardClick(){\n if (mHomeChecked){ // at Home Checkmark\n NavUtils.navigateUpFromSameTask(EditSymptomActivity.this);\n }\n if (!mHomeChecked) { // at BackPressed\n finish();\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getActionCommand().equalsIgnoreCase(\"Return\")){\n try{\n // System.out.println(\"walal\");\n if(\"\".equals(issueReturnView.getIssueId())){\n JOptionPane.showMessageDialog(issueReturnView, \"Please Select the Issued Item to be Return\");\n return;\n }\n // System.out.println(\"walal\"); \n if(issueReturnView.getReturnQuantity().trim().isEmpty()){\n JOptionPane.showMessageDialog(issueReturnView, \"Return Quantity Can be Empty.\");\n return;\n }\n if(issueReturnView.getReturnReason().trim().isEmpty()){\n JOptionPane.showMessageDialog(issueReturnView, \"Return Reason Can be Empty.\");\n return;\n }\n // System.out.println(issueReturnView.getReturnQuantity());\n // System.out.println(\"walal\");\n \n if(Float.parseFloat(issueReturnView.getReturnQuantity())> Float.parseFloat(issueReturnView.getIssueQuantity())){\n JOptionPane.showMessageDialog(issueReturnView, \"Return Quantity is greater than Issued Quantity\");\n return;\n }\n if(Float.parseFloat(issueReturnView.getReturnQuantity())> Float.parseFloat(issueReturnView.getStockQuantity())){\n JOptionPane.showMessageDialog(issueReturnView, \"There is not Sufficient Amount to return.\");\n return;\n }\n // System.out.println(\"walal\");\n int choice;\n choice = JOptionPane.showConfirmDialog(issueReturnView, \"Do You Want to Return the Item\",\"Return Item\", JOptionPane.YES_NO_OPTION);\n if(choice == JOptionPane.YES_OPTION){\n issueReturnModel.IssueReturn(issueReturnView.getIssueReturnInfo());\n issueReturnView.clearAll();\n issueReturnView.enableReturnBtn();\n issueReturnView.refreshJTable(issueReturnModel.getResturantItemList(issueReturnView.getDepartmentId()));\n }\n }\n \n catch(Exception ee){\n JOptionPane.showMessageDialog(issueReturnView, ee+\"form IssueReturnListener\");\n }\n \n }\n if(e.getActionCommand().equalsIgnoreCase(\"Cancel\")){\n issueReturnView.clearAll();\n issueReturnView.disableReturnBtn();\n }\n if(e.getActionCommand().equalsIgnoreCase(\"Search\")){\n String strsearch;\n String[] SearchBox = new String[7];\n boolean flag = false;\n int col =1;\n try{\n strsearch = issueReturnView.getSearch();\n for(int row = 0;row<issueReturnView.tblReturnList.getModel().getRowCount();row++){\n if(strsearch.equalsIgnoreCase(issueReturnView.tblReturnList.getValueAt(row, col).toString())||strsearch.equalsIgnoreCase(issueReturnView.tblReturnList.getValueAt(row, col-1).toString())){\n for(int scol = 0;scol<issueReturnView.tblReturnList.getModel().getColumnCount();scol++){\n SearchBox[scol] = issueReturnView.tblReturnList.getValueAt(row, scol).toString();\n }\n //inorer to scrooll over the tbale\n issueReturnView.tblReturnList.scrollRectToVisible(issueReturnView.tblReturnList.getCellRect(row, 0, true));\n // for focus\n issueReturnView.tblReturnList.setRowSelectionInterval(row, row);\n issueReturnView.setIssueReturnInfo(SearchBox);\n issueReturnView.setFieldEditableFalse();\n Float UnitRelativeQuantity = issueReturnModel.getUnitRelativeQuantity(issueReturnModel.getUnitIdByIssueId(issueReturnView.getIssueId()));\n issueReturnView.setStockQuantity(String.valueOf(issueReturnModel.getStockQuantityfromResturantStore(issueReturnView.getIssueId())/UnitRelativeQuantity));\n issueReturnView.enableReturnBtn();\n flag =true;\n break;\n }\n }\n if(flag == false){\n JOptionPane.showMessageDialog(issueReturnView, \"Item Not Found.\");\n }\n \n }\n catch(Exception sere){\n JOptionPane.showMessageDialog(issueReturnView, sere+\"from search\");\n }\n }\n }", "public void checkoutBook(Book b, Account acc) {\n\t\tCartItem it = new CartItem(b, acc, CartCommand.CHECKOUT);\n\t\tcart.add(it);\n\t}", "@Override\n public void onSureClick(String value) {\n tenPayPopWindow.dismiss();\n checkPresenterImpl.addTenPayPayment(cashierResult.bill.unpaid, value);\n }", "public void clickOnTheCheckOutButton() {\n\t\tSystem.out.println(\"Making click in the button checkout\");\n\t\twaitForAnExplicitElement(body_button_checkout);\n\t\tclick(body_button_checkout);\n\t}", "@Override\n public void onClick(View v) {\n\n Log.d(\"accepted\", \"confirm button clicked\");\n\n bookRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n DocumentSnapshot document = task.getResult();\n if (document.exists()) {\n // set borrower status to 'borrowed'\n Map<String, String> status = (Map<String, String>) document.getData().get(\"status\");\n status.put(\"borrower\", null);\n\n bookRef.update(\"status\", status);\n\n finish();\n }\n }\n }\n });\n }", "private void onOK() {\n isOkClicked = true;\n dispose();\n }", "@Test\n public void checkoutTest() {\n when(retroLibrary.getBooks()).thenReturn(Observable.just(getFakeBooks()));\n\n // Manually launch activity\n mActivityTestRule.launchActivity(new Intent());\n\n onView(withId(R.id.books_list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n ViewInteraction floatingActionButton = onView(allOf(withId(R.id.fab_checkout), isDisplayed()));\n\n floatingActionButton.perform(click());\n\n ViewInteraction appCompatEditText = onView(allOf(withId(android.R.id.input), isDisplayed()));\n\n appCompatEditText.perform(replaceText(\"Chet\"), closeSoftKeyboard());\n\n ViewInteraction mDButton = onView(\n allOf(withId(R.id.buttonDefaultPositive), withText(\"OK\"), isDisplayed()));\n mDButton.perform(click());\n\n }", "private void showReturnDialog(){\n final Dialog verificationDialog = new Dialog(this, R.style.DialogTheme);\n verificationDialog.setContentView(R.layout.dialog_verification);\n TextView verificationText = (TextView) verificationDialog.findViewById(R.id.verification_text);\n Button cancelButton = (Button) verificationDialog.findViewById(R.id.cancel_button);\n Button acceptButton = (Button) verificationDialog.findViewById(R.id.accept_button);\n verificationDialog.show();\n\n verificationText.setText(R.string.verification_return);\n\n // Setting up a listener for the Cancel Button:\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n }\n });\n\n // Setting up a listener for the Done Button:\n acceptButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n // Go back to main menu:\n\n // Creating an intent:\n Intent mainIntent = new Intent(OfflineGameActivity.this , MainActivity.class);\n // Starting the Main Activity:\n startActivity(mainIntent);\n\n }\n });\n\n }", "public ReturnBookControl() { \r\n\t/*returnBookControl not \"ReturnBookControl\" as method starts with small letter \r\n\t- it is verb and in useCamelBack style*/ \r\n\t\tthis.libraryBook = libraryBook.getInstance();\r\n\t\t//\"library.getInstance()\" not \"library.INSTANCE()\" \r\n\t\t//as the method that returns their sole instance is \"getInstanse\" \r\n\t\t//it's verb in useCamelBack style\r\n\t\tstateCon = CONTROL_STATE.INITIALISED; //updated by moderator Dushan- camelBack style -state to stateCon\r\n\t}", "private void btnCheckOutActionPerformed(java.awt.event.ActionEvent evt) {\n\n if (temp_Purchhist != null && temp_Purchhist.size() > 0) {\n\n for (CustomerPurchase cp : temp_Purchhist) {\n\n for (Product ap : ae.getProdDir().getProductCatalog()) {\n if (ap instanceof AdvertiserProduct) {\n AdvertiserProduct p = (AdvertiserProduct) ap;\n if (cp.getProductPurchased().getProductId() == p.getProductId()) {\n\n int temp1 = cp.getQuantity();\n int temp2 = p.getTotal_sold();\n int temp3 = temp1 + temp2;\n p.setTotal_sold(temp3);\n break;\n }\n }\n }\n }\n for (CustomerPurchase p : temp_Purchhist) {\n ae.getPurchHist().getPurchaseList().add(p);\n pe.getPurchHist().getPurchaseList().add(p);\n Customer c = (Customer) ua.getPerson();\n c.getPurchaseHistory().getPurchaseList().add(p);\n }\n ArrayList<CustomerPurchase> trans = temp_Purchhist;\n JOptionPane.showMessageDialog(null, \"You have successfully checked out. Proceed To Payment?\");\n isCheckedOut = true;\n temp_Purchhist = new ArrayList<CustomerPurchase>();\n\n populateTable();\n populatePurchaseTable();\n UserTransactionJPanel utj = new UserTransactionJPanel(upc, trans, ua, ae, pe, system);\n upc.add(\"User Transaction\", utj);\n CardLayout layout = (CardLayout) upc.getLayout();\n layout.next(upc);\n\n } else {\n\n JOptionPane.showConfirmDialog(null, \"Improper check out\");\n\n }\n\n }", "public void returnBook(Book b, Account acc) {\n\t\tCartItem it = new CartItem(b, acc, CartCommand.RETURN);\n\t\tcart.add(it);\n\t}", "@Then(\"^click on checkout$\")\r\n\tpublic void click_on_checkout() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.checkout());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "@Override\n\tpublic void checkout(MetodoPagamento object) {\n\t\t\n\t}", "private static void borrow() {\n\t\tnew BorrowBookUI(new borrowBookControl()()).run();\t// method changes BorrowBookControl to borrowBookControl()\t\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which) {\n case 0:\n downloadAndOpenPDFFile(mContext, clickedBook, bookView);\n break;\n case 1:\n pdfFile.delete();\n Utils.triggerGAEvent(mContext, \"Pdf_Delete\", productId, customerId);\n\n // Delete downloaded book details from database\n String query = \"DELETE FROM \" + DatabaseConstants.DatabaseEntry.DOWNLOADED_BOOKS_TABLE_NAME + \" WHERE product_id = \" + productId;\n DatabaseHelper.getInstance(LibraryActivity.this).deleteData(query);\n\n ImageView bookDepiction = (ImageView) bookView.findViewById(R.id.book_depiction);\n if (bookDepiction != null) {\n bookDepiction.setImageResource(R.drawable.cloud_icon);\n }\n if (productTypes.startsWith(\"downloaded_\")) {\n mDownloadedBooksAdapter.removeItem(clickedBook);\n int downloadedBooks = mDownloadedBooksAdapter.getItemCount();\n if (downloadedBooks == 0) {\n shouldSearchIconShow = false;\n libraryViewChange.setVisibility(View.INVISIBLE);\n libraryFlipper.setDisplayedChild(1);\n Drawable image = getResources().getDrawable(R.drawable.no_download_ebooks);\n String text = \"No Downloads Yet\";\n String subText = \"Download your eBooks by Clicking on it\\nTo Read without Internet Connection.\";\n String buttonText = \"My Books\";\n setLibraryViewWhenNoDataFound(image, text, subText, buttonText);\n\n invalidateOptionsMenu();\n }\n }\n break;\n case 2:\n dialog.cancel();\n break;\n }\n }", "private void onPaymentButtonClicked() {\n if (cartList == null || cartList.size() < 1) {\n Toast.makeText(getContext(), \"Your cart is empty!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (studentDetails[0] == null) {\n Toast.makeText(getContext(), \"Enter Student ID first\", Toast.LENGTH_SHORT).show();\n studentIdText.requestFocus();\n return;\n }\n\n final PaymentDialog dialog = new PaymentDialog(getActivity(), total, studentDetails[0]);\n\n if (dialog.getWindow() != null) {\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);\n }\n\n dialog.setCancelable(false);\n dialog.show();\n dialog.setOnOrderCompleteListener(transactionList -> {\n showProgressDialog();\n orderCompleted(transactionList);\n\n dialog.dismiss();\n });\n Objects.requireNonNull(dialog.getWindow()).clearFlags(WindowManager.\n LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);\n dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);\n }", "public void confirmBooking(){\n double ticketPrice = 56.0;\n double mealPrice = 30.0;\n if (student || child )\n ticketPrice = ticketPrice/2;\n else\n ticketPrice = ticketPrice*0.8;\n \n if (child )\n mealPrice = mealPrice/2;\n else\n mealPrice = mealPrice*0.9;\n double totalPrice = ticketPrice + mealPrice;\n System.out.println(getName()+\"\\nTicket price:$\"+ticketPrice+\"\\nMeal Price:$\"+mealPrice+\"\\nTotal price:$\"+totalPrice+\"\\nConfirm booking for \"+getName()+\" (Y/N)\");\n setBooked();\n System.out.println(getBooked()+\"\\n\\n\");\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 325) {\n if (resultCode == Activity.RESULT_OK) {\n String result = data.getStringExtra(\"RESULT_ISBN\");\n if (result.equals(clickedBook.getISBN())){\n //owner confirm receive returned book\n Toast.makeText(getActivity(), \"You successfully received this book\", Toast.LENGTH_SHORT).show();\n currentBookDocRef.update(\"returnDenoted\",\"false\");\n currentBookDocRef.update(\"status\",\"Available\");\n currentBookDocRef.update(\"borrowerID\", FieldValue.delete());\n currentBookDocRef.update(\"borrowerUname\", FieldValue.delete());\n currentBookDocRef.update(\"lat\", FieldValue.delete());\n currentBookDocRef.update(\"lng\", FieldValue.delete());\n borrowerSideBorrowedBookRef.update(\"returnDenoted\",\"false\");\n\n // for borrower,remove book from BorrowedBook\n borrowerSideBorrowedBookRef.delete();\n\n }\n else {\n Toast.makeText(getActivity(), \"The ISBN you scaned does not match the ISBN of the book\", Toast.LENGTH_SHORT).show();\n\n }\n }\n }\n }", "@Override\r\n\tpublic void onCompletedCheckout(String errorcode, String message,\r\n\t\t\tString booking_id) {\n\r\n\t\tif (pDialog.isShowing()) {\r\n\t\t\tpDialog.dismiss();\r\n\t\t}\r\n\r\n\t\tif (errorcode.equals(\"0\")) {\r\n\r\n\t\t\tsharedpreference.saveBookingId(booking_id);\r\n\r\n\t\t\tif (payment_type.equals(\"1\")) {\r\n\r\n\t\t\t\t((HomeMainActivity) getActivity()).loadPayuMoneyFragment();\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\r\n\t\t\t\talert_dialog = new Dialog(getActivity());\r\n\t\t\t\talert_dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\t\t\talert_dialog.setContentView(R.layout.dialog_checkout);\r\n\t\t\t\talert_dialog.show();\r\n\r\n\t\t\t\tTextView alert_header = (TextView) alert_dialog\r\n\t\t\t\t\t\t.findViewById(R.id.alert_header);\r\n\t\t\t\tTextView alert_msg = (TextView) alert_dialog\r\n\t\t\t\t\t\t.findViewById(R.id.alert_msg);\r\n\t\t\t\tButton alert_ok = (Button) alert_dialog\r\n\t\t\t\t\t\t.findViewById(R.id.alert_ok);\r\n\r\n\t\t\t\talert_header.setText(\"Thank you for choosing \"\r\n\t\t\t\t\t\t+ service_details + \" on Zimmber App\");\r\n\t\t\t\talert_msg.setText(\"Zimmber Champ will be at your address on \"\r\n\t\t\t\t\t\t+ select_date + \", \" + select_time);\r\n\r\n\t\t\t\talert_ok.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t\t\talert_dialog.dismiss();\r\n\r\n\t\t\t\t\t\tstartActivity(new Intent(getActivity(),\r\n\t\t\t\t\t\t\t\tHomeMainActivity.class));\r\n\r\n\t\t\t\t\t\t((HomeMainActivity) getActivity()).finish();\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\talert_dialog = new Dialog(getActivity());\r\n\t\t\talert_dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\t\talert_dialog.setContentView(R.layout.dialog_checkout);\r\n\t\t\talert_dialog.show();\r\n\r\n\t\t\tTextView alert_msg = (TextView) alert_dialog\r\n\t\t\t\t\t.findViewById(R.id.alert_msg);\r\n\t\t\tButton alert_ok = (Button) alert_dialog.findViewById(R.id.alert_ok);\r\n\r\n\t\t\talert_msg.setText(message);\r\n\r\n\t\t\talert_ok.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t\talert_dialog.dismiss();\r\n\r\n\t\t\t\t\tstartActivity(new Intent(getActivity(),\r\n\t\t\t\t\t\t\tHomeMainActivity.class));\r\n\r\n\t\t\t\t\t((HomeMainActivity) getActivity()).finish();\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public void onBackPressed() {\n if (!RecipeHasChanged) {\r\n super.onBackPressed();\r\n return;\r\n } else {\r\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n finish();\r\n }\r\n };\r\n //show dialog that there are unsaved changes\r\n showUnsavedChnageDialog(discardButtonClickListener);\r\n }\r\n }", "@Override\n public void handle( MouseEvent e)\n {\n if( tradeBankGroup.isVisible() || domesticTradeGroup.isVisible())\n return;\n System.out.println( \"Buy card checkpoint\" + mainController.buyCard());\n refreshResources();\n refreshCardNumbers();\n }", "public void handleUpdateItemConfirmButtonAction(ActionEvent event) {\n try{\n String itemID = this.tempItemID;\n String title = updateItemTitle.getText();\n String author = updateItemAuthor.getText();\n GregorianCalendar publishDate = parseDate(updateItemPublishDate.getText());\n String description = updateItemDescription.getText();\n String ISBN = updateItemISBN.getText();\n String genre = updateItemGenre.getText();\n if (title.length()>0 && author.length()>0 && description.length()>0 && ISBN.length()>0 && genre.length()>0){ \n updateMgr.updateBook(itemID, title, author, publishDate, description, ISBN, genre);\n this.displaySuccess(\"Updated\", \"Item information has successfully been updated\");\n this.clearUpdateItemFields();\n }\n else{ \n displayWarning(\"Item Information incomplete\", \"Please fill in the necessary fields\");\n } \n }\n catch(ArrayIndexOutOfBoundsException | NumberFormatException e){\n displayWarning(\"Sorry\",\"Date format is wrong\\n\" + e.getMessage());\n }\n catch(Exception e){\n displayWarning(\"Sorry\",\"One of the fields is wrong:\\n\" + e.getMessage());\n }\n }", "private static double checkOut() {\n double discount = 0;\n System.out.print(\"Do you have any coupon code (y/n): \");\n String response = sc.nextLine();\n if (!response.equals(\"y\") && !response.equals(\"n\")) {\n System.out.println(\"Invalid input\");\n checkOut();\n return 0;\n } else {\n if (response.equals(\"y\")) discount = getDiscount();\n }\n double total = printBill(discount);\n double cash = 0;\n while (true) {\n System.out.print(\"Cash: \");\n String input = sc.nextLine();\n if (input.charAt(0) < 48 || input.charAt(0) > 57) {\n System.out.println(\"Invalid input\");\n continue;\n }\n cash = Double.parseDouble(input);\n if (cash < total) {\n System.out.println(\"IS THAT JOKE? HAHAHA\");\n System.out.printf(\"You have to pay at least %.2f Baht%n\", total);\n } else {\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Cash\", cash);\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Change\", cash - total);\n break;\n }\n }\n return total;\n }", "private void updateBook(final Properties bookData){\n\t\tnew SwingWorker<Boolean, Void>() {\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() {\n\t\t\t\tJDBCBroker.getInstance().startTransaction();\n\t\t\t\tif(book.isLost()){\n\t\t\t\t\tBorrower borrower = book.getBorrowerThatLost();\n\t\t\t\t\tif(borrower == null || !borrower.subtractMonetaryPenaltyForLostBook(book)){\n\t\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbookData.setProperty(\"Status\", \"Active\");\n\t\t\t\tbook.stateChangeRequest(bookData);\n\t\t\t\treturn book.save();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tboolean success = false;\n\t\t\t\ttry {\n\t\t\t\t\tsuccess = get();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t}\n\t\t\t\tif(success){\n\t\t\t\t\tJDBCBroker.getInstance().commitTransaction();\n\t\t\t\t\tstateChangeRequest(Key.BACK, \"ListBooksView\");\n\t\t\t\t\tlistBooksTransaction.stateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.SUCCESS, \"Well done! The book was sucessfully saved.\"));\n\t\t\t\t}else{\n\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\tList<String> inputErrors = book.getErrors();\n\t\t\t\t\tif(inputErrors.size() > 0){\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Aw shucks! There are errors in the input. Please try again.\", inputErrors));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}.execute();\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n BookingLogin booking = new BookingLogin(accountType, user);\r\n booking.setVisible(true);\r\n }", "@Click(R.id.ivReturn)\n\tvoid toReturn() {\n\t\tfinish();\n\t}", "public void borrowBook()\r\n {\r\n noOfBooks = noOfBooks + 1;\r\n System.out.println(\"Books on loan: \" + noOfBooks); \r\n }", "@Override\n public void onBackPressed() {\n if (!mProductHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@FXML\n\tprivate void handleOk() {\n\t\tif (isInputValid()) {\n\t\t\titem.setDate(DateUtil.parse(dateField.getText()));\n\t\t\titem.setCategory(categoryField.getSelectionModel().getSelectedItem());\n\t\t\titem.setUse(useField.getText());\n\t\t\t\n\t\t\tString textBefore = amountField.getText();\n\t\t\tString textAfter = null;\n\t\t\tif(textBefore.contains(\",\")) {\n\t\t\t\ttextAfter = textBefore.replace(\",\", \".\");\n\t\t\t} else {\n\t\t\t\ttextAfter = textBefore;\n\t\t\t}\n\t\t\titem.setAmount(Double.parseDouble(textAfter));\n\t\t\titem.setDistributionKind(distributionKindField.getText());\n\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Booked\", 500).show();\n\t\t\t}", "public check_out() {\n initComponents();\n }", "private boolean renterMenu() {\n System.out.println(\"BOOKING TESTING!!!!!!!!!!!!!!\");\n try {\n\n User user = UserRepository.getUser(\"testrsin\");\n\n System.out.println(\"USERRRRRRRRRR!!!!!!!!!!!!!!\");\n System.out.println(user.toString());\n\n BookingRepository\n .booking(\"testlisting\", \"2018-12-01\", \"2018-12-10\", user);\n Booking booking = BookingRepository\n .getBooking(\"testlisting\", \"2018-12-01\", \"2018-12-10\", user);\n\n System.out.println(\"BOOKING!!!!!!!!!!!!!!\");\n System.out.println(booking.toString());\n\n //BookingRepository\n // .deleteBooking(\"testlisting\", \"2018-12-01\", \"2018-12-10\", user);\n\n\n /*\n THE LISITING TESTS\n */\n ReviewRepository.createListingReview(\"testlisting\", \"testrsin\", \"l \"\n + \"review\", 1);\n\n //DID NOT STAY AT LISTING\n //ReviewRepository.createListingReview(\"testlisting\", \"rentersin\", \"l \"\n // + \"review\", 1);\n\n\n /*\n THE HOST REVIEWS\n */\n //Proper Test\n ReviewRepository.createHostReview(\"testhsin\", \"testrsin\", \"PROPER TEST \"\n + \"HOST REVIEW\", 1);\n\n //Bad Dates Test but booked\n\n\n //BOOKING CANCELLING\n BookingRepository\n .cancelBooking(\"testlisting\", \"2018-12-01\", \"2018-12-10\", user);\n booking = BookingRepository\n .getBooking(\"testlisting\", \"2018-12-01\", \"2018-12-10\", user);\n\n System.out.println(\"CANCELLED TESTING!!!!!!!!!!!!!!\");\n System.out.println(booking.toString());\n\n //Not booked at all GOOD\n //ReviewRepository.createHostReview(\"testhsin\", \"rentersin\", \"USER NOT \"\n // + \"BOOKED\", 1);\n\n //cancelled GOOD\n //ReviewRepository.createHostReview(\"testhsin\", \"testrsin\", \"CANCELLED \"\n // + \"TESTING SHOULD NOT APPEAR\", 1);\n\n System.out.println(\"DELETE TESTING!!!!!!!!!!!!!!\");\n\n } catch (Exception exception) {\n System.out.println(\"OH NO\");\n exception.printStackTrace();\n return true;\n }\n return true;\n }", "@Override\n public void onBackPressed() {\n if (!mItemDetailsHasChanged) {\n super.onBackPressed();\n return;\n }\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "private void confirmExit() {\n if (hasChanges()) {\n new AlertDialog.Builder(this).\n setMessage(R.string.dialog_discard_msg).\n setNegativeButton(R.string.dialog_discard_neg, (dialog, which) -> {}).\n setPositiveButton(R.string.dialog_discard_pos, (dialog, which) -> finish()).\n create().\n show();\n }\n else {\n showToast(R.string.toast_no_changes);\n finish();\n }\n }", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }", "private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}", "@Override\n public void onBackPressed() {\n if (!mHasProductInfoChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "public boolean checkOut(boolean showMessage) {\n\t\tif(null==cart){\n\t\t\tcart = new Cart();\n\t\t}\n\t\t\n\t\tint total = 0;\n\t\tboolean success = false;\n\t\tString stringOfItems = cart.toString();\n\t\tif (stringOfItems.isEmpty()) {\n\t\t\tif(showMessage)\n\t\t\t\tJOptionPane.showMessageDialog(Main.getFrame(), \"Your Cart is Empty\",\n\t\t\t\t\t\t\"Warning\", JOptionPane.WARNING_MESSAGE);\n\t\t} else {\n\t\t\ttotal = supermarket.checkout(stringOfItems);\n\t\t\tcart.clearCart();\n\t\t\tcartLabel.setText(cart.size()+ \" items in your cart\");\n\t\t\tsuccess = true;\n\t\t\tif(showMessage)\n\t\t\t\tJOptionPane.showMessageDialog(Main.getFrame(),\n\t\t\t\t\t\tString.format(\"<html>Items Purchased: %s<br><br>Your total is: $%s</html>\"\n\t\t\t\t\t\t\t\t,stringOfItems, total), \"Total\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t\treturn success;\n\t}", "@Override\r\n\tpublic void onStartedCheckout() {\n\r\n\t\tpDialog = new ProgressDialog(getActivity());\r\n\t\tpDialog.setMessage(\"Please Wait...\");\r\n\t\tpDialog.setCancelable(false);\r\n\t\tpDialog.setCanceledOnTouchOutside(false);\r\n\t\tpDialog.show();\r\n\r\n\t}", "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}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tnew AddBook().setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tif (cmd == ConstantTool.PAY_SUCCESS) {\r\n\t\t\tIntent intent = new Intent(OrderList.this, Homemenu.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t}\r\n\t}", "private void enterBook() {\n String sku;\n String author;\n String description;\n double price;\n String title;\n boolean isInStock;\n String priceTmp;\n String inStock;\n Scanner keyb = new Scanner(System.in);\n\n System.out.println(\"Enter the sku number.\"); // Enter the SKU number\n sku = keyb.nextLine();\n\n System.out.println(\"Enter the title of the book.\"); // Enter the title\n title = keyb.nextLine();\n\n System.out.println(\"Enter the author of the book.\"); // Enter the author\n author = keyb.nextLine();\n\n System.out.println(\"Enter the price of the book.\"); // Enter the price of the book\n priceTmp = keyb.nextLine();\n price = Double.parseDouble(priceTmp);\n\n System.out.println(\"Enter a description of the book.\"); // Enter the description of the book\n description = keyb.nextLine();\n\n System.out.println(\"Enter whether the book is in stock (\\\"Y\\\"|\\\"N\\\").\"); // in stock?\n inStock = keyb.nextLine();\n if (inStock.equalsIgnoreCase(\"Y\")) {\n isInStock = true;\n } else if (inStock.equalsIgnoreCase(\"N\")) {\n isInStock = false;\n } else {\n System.out.println(\"Not a valid entry. In stock status is unknown; therefore, it will be listed as no.\");\n isInStock = false;\n }\n\n Book book = new Book(title, author, description, price, isInStock);\n bookDB.put(sku, book);\n }", "public void selectNewBook(MouseEvent e)\n\t{\n\t\tBookApp.currentBook = otherAppearances.getSelectionModel().getSelectedItem();\n\t\tcurrentBookDisplay.getItems().clear();\n\t\tcurrentBookDisplay.getItems().add(BookApp.currentBook);\n\t\tcharactersNameList.getItems().clear();\n\t\tfor(Character character : (MyLinkedList<Character>) BookApp.currentBook.getCharacterList()){\n\t\t\tcharactersNameList.getItems().add(character);\n\t\t\tcharactersNameList.getSelectionModel().getSelectedIndex();\n\t\t}\n\t\totherAppearances.getItems().clear();\n\t\tfor(int i = 0; i< BookApp.unsortedBookTable.hashTable.length; i++) {\t\t\n\t\t\tfor(Book eachBook : (MyLinkedList<Book>) BookApp.unsortedBookTable.hashTable[i]) {\n\t\t\t\tfor(Character eachCharacterInTotalList : (MyLinkedList<Character>) eachBook.getCharacterList())\n\t\t\t\t{\n\t\t\t\t\tif(eachCharacterInTotalList.equals(BookApp.currentCharacter) && eachBook.equals(BookApp.currentBook))\n\t\t\t\t\t{\n\t\t\t\t\t\totherAppearances.getItems().add(eachBook);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public void CheckIn(){\n if (isIn == false){\n isIn=true;\n// System.out.println(name + \" has been checked into the library.\");\n// }else\n// System.out.println(name + \" is not checked out.\");\n }\n }", "void showBookResult(Book book);", "@Then(\"^: proceed to checkout$\")\r\n\tpublic void proceed_to_checkout() throws Throwable {\n\t\tobj.update();\r\n\t}", "@Override\n\tpublic void sendBuyRequest() {\n\t\ttry {\n\t\t\tString result = \"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.checkOutCart(clientId);\n\t\t\t} else {\n\t\t\t\tWebResource checkOutService = service.path(URI_CHECKOUT).path(String.valueOf(clientId));\n\t\t\t\tresult = checkOutService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\n\t\t\tStatusMessageObject status = XMLParser.parseStatusMessage(result);\n\t\t\tif (status.getStatusCode() == 1){\n\t\t\t\tgui.setupCart(null);\t\n\t\t\t}\n\t\t\tsendItemListRequest();\n\t\t\tgui.setStatus(status.getMessage());\n\t\t\tsetOKDialog(\"Check out confirmation!\", status.getMessage());\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t}", "public void returnAct() {\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.returnTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }" ]
[ "0.6934637", "0.6832344", "0.67772233", "0.6507549", "0.6476187", "0.6419835", "0.63952166", "0.63758796", "0.6334225", "0.62922466", "0.628594", "0.6243481", "0.6235906", "0.6183064", "0.6177387", "0.6118121", "0.6073284", "0.6059479", "0.6012771", "0.6007676", "0.60007936", "0.59964705", "0.5995707", "0.5919344", "0.59147763", "0.58746994", "0.58579457", "0.5826026", "0.5822832", "0.57421094", "0.57318753", "0.5716268", "0.57125485", "0.5685683", "0.56844264", "0.5674257", "0.56699187", "0.56698793", "0.56508654", "0.56456274", "0.5644596", "0.5616804", "0.5597081", "0.5586901", "0.55659497", "0.55318546", "0.5531679", "0.5516112", "0.5506895", "0.54990613", "0.5475723", "0.5471898", "0.546877", "0.5468172", "0.5453281", "0.545315", "0.5451739", "0.5439843", "0.5432275", "0.5429241", "0.5428131", "0.54214925", "0.54157203", "0.54143375", "0.5408995", "0.54072416", "0.54052764", "0.5404641", "0.54005533", "0.5396296", "0.5396193", "0.5394155", "0.5389029", "0.5389001", "0.5387459", "0.53866214", "0.53848696", "0.5370986", "0.53709257", "0.53695935", "0.5362215", "0.53594965", "0.53468573", "0.5339129", "0.53382075", "0.5336086", "0.5333429", "0.5321722", "0.53210074", "0.5313805", "0.53059554", "0.5292902", "0.5289778", "0.52852094", "0.5282034", "0.5281787", "0.5281416", "0.5279373", "0.5276808", "0.5275021" ]
0.8294957
0
Method is called when checkout or waitlist is selected. A URI is constructed with URL arguments detailing the UID, password, BID, and the action to perform based on weather or not the book is being waitlisted. The URI is converted to a String and uses Volley to send the request and parse the response is created.
public void checkoutBook(Copy copy, Boolean waitList){ int BID = copy.BID; //Build URI Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME) .authority(BASE_URL) .appendPath(PATH0) .appendPath(PATH1) .appendPath(PATH2); if(!waitList) builder.appendQueryParameter(PARAM_ACTION, VALUE_ACTION_CHECKOUT); else builder.appendQueryParameter(PARAM_ACTION, VALUE_ACTION_WAITLIST); builder.appendQueryParameter(PARAM_BID, Integer.toString(BID)) .appendQueryParameter(PARAM_UID, Integer.toString(VALUE_UID)) .appendQueryParameter(PARAM_PASSWORD, VALUE_PASSWORD) .build(); String urlString = builder.toString(); restartOnFinished = true; downloadJSON(urlString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onRequestInteractionListener(String username, boolean accept, String fragment) {\n String endpoint;\n\n if (accept) {\n endpoint = getString(R.string.ep_verify_contact_request);\n } else {\n endpoint = getString(R.string.ep_decline_contact_request);\n }\n\n Uri uri = new Uri.Builder()\n .scheme(\"https\")\n .appendPath(getString(R.string.ep_base_url))\n .appendPath(endpoint)\n .build();\n\n SharedPreferences prefs = getSharedPreferences(getString(R.string.keys_shared_prefs),\n Context.MODE_PRIVATE);\n String myName = prefs.getString(getString(R.string.keys_prefs_username), \"\");\n\n JSONObject msg = new JSONObject();\n if (!fragment.equals(\"searchPending\") && !fragment.equals(\"connectionsPending\")) {\n try {\n msg.put(\"usernameA\", username);\n msg.put(\"usernameB\", myName);\n } catch (JSONException e) {\n Log.wtf(\"Verify Contact\", \"Error reading JSON\" + e.getMessage());\n }\n } else {\n try {\n msg.put(\"usernameB\", username);\n msg.put(\"usernameA\", myName);\n } catch (JSONException e) {\n Log.wtf(\"Verify Contact\", \"Error reading JSON\" + e.getMessage());\n }\n }\n\n if (fragment.equals(\"connections\")) {\n new tcss450.uw.edu.messengerapp.utils.SendPostAsyncTask.Builder(uri.toString(), msg)\n .onPreExecute(this::handleRequestOnPre)\n .onPostExecute(this::handleRequestOnPost)\n .onCancelled(this::handleErrorsInTask)\n .build().execute();\n } else if (fragment.equals(\"search\")) {\n new tcss450.uw.edu.messengerapp.utils.SendPostAsyncTask.Builder(uri.toString(), msg)\n .onPreExecute(this::handleSearchRequestOnPre)\n .onPostExecute(this::handleSearchRequestOnPost)\n .onCancelled(this::handleErrorsInTask)\n .build().execute();\n } else if (fragment.equals(\"searchPending\")) {\n new tcss450.uw.edu.messengerapp.utils.SendPostAsyncTask.Builder(uri.toString(), msg)\n .onPreExecute(this::handleSearchRequestOnPre)\n .onPostExecute(this::handleSearchPendingOnPost)\n .onCancelled(this::handleErrorsInTask)\n .build().execute();\n } else if (fragment.equals(\"connectionsPending\")) {\n new tcss450.uw.edu.messengerapp.utils.SendPostAsyncTask.Builder(uri.toString(), msg)\n .onPreExecute(this::handleRequestOnPre)\n .onPostExecute(this::handlePendingOnPost)\n .onCancelled(this::handleErrorsInTask)\n .build().execute();\n }\n\n }", "private void getRequestList()\n {\n StringBuilder soapMessage = new StringBuilder();\n soapMessage.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\");\n soapMessage.append(\"<Envelope xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\");\n soapMessage.append(\"<Body>\");\n soapMessage.append(\"<ListRequestType xmlns=\\\"\" + Constants.TEMP_URI_NAMESPACE + \"\\\">\");\n soapMessage.append(\"<userHash>\" + DataManager.getInstance().user.getUserHash() + \"</userHash>\");\n soapMessage.append(\"</ListRequestType>\");\n soapMessage.append(\"</Body>\");\n soapMessage.append(\"</Envelope>\");\n showProgressDialog();\n VollyResponseListener vollyResponseListener = new VollyResponseListener()\n {\n @Override\n public void onErrorResponse(VolleyError volleyError)\n {\n volleyError.printStackTrace();\n }\n\n @Override\n public void onResponse(String response)\n {\n hideProgressDialog();\n requestList = new ArrayList<SmartObject>();\n Helper.Log(\"Response:%n %s\", response);\n DataManager.getInstance().requestUser = ParserManager.parseRequestResponse(response);\n for (int i = 0; i < ParserManager.parseRequestResponse(response).getRequests().size(); i++)\n {\n int requestId = Integer.parseInt(ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestId());\n String requestName = ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestName();\n requestList.add(i, new SmartObject(requestId, requestName));\n }\n\n {\n if (!requestList.isEmpty())\n showListPopUp(etSelectTeam, requestList);\n }\n\n }\n };\n try\n {\n VollyCustomRequest vollyCustomRequest = new VollyCustomRequest(Constants.PLANNER_WEBSERVICE_URL,\n soapMessage.toString(), Constants.TEMP_URI_NAMESPACE + \"IPlannerService/ListRequestType\", vollyResponseListener);\n vollyCustomRequest.init(\"validateUser\");\n\n\n } catch (Exception e1)\n {\n e1.printStackTrace();\n }\n\n }", "private void sendRequestDetails(){\n\n\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, sURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n mTextView.setText(\"Fetching shape...\");\n Log.w(TAG, \"Token verified by server\");\n Log.w(TAG, \"Response: \" + response);\n\n // Send intent to change to logged in activity\n Intent intent = new Intent(getBaseContext(), DisplayShape.class);\n intent.putExtra(\"Shape\", response);\n startActivity(intent);\n finish();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (mLastToken.isEmpty()){\n mTextView.setText(\"Request details incorrect. Please try again.\");\n Log.w(TAG, \"Got empty token!\");\n } else {\n mTextView.setText(\"Unknown server error. Please try again.\");\n Log.w(TAG, \"That didn't work!\");\n error.printStackTrace();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"ApproovToken\", mLastToken);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n mQueue.add(stringRequest);\n\n }", "public void checkApplyReferralCanBeAppliedOrNot() {\n String url = APIBaseURL.checkHavingReferralOrNot + SaveSharedPreference.getLoggedInUserEmail(ConsumerCheckOutActivity.this);\n\n CustomVolleyRequest customVolleyRequest = new CustomVolleyRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n// {\n// \"isSuccess\": true,\n// \"errorMessage\": \"\",\n// \"data\": {\n// \"isHavingReffrral\": false\n// },\n// \"count\": 0\n// }\n Log.d(\"ReferralApplyResponse\", response);\n try {\n JSONObject jsonObject = new JSONObject(response);\n Boolean isSuccess = jsonObject.optBoolean(\"isSuccess\");\n if (isSuccess) {\n JSONObject dataObject = new JSONObject();\n if (jsonObject.has(\"data\")) {\n dataObject = jsonObject.getJSONObject(\"data\");\n }\n\n Boolean isHavingReffrral = dataObject.optBoolean(\"isHavingReffrral\");\n\n if (isHavingReffrral) {\n referralrootLayout.setVisibility(View.VISIBLE);\n\n Boolean isRefferalAppliedorNot = dataObject.optBoolean(\"isRefferalApplied\");\n\n if (isRefferalAppliedorNot) {\n checkReferral.setChecked(true);\n\n stateReferralAppliedorNot = true;\n } else {\n checkReferral.setChecked(false);\n\n stateReferralAppliedorNot = false;\n }\n } else {\n referralrootLayout.setVisibility(View.GONE);\n }\n\n\n getCartCheckOutItems(1, 1,true);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n stateReferralAppliedorNot = false;\n getCartCheckOutItems(1, 1,true);\n }\n }, consumerCheckOutActivity);\n ApplicationController.getInstance().addToRequestQueue(customVolleyRequest, \"having_referral_or_not\");\n\n\n }", "void handleBitcoinURI() {\n\n if (!bitcoinURI.isPresent()) {\n return;\n }\n\n BitcoinURI uri = bitcoinURI.get();\n Optional<Address> address = Optional.fromNullable(uri.getAddress());\n Optional<Coin> amount = Optional.fromNullable(uri.getAmount());\n\n if (address.isPresent()) {\n\n final Optional<Recipient> recipient;\n\n // Get the current wallet\n Optional<WalletSummary> currentWalletSummary = WalletManager.INSTANCE.getCurrentWalletSummary();\n\n if (currentWalletSummary.isPresent()) {\n\n // Attempt to locate a contact with the address in the Bitcoin URI to reassure user\n List<Contact> contacts = CoreServices\n .getOrCreateContactService(currentWalletSummary.get().getWalletId())\n .filterContactsByBitcoinAddress(address.get());\n\n if (!contacts.isEmpty()) {\n // Offer the first contact with the matching address (already null checked)\n Address bitcoinAddress = contacts.get(0).getBitcoinAddress().get();\n recipient = Optional.of(new Recipient(bitcoinAddress));\n recipient.get().setContact(contacts.get(0));\n } else {\n // No matching contact so make an anonymous Recipient\n recipient = Optional.of(new Recipient(address.get()));\n }\n\n } else {\n // No current wallet so make an anonymous Recipient\n recipient = Optional.of(new Recipient(address.get()));\n }\n\n // Must have a valid address and therefore recipient to be here\n enterAmountPanelModel\n .getEnterRecipientModel()\n .setValue(recipient.get());\n\n // Add in any amount or treat as zero\n enterAmountPanelModel\n .getEnterAmountModel()\n .setCoinAmount(amount.or(Coin.ZERO));\n }\n }", "@Override\n protected Void doInBackground(Void... params) {\n\n bjReq = new BookJobRequest(this, this);\n // sysid get from company list response\n bjReq.setSysID(mbook.getSysId() + \"\");\n bjReq.setReqType(\"1\");\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(_context);\n String phone = SharedPreferencesManager.loadStringPreferences(sharedPreferences, MBDefinition.SHARE_PHONE_NUMBER);\n String userName = SharedPreferencesManager.loadStringPreferences(sharedPreferences, MBDefinition.SHARE_NAME);\n bjReq.setPhoneNum(phone);\n bjReq.setPassengerName(userName);\n bjReq.setNumOfPassenger(\"1\");\n bjReq.setNumOfTaxi(\"1\");\n bjReq.setAdviseArrival(\"1\");\n bjReq.setForcedAddressFlag(\"Y\");\n bjReq.setPriority(\"N\");\n bjReq.setHardwareID(Utils.getHardWareId(_context));\n bjReq.setOSPVersion(\"3.0\");\n\n bjReq.setTaxiCompanyID(mbook.getDestID() + \"\");\n\n bjReq.setPickUpTime(mbook.getPickup_time());\n\n if (mbook.getPickup_unit() != null) {\n bjReq.setPickUpUnit(mbook.getPickup_unit());\n }\n\n bjReq.setPickupHouseNum(mbook.getPickup_house_number());\n bjReq.setPickUpStreetName(mbook.getPickup_street_name());\n bjReq.setPickUpDistrict(mbook.getPickup_district());\n bjReq.setPickUpLatitude(Double.toString(mbook.getPickup_latitude()));\n bjReq.setPickUpLongitude(Double.toString(mbook.getPickup_longitude()));\n bjReq.setZipCode(mbook.getPickup_zipCode());//TL-301 this is\n\n if (mbook.getDropoff_unit() != null) {\n bjReq.setDropOffUnit(mbook.getDropoff_unit());\n }\n\n if (mbook.getDropoff_house_number() != null) {\n bjReq.setDropOffHouseNum(mbook.getDropoff_house_number());\n }\n\n if (mbook.getDropoff_street_name() != null) {\n bjReq.setDropOffStreetName(mbook.getDropoff_street_name());\n }\n\n if (mbook.getDropoff_district() != null) {\n bjReq.setDropOffDistrict(mbook.getDropoff_district());\n }\n\n if (Utils.selected_attribute != null) {\n ArrayList<String> temp = new ArrayList<String>();\n for (int i = 0; i < Utils.selected_attribute.size(); i++) {\n temp.add(Utils.selected_attribute.get(i).toString());\n }\n bjReq.setAttributeList(temp);\n }\n\n String remark = mbook.getRemarks();\n for (int i = 0; i < MBDefinition.SPECIAL_CHAR_TO_REMOVE.length; i++) {\n remark = remark.replace(MBDefinition.SPECIAL_CHAR_TO_REMOVE[i], \"\");\n }\n\n bjReq.setRemark(remark);\n\n bjReq.sendRequest(_context.getResources().getString(R.string.name_space), _context.getResources().getString(R.string.url));\n\n return null;\n }", "@Override \n public void run() {\n\t\tString path = Urls.URL_32;\n\t\t\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"login-name-or-mobile\", username);\n\t\tmap.put(\"pwd\", password);\n\t \tList<BasicNameValuePair> params = HttpUtils.setParams(map);\n\t \t\n\t\tMap<String, String> map2 = new HashMap<String, String>();\n\t \tmap2.put(\"Accept-Encoding\", \"gzip, deflate\");\n\t \tmap2.put(\"Accept\", \"application/json\");\n\n\t \tMap<String,String> info = new HashMap<String,String>();\n\t\tString jsonStr = \"\";\n\t\ttry {\n\t\t\tjsonStr = RequestService.getInstance().getRequest(params, path, map2);\n\t\t\t\n\t\t\tif(jsonStr==null || \"null\".equals(jsonStr) || \"\".equals(jsonStr)){\n\t\t\t\tinfo.put(\"available\", \"0\");\n\t\t\t}else{\n\t\t\t\tHttpUtils.parseJson(jsonStr, info, null);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tMessage msg = new Message(); \n\t msg.what = Constants.NETWORK_ERROR;\n\t handler.sendMessage(msg); \n\t return;\n\t\t}\n\t\t\n Message msg = new Message(); \n msg.obj = info;\n msg.what = Constants.GET_BALANCE_SUCCESS;\n handler.sendMessage(msg); \n }", "@Override\n public void onCheckClick(String no, String deliv, String rtn, String delegate, String buyer, String status) {\n\n billNo = no;\n delivPlaceName = deliv;\n rtnPlaceName = rtn;\n consigneeCName = buyer;\n forwarderName = delegate;\n flowStatus = status;\n\n getDataList(false);\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tRestClient clint = new RestClient(utils.APP_URL + \"complaintResolvedByAgent\");\n\t\t\t\t\t\tclint.AddParam(\"complaintId\", \"\" + getIntent().getIntExtra(\"id\", 0));\n\t\t\t\t\t\tclint.AddParam(\"agentId\", utils.getAppParam(JobDetail.this, \"nameFeildId\"));\n\t\t\t\t\t\tclint.AddParam(\"satisfiedText\", satisfectionCode.getText().toString());\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tclint.Execute(RequestMethod.POST);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString response = clint.getResponse();\n\t\t\t\t\t\tif (response.length() > 0) {\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n Toast.makeText(JobDetail.this, \"Complaint resolved sucessfully\", Toast.LENGTH_SHORT).show();\n finish();\n MainActivity.act.actionBar.setSelectedNavigationItem(1);\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}", "@Override\n public void onCreate(Bundle savedInstanceState){\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_returntask);\n\n ListView BookListLV;\n\n BookListLV = findViewById(R.id.RETURNT_LVbooks);\n bookDataList = new ArrayList<>();\n bookAdapter = new ReturningTaskCustomList(this, bookDataList);\n BookListLV.setAdapter(bookAdapter);\n\n db = FirebaseFirestore.getInstance();\n mAuth = FirebaseAuth.getInstance();\n String currentUID = mAuth.getCurrentUser().getUid();\n collectionReference = db.collection(\"users\" + \"/\" + currentUID + \"/requested\");\n\n collectionReference.addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable\n FirebaseFirestoreException error) {\n bookDataList.clear();\n for(QueryDocumentSnapshot doc: queryDocumentSnapshots)\n {\n if (!doc.getData().containsKey(\"blank\")) {\n\n if (doc.getData().get(\"status\").toString().equals(\"borrowed\")) {\n ArrayList<String> owner = new ArrayList<>();\n owner.add(doc.getData().get(\"owners\").toString());\n\n Book book = new Book(doc.getData().get(\"title\").toString(),\n doc.getData().get(\"author\").toString(),\n owner.get(0), doc.getId().replace(\"-\", \"\"));\n //Log.e(\"ISB\", doc.getId());\n //Log.e(\"title\", doc.getData().get(\"title\").toString());\n bookDataList.add(book);\n }\n }\n }\n bookAdapter.notifyDataSetChanged();\n }\n });\n\n BookListLV.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n selectedISBN = bookDataList.get(i).getISBN();\n otherUID = bookDataList.get(i).getOwner();\n Log.e(\"SELECTED BOOK\", bookDataList.get(i).getTitle());\n Log.e(\"SELECTED BOOK ISBN\", bookDataList.get(i).getISBN());\n openScanner();\n\n }\n });\n\n }", "@Override\n public void run() {\n JSONObject ronfinfo = ConnectService\n .getIncidentbyHttpGet(AppConfig.URL_PUBLIC\n + \"Friend/ToApproveList?rongCloudIDs=\"\n + newbuilder);\n Log.e(\"url\", AppConfig.URL_PUBLIC\n + \"Friend/ToApproveList?rongCloudIDs=\" + newbuilder);\n List<AddFriend> addinfo = formatFrinds(ronfinfo);\n if (addinfo.size() > 0) {\n setFriendsNameTel(addinfo);\n }\n handler.obtainMessage(AppConfig.LOAD_FINISH).sendToTarget();\n }", "@Override\r\n public void onClick(View view) {\n if (count == 0){\r\n Toast.makeText(EachComponentActivity.this, \"Seriously! Zero components?\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n else if (Integer.parseInt(availStr) - count < 0){\r\n Toast.makeText(EachComponentActivity.this, \"Cool down! We don't have so many components available\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n\r\n // Network call for requesting to issue the component\r\n Call<BasicModel> requestComponent = memberAPI.requestComponent(token, id, Integer.toString(count));\r\n requestComponent.enqueue(new Callback<BasicModel>() {\r\n @Override\r\n public void onResponse(Call<BasicModel> call, retrofit2.Response<BasicModel> response) {\r\n String success = response.body().getSuccess().toString();\r\n String message = response.body().getMessage();\r\n Toast.makeText(EachComponentActivity.this, message, Toast.LENGTH_LONG).show();\r\n if (success.equals(\"true\")){\r\n Intent i = new Intent(EachComponentActivity.this, TabbedActivity.class);\r\n i.putExtra(\"name\", currentUsername);\r\n i.putExtra(\"email\", currentUserEmail);\r\n i.putExtra(\"regnum\", currentUserRegNum);\r\n i.putExtra(\"phonenum\", currentUserPhoneNum);\r\n i.putExtra(\"numissued\", numissue);\r\n i.putExtra(\"token\", token);\r\n startActivity(i);\r\n }\r\n confirmationDialog.dismiss();\r\n }\r\n\r\n @Override\r\n public void onFailure(Call<BasicModel> call, Throwable t) {\r\n confirmationDialog.dismiss();\r\n Toast.makeText(EachComponentActivity.this, \"An error occured\", Toast.LENGTH_LONG).show();\r\n t.printStackTrace();\r\n }\r\n });\r\n // End of the network call\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tThread t = new Thread(new Runnable() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tRestClient clint = new RestClient(utils.APP_URL + \"complaintResolvedByAgent\");\n\t\t\t\t\t\tclint.AddParam(\"complaintId\", \"\" + getIntent().getIntExtra(\"id\", 0));\n\t\t\t\t\t\tclint.AddParam(\"agentId\", utils.getAppParam(JobDetail.this, \"nameFeildId\"));\n\t\t\t\t\t\tclint.AddParam(\"satisfiedText\", satisfectionCode.getText().toString());\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tclint.Execute(RequestMethod.POST);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString response = clint.getResponse();\n\t\t\t\t\t\tif (response.length() > 0) {\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n Toast.makeText(JobDetail.this, \"Complaint resolved sucessfully\", Toast.LENGTH_SHORT).show();\n finish();\n MainActivity.act.actionBar.setSelectedNavigationItem(1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tt.start();\n\t\t\t}", "public void onClick(View v) {\n errMsg = \"\"; // error message from server side\n valid = 1; // check if login is valid or not\n String url = \"http://ec2-13-59-86-172.us-east-2.compute.amazonaws.com:3000/refresh\";\n JSONObject reqContent = new JSONObject();\n try {\n reqContent.put(\"username\", username);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n JsonObjectRequest jsObjRequest = new JsonObjectRequest(Request.Method.POST, url, reqContent, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n String status = response.get(\"status\").toString();\n\n if (status.equals(\"Failure\")) {\n valid = 0;\n errMsg = response.get(\"info\").toString();\n banner3.setText(errMsg);\n banner3.setBackgroundColor(Color.parseColor(\"#FF0000\"));\n }\n else {\n curr_balance = Integer.parseInt(response.get(\"amount\").toString()); // get the current balance from database\n userBalance.setText(\"\" + curr_balance);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n queue.add(jsObjRequest);//send the request\n }", "@Override\n public void onSuccess(Uri uri) {\n newBoysRoom = new BoysRoom();\n newBoysRoom.setRoomDescription(editTextRoomDescription.getText().toString());\n newBoysRoom.setBedNumber(editTextBedNumber.getText().toString());\n newBoysRoom.setRoom(chaletId);\n newBoysRoom.setStatus(\"available\");\n newBoysRoom.setImage(uri.toString());\n\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//httpclient.setRedirectHandler(new DefaultRedirectHandler() { });\n\t\tString[] urls = new String[10];\n\n\t\tString base_url = \"http://ec2-23-20-255-144.compute-1.amazonaws.com/fridge/\";\n\n\t\tString login \t\t\t\t=\tbase_url + \"login/\";\n\t\tString search_fridge_name \t=\tbase_url + \"search/?q=\";\n\t\tString search_fridge_id\t\t=\tbase_url + \"search-id/?q=\";\t//TODO add to django\n\t\tString search_upc \t\t\t=\tbase_url + \"search-upc/?q=\";\n\t\tString post_item \t\t\t=\tbase_url + \"update-item/\";\n\n\t\tIntent intent = this.getIntent();\n\t\tint flags = intent.getFlags();\n\t\tintent.getAction();\n\n\t\tBundle extras = null;\n\t\ttry{\n\t\t\textras = intent.getExtras();\n\t\t} catch (NullPointerException e) {\n\n\t\t}\n\t\tif(extras != null){\n\t\t\tif(extras.containsKey(\"upc\")){\n\t\t\t\tupc_from_intent = (String)extras.get(\"upc\");\n\t\t\t\tsearch_upc += upc_from_intent;\n\t\t\t\turls[nSEARCH_FOR_UPC] = search_upc;\n\t\t\t}else if(extras.containsKey(\"item_to_add\")){\n\t\t\t\tString item_to_add = (String)extras.get(\"item_to_add\");\n\t\t\t\turls[nADD_ITEM_URL] \t\t\t=\tpost_item;\n\t\t\t\turls[nADD_ITEM_HACK] \t\t\t= \titem_to_add;\n\t\t\t}else if(extras.containsKey(\"fridge_name\")){\n\t\t\t\tsearch_fridge_name \t+=\textras.getString(\"fridge_name\");\n\t\t\t\turls[nITEMS_FROM_FRIDGE_NAME] \t= \tsearch_fridge_name;\n\t\t\t}else if(extras.containsKey(\"fridge_id\")){\n\t\t\t\tsearch_fridge_id\t+=\textras.getInt(\"fridge_id\");\n\t\t\t\turls[nITEMS_FROM_FRIDGE_ID]\t\t=\tsearch_fridge_id;\n\t\t\t}else{\n\t\t\t\t//TODO return unknown extra detected\n\t\t\t}\n\t\t}else{\n\t\t\t//TODO return extra required\n\t\t}\n\n\n\t\tnew DownloadJsonItems().execute(urls);\n\t}", "@Override\r\n public void onStart() {\n System.out.println(\"Get Bill Details \");\r\n System.out.println(\"Get Bill Details URL \"+jobDecrypt(context.getString(R.string.url_inquire)));\r\n }", "public void requestToPutMyListItem(String bravoID, final IRequestListener iRequestListener, FragmentBasic fragmentBasic) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"Bravo_ID\", bravoID);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_PUT_MYLIST.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPut putMyListItem = new AsyncHttpPut(mContext, new AsyncHttpResponseProcess(mContext, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putFollow :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObPutMyList obPutMyList;\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n obPutMyList = gson.fromJson(response.toString(), ObPutMyList.class);\r\n iRequestListener.onErrorResponse(obPutMyList.error);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"Cannot save this item\");\r\n }\r\n }, params, true);\r\n AIOLog.d(url);\r\n putMyListItem.execute(url);\r\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 0) {\n// Log.e(\"scanned isbn in task\", result);\n\n if (resultCode == Activity.RESULT_OK || resultCode == RESULT_INCOMPLETE) {\n String result = data.getStringExtra(\"isbn\");\n\n if (selectedISBN.equals(result)) {\n Intent intent = new Intent(ReturningTaskActivity.this, SuccessExchangeActivity.class);\n intent.putExtra(\"RETURNER\", result);\n intent.putExtra(\"OTHER_UID\", otherUID);\n startActivity(intent);\n } else {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN did not match selected book!\",\n Toast.LENGTH_SHORT).show();\n }\n } else if (resultCode == RESULT_INVALID) {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN is not valid\",\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void OTP_Matchapi() {\n\n final ProgressDialog progressDialog = new ProgressDialog(Vendor_Booking_ConfirmDetails.this);\n progressDialog.setTitle(\"Loading..\");\n progressDialog.show();\n String url = BaseUrl + OTP_MATCH_by_vendor_usergiven;\n AndroidNetworking.post(url)\n .addBodyParameter(\"otp\", otp)\n .addBodyParameter(\"bookingId\", id)\n .addBodyParameter(\"vendor_id\", vid)\n .setPriority(Priority.MEDIUM)\n .build()\n .getAsJSONObject(new JSONObjectRequestListener() {\n @Override\n public void onResponse(JSONObject jsonObject) {\n\n System.out.println(\"booking_match_otp --- \" + \"otp \" + otp + \" bookid \" + id + \" vendor_id \" + vid);\n progressDialog.dismiss();\n try {\n\n String result = jsonObject.getString(\"job_status\");\n String msg = jsonObject.getString(\"start_time\");\n\n if (result.equalsIgnoreCase(\"Inprogress\")) {\n Log.e(\"otpmatchapiresponce- \", jsonObject.toString());\n progressDialog.dismiss();\n Startbooking();\n alertDialog.dismiss();\n } else {\n progressDialog.dismiss();\n alertDialog.dismiss();\n\n\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onError(ANError anError) {\n Log.e(\"error_my_join\", anError.toString());\n\n\n }\n });\n\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main2);\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n final ListView lv= (ListView) findViewById(R.id.lv);\n final Downloader d=new Downloader(this,url,lv);\n\n FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //EXECUTE DOWNLOAD\n d.execute();\n }\n });\n/*\n //program the choose telephone editText and button10 here to connect to database\n //using the send money buttons loginc, carrying the same arguments but different buttons\n Intent intent=getIntent();\n final String telephone=intent.getStringExtra(\"telephone\");\n //intent carried on from the android intent system as string telephone\n final Button button=(Button)findViewById(R.id.button10);\n final EditText telephone1=(EditText) findViewById(R.id.editText);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final String mytelephone=telephone1.getText().toString();\n //final String myamount=amount.getText().toString();\n final String telephone2=telephone;\n\n Response.Listener<String> responselistener=new Response.Listener<String>()\n {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonResponse=new JSONObject(response);\n boolean successfulRegistration=jsonResponse.getBoolean(\"success\");\n if(successfulRegistration){\n AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity2.this);\n builder.setMessage(\"Investment Successful\")\n .setNegativeButton(\"Okay\",null)\n .create()\n .show();\n\n }\n else {\n AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity2.this);\n builder.setMessage(\"Transaction Failed\")\n .setNegativeButton(\"Retry\",null)\n .create()\n .show();\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n };\n\n //class deduction should now receive the same parameters:-[\n MainActivityRequest mainActivityRequest=new MainActivityRequest(mytelephone,telephone2,responselistener);\n RequestQueue queue= Volley.newRequestQueue(MainActivity2.this);\n queue.add(mainActivityRequest);\n\n\n\n\n }\n });\n*/\n\n\n }", "@Override\n public void onItemClick(View view, int position) {\n\n if (isFrom.equals(\"StartJob\"))\n {\n if (jobStatus.equals(IsEditVehicle)) {\n\n String truck_name = listTrckAvailble.get(position).getCustomName();\n String truck_type = listTrckAvailble.get(position).getVehicle().getTruckType().getTruckTypeName();\n String truck_size = listTrckAvailble.get(position).getVehicle().getDimension();\n String truck_id = String.valueOf(listTrckAvailble.get(position).getProviderVehicleId());\n Intent i = new Intent();\n i.putExtra(\"isEdit\", \"isTruckEdit\");\n i.putExtra(\"truck_name\", truck_name);\n i.putExtra(\"truck_id\", truck_id);\n i.putExtra(\"truck_type\", truck_type);\n i.putExtra(\"truck_size\", truck_size);\n setResult(4, i);\n finish();\n } else {\n String driver_name = listAvailableDriver.get(position).getDriverName();\n String driver_email = listAvailableDriver.get(position).getDriverEmail();\n String driver_mobile = listAvailableDriver.get(position).getDriverPhone();\n String driver_id = String.valueOf(listAvailableDriver.get(position).getDriverId());\n String driver_image = listAvailableDriver.get(position).getDriverPic();\n Intent i = new Intent();\n i.putExtra(\"isEdit\", \"isDriverEdit\");\n i.putExtra(\"driver_id\", driver_id);\n i.putExtra(\"driver_email\", driver_email);\n i.putExtra(\"driver_mobile\", driver_mobile);\n i.putExtra(\"driver_name\", driver_name);\n i.putExtra(\"driver_image\", driver_image);\n setResult(4, i);\n finish();\n }\n }\n if (isFrom.equals(\"Posted\")) {\n// return the the selected values on the on actvity result of EditAvailbleDriverOrTruckActivity based on the job status\n if (jobStatus.equals(IsEditVehicle)) {\n String truck_name = listTrckAvailble.get(position).getCustomName();\n String truck_type = listTrckAvailble.get(position).getVehicle().getTruckType().getTruckTypeName();\n String truck_size = listTrckAvailble.get(position).getVehicle().getDimension();\n String truck_id = String.valueOf(listTrckAvailble.get(position).getProviderVehicleId());\n Intent i = new Intent();\n i.putExtra(\"isEdit\", \"isTruckEdit\");\n i.putExtra(\"truck_name\", truck_name);\n i.putExtra(\"truck_id\", truck_id);\n i.putExtra(\"truck_type\", truck_type);\n i.putExtra(\"truck_size\", truck_size);\n setResult(2, i);\n finish();\n } else {\n String driver_name = listAvailableDriver.get(position).getDriverName();\n String driver_email = listAvailableDriver.get(position).getDriverEmail();\n String driver_mobile = listAvailableDriver.get(position).getDriverPhone();\n String driver_id = String.valueOf(listAvailableDriver.get(position).getDriverId());\n String driver_image = listAvailableDriver.get(position).getDriverPic() ;\n Toast.makeText(getApplicationContext(),driver_id,Toast.LENGTH_SHORT).show();\n Intent i = new Intent();\n i.putExtra(\"isEdit\", \"isDriverEdit\");\n i.putExtra(\"driver_id\", driver_id);\n i.putExtra(\"driver_email\", driver_email);\n i.putExtra(\"driver_mobile\", driver_mobile);\n i.putExtra(\"driver_name\", driver_name);\n i.putExtra(\"driver_image\", driver_image);\n setResult(2, i);\n finish();\n }\n }\n }", "private void newVolume(){\n Intent intent = getIntent();\n\n id = intent.getStringExtra(\"Id\");\n\n newUrl = \"https://www.googleapis.com/books/v1/volumes/\"+id;\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, newUrl,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Log.d(\"RESPONSE\", \"onResponse: \" + response);\n\n parseJSONResponse(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"SHIT\", \"onErrorResponse: wrong\");\n }\n });\n queue.add(stringRequest);\n }", "public void returnBook(Copy copy){\n int BID = copy.BID;\n\n //Build URI\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(SCHEME)\n .authority(BASE_URL)\n .appendPath(PATH0)\n .appendPath(PATH1)\n .appendPath(PATH2)\n .appendQueryParameter(PARAM_ACTION, VALUE_ACTION_RETURN)\n .appendQueryParameter(PARAM_BID, Integer.toString(BID))\n .appendQueryParameter(PARAM_UID, Integer.toString(VALUE_UID))\n .appendQueryParameter(PARAM_PASSWORD, VALUE_PASSWORD)\n .build();\n\n String urlString = builder.toString();\n\n restartOnFinished = true;\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n prefEditor.remove(\"ALARM\" + BID + \"-TO\");\n prefEditor.remove(\"ALARM\" + BID + \"-BODY\");\n prefEditor.remove(\"ALARM\" + BID + \"-TITLE\");\n prefEditor.remove(\"ALARM-BID\" + BID);\n prefEditor.remove(\"ALARM\" + BID + \"-TYPE\");\n prefEditor.remove(\"ALARM\" + BID + \"-RING-TIME\");\n prefEditor.apply();\n\n downloadJSON(urlString);\n }", "@Override\n public void onClick(View view) {\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n DatabaseReference dbRef = firebaseDatabase.getReference().child(\"borrowed-book\");\n DatabaseReference updatedBRef = dbRef.child(bb.getBookName()+bb.getBorrowerId());\n Map<String, Object> status = new HashMap<>();\n status.put(\"status\", 0);\n updatedBRef.updateChildren(status);\n\n SharedPreferences pref = mContext.getSharedPreferences(mContext.getString(R.string.shared_pref),\n Context.MODE_PRIVATE);\n\n //remove returned book from list and reset books\n borrowed_books.remove(position);\n setBook(borrowed_books);\n\n //decrement no of books borrowed\n int no_books_borrowed = pref.getInt(mContext.getString(R.string.no_books_borrowed), MainActivity.default_no_pref);\n if(no_books_borrowed > 0) {\n SharedPreferences.Editor editor = pref.edit();\n editor.putInt(mContext.getString(R.string.no_books_borrowed), no_books_borrowed-1);\n editor.commit();\n }\n BookUpdateService.startActionUpdateWidget(mContext);\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 void placeOrder() {\n String url = APIBaseURL.placeOrder + SaveSharedPreference.getLoggedInUserEmail(ConsumerCheckOutActivity.this);\n\n CustomVolleyRequest stringRequest = new CustomVolleyRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n isOrderPlacedAPI = true;\n try {\n JSONObject jsonObject = new JSONObject(response);\n JSONObject dataObject = jsonObject.getJSONObject(\"data\");\n orderNumber = dataObject.optString(\"orderId\");\n\n if((offlineDelivery.isChecked())&&(offlinePayment.isChecked()))\n {\n Globaluse.orderInvoiceNo_str=orderNumber;\n\n }else\n {\n Intent intent = new Intent(ConsumerCheckOutActivity.this, CashFreePaymentWebActivity.class);\n intent.putExtra(\"paymentLink\", dataObject.optString(\"paymentLink\"));\n startActivityForResult(intent, 103);\n\n }\n\n // Globaluse.orderInvoiceNo_str=orderNumber;\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (error instanceof AuthFailureError) {\n //TODO\n ViewGroup viewGroup = ConsumerCheckOutActivity.this.findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(ConsumerCheckOutActivity.this).inflate(R.layout.access_token_expired_dialog, viewGroup, false);\n\n Button buttonreset = dialogView.findViewById(R.id.buttonreset);\n Button buttonOk = dialogView.findViewById(R.id.buttonOk);\n ImageView closeBtn = dialogView.findViewById(R.id.closeBtn);\n\n //Now we need an AlertDialog.Builder object\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(ConsumerCheckOutActivity.this);\n\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n android.app.AlertDialog alertDialog = builder.create();\n\n\n buttonOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n ConsumerMainActivity.logout();\n\n }\n });\n\n closeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n\n }\n });\n\n buttonreset.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n }\n });\n alertDialog.setCanceledOnTouchOutside(false);\n alertDialog.show();\n } else if (error instanceof NetworkError) {\n Toast.makeText(consumerCheckOutActivity, \"Cannot connect to Internet...Please check your connection!\", Toast.LENGTH_SHORT).show();\n }\n }\n }, consumerCheckOutActivity);\n ApplicationController.getInstance().addToRequestQueue(stringRequest, \"place_order_taq\");\n\n }", "public void checkEligibility(Context context, String url, final String disCode, final String wID){\n //mPostCommentResponse.requestStarted();\n queue = Volley.newRequestQueue(context);\n //Send data\n try {\n StringRequest postRequest = new StringRequest(\n Request.Method.POST,\n url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n JSONObject jsonObject;\n try {\n String err = \"\";\n jsonObject = new JSONObject(response);\n int success = jsonObject.getInt(\"success\");\n String message = jsonObject.getString(\"message\");\n if (success == 0) {\n Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_LONG).show();\n OrderingFragment.ticketApplied = true;\n\n } else if (success == 1) {\n Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n OrderingFragment.ticketApplied = false;\n }\n else {\n Toast.makeText(getActivity().getApplicationContext(), \"err\", Toast.LENGTH_SHORT).show();\n OrderingFragment.ticketApplied = false;\n }\n //show error\n if (err.length() > 0) {\n Toast.makeText(getActivity().getApplicationContext(), err, Toast.LENGTH_LONG).show();\n OrderingFragment.ticketApplied = false;\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity().getApplicationContext(), \"Error. \" + error.toString(), Toast.LENGTH_LONG).show();\n }\n }) {\n @Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n params.put(\"WalletID\", wID);\n params.put(\"CouponCode\",disCode);\n return params;\n }\n\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n return params;\n }\n };\n queue.add(postRequest);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\tif(new ConnectionDetector(context).isConnectingToInternet()){\n\t\t\t\t\t\t\t\t\t\tMyspinner sp1 = (Myspinner)districtlist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp2 = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp3 = (Myspinner)retailerslist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp4 = (Myspinner)activitieslist.getSelectedItem();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t&& mandilist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& retailerslist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& activitieslist.getSelectedItemPosition()!=0){\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd\").format(dt);\n\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> id = new GetData(context, db).getVillageId(villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tif(id.size()>0 && id.get(0).length()>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), id.get(0), villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), \"0\", villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\talert.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select District\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mandilist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Mandi\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(retailerslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Retailer\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(activitieslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Activity\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"No Network Found\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n platform = spPlatform.getSelectedItem().toString();\n username = tbUsername.getText().toString();\n\n //changing the string value that will be appended to the HttpRequest url in the\n //next activity\n switch (platform) {\n case \"Xbox\":\n platform = \"xbl\";\n break;\n case \"PC\":\n platform = \"pc\";\n break;\n case \"PlayStation\":\n platform = \"psn\";\n break;\n }\n\n //if the username is not empty run this block of code\n if(!username.equals(\"\")) {\n\n //creating a new intent\n Intent screenChange = new Intent(getApplicationContext(), StatScreen.class);\n //creating a bundle to store the variables that will be passed into the next\n //activity\n Bundle bndleStorage = new Bundle();\n bndleStorage.putString(\"platform\", platform);\n bndleStorage.putString(\"username\", username);\n bndleStorage.putInt(\"bg\", bgChoice);\n screenChange.putExtras(bndleStorage);\n //starting our activity for a result\n startActivityForResult(screenChange, 1);\n\n //if the username is empty, display a toast message to the user\n } else {\n Toast.makeText(getApplicationContext(), \"Please enter a username\", Toast.LENGTH_SHORT).show();\n }\n }", "java.lang.String getBookingURL();", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Book currentBook = adapter.getItem(position);\n\n // Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri bookUri = Uri.parse(currentBook.getUrl());\n\n // Create a new intent to view the book URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, bookUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }", "@Override\n public void onReceive(Context arg0, Intent intent) {\n if(intent.getAction().equals(Constants.GRAB_ORDER_FAIL_ACTION)){\n currentItem = 0;\n requestOrderList(Url.RecommendOptimalOrder);\n }\n if(intent.getAction().equals(Constants.GRAB_ORDER_SUCCESS_ACTION) || intent.getAction().equals(Constants.DISPATCH_ORDER_SUCCESS_ACTION) || intent.getAction().equals(Constants.CANCLE_GRABBED_ORDER_ACTION) ){\n currentItem = 1;\n requestOrderList(Url.GetHaveGrabbedOrder);\n }\n if(intent.getAction().equals(Constants.IS_OPERATING_STATE_ORDER_ACTION)){\n currentItem = 2;\n requestOrderList(Url.GetIsOperatingOrder);\n }\n if(intent.getAction().equals(Constants.OPERATED_ORDER_ACTION) || intent.getAction().equals(Constants.CANCLE_ORDER_ACTION)){\n currentItem = 3;\n requestOrderList(Url.GetOperatedOrder);\n }\n\n }", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString string = intent.getExtras().getString(Constants.INTENT_RECEIVER);\n\t\t\t\n\t\t\t\n\t\t\tif (string.equals(Constants.LOADING)) {\n\t\t\t\tcode = intent.getStringExtra(\"code\");\n\t\t\t\tbookCurrent = intent.getIntExtra(\"current\", 0);\n\t\t\t\tfileCurrent = intent.getIntExtra(\"fileCurrent\", 0);\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\t\t\t\n\t\t\tif (string.equals(Constants.PHONE_DOWNLOAD)) {\n\t\t\t\tMyLog.d(TAG, \"here is download receiver******************* \");\n\t\t\t\tgetData();\n\t\t\t\tcandelete =-1;\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}", "private synchronized void getpickuplist() {\n\n if (Utility.isConnectingToInternet(getActivity())) {\n if (mGpsTracker.canGetLocation()) {\n if (Utility.ischeckvalidLocation(mGpsTracker)) {\n try {\n disableEmptyView();\n setUpDummyPickUpAdapter();\n Map<String, String> param = new HashMap<>();\n if (!AppConstants.isGestLogin(getActivity())) {\n param.put(\"iduser\", SharedPref.getInstance().getStringVlue(getActivity(), userId));\n param.put(\"latitude\", \"\" + mGpsTracker.getLatitude());\n param.put(\"longitude\", \"\" + mGpsTracker.getLongitude());\n } else {\n param.put(\"iduser\", \"0\");\n param.put(\"latitude\", \"\" + mGpsTracker.getLatitude());\n param.put(\"longitude\", \"\" + mGpsTracker.getLongitude());\n if (AppConstants.getGender(getActivity()) != null && AppConstants.getGender(getActivity()) != \"\") {\n param.put(\"gender_pref\", AppConstants.getGender(getActivity()));\n } else {\n param.put(\"gender_pref\", \"Both\");\n }\n\n if (AppConstants.getRadius(getActivity()) != null && AppConstants.getRadius(getActivity()) != \"\") {\n param.put(\"radius_limit\", AppConstants.getRadius(getActivity()));\n } else {\n param.put(\"radius_limit\", \"100\");\n }\n }\n\n\n // param.put(\"iduser\", \"\" + SharedPref.getInstance().getIntVlue(getActivity(), USER_TYPE));\n if (!isRefresh) {\n progressWheel.setVisibility(View.VISIBLE);\n progressWheel.startAnimation();\n }\n btn_buddyup.setEnabled(false);\n btn_pickup.setEnabled(false);\n if (!AppConstants.isGestLogin(getActivity())) {\n RequestHandler.getInstance().stringRequestVolley(getActivity(), AppConstants.getBaseUrl(SharedPref.getInstance().getBooleanValue(getActivity(), isStaging)) + pickuplist, param, this, 1);\n } else {\n RequestHandler.getInstance().stringRequestVolley(getActivity(), AppConstants.getBaseUrl(SharedPref.getInstance().getBooleanValue(getActivity(), isStaging)) + \"pickuplist_guest\", param, this, 1);\n\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"Error on PickUp List\", \"\" + e.toString());\n }\n } else {\n mGpsTracker.showInvalidLocationAlert();\n }\n } else {\n showSettingsAlert(PICKUPUPREQUESTCODE);\n }\n } else {\n showNoInternetEmptyView();\n Utility.showInternetError(getActivity());\n }\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tMap<String, Object> obj = list.get(arg2);\n\t\t\t\tString flagIDStr = obj.get(\"tv_nfc\").toString();\n\n\t\t\t\tflagIDStr = \"048FCBFA463D80\";\n\t\t\t\tString url = \"py_r/2018\";\n\t\t\t\tJSONObject pkg = new JSONObject();\n\t\t\t\ttry {\n\t\t\t\t\tpkg.put(\"username\", userBean.getUserName());\n\t\t\t\t\tpkg.put(\"stime\", \"2014-01-01 12:00:00\");\n\t\t\t\t\tpkg.put(\"etime\", \"9999-11-30 12:00:00\");\n\t\t\t\t\tpkg.put(\"par_id\", flagIDStr);\n\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tStringEntity entity = null;\n\t\t\t\ttry {\n\t\t\t\t\tentity = new StringEntity(pkg.toString());\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tRequestAPIClient.post(FragmentManagementHistoryResult.this.getActivity(), url,\n\t\t\t\t\t\tentity, new AsyncHttpResponseHandler() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onSuccess(int arg0, Header[] arg1,\n\t\t\t\t\t\t\t\t\tbyte[] response) {\n\t\t\t\t\t\t\t\tif (response == null) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tString responseStr = \"\";\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tresponseStr = new String(response, \"UTF-8\");\n\t\t\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tJSONTokener jsonParser = new JSONTokener(\n\t\t\t\t\t\t\t\t\t\t\tresponseStr);\n\t\t\t\t\t\t\t\t\tJSONObject userObj = (JSONObject) jsonParser\n\t\t\t\t\t\t\t\t\t\t\t.nextValue();\n\t\t\t\t\t\t\t\t\t// 接下来的就是JSON对象的操作了\n\t\t\t\t\t\t\t\t\tString code = userObj.getString(\"code\");\n\n\t\t\t\t\t\t\t\t\tif (code.equals(RequestAPIClient.STATUS_FAIL)) {\n\t\t\t\t\t\t\t\t\t\tString errStr = userObj.getString(\"msg\");\n\t\t\t\t\t\t\t\t\t\tif (\"\".equals(errStr)) {\n\t\t\t\t\t\t\t\t\t\t\terrStr = \"非法的标签\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tnew AlertDialog.Builder(\n\t\t\t\t\t\t\t\t\t\t\t\tFragmentManagementHistoryResult.this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getActivity())\n\t\t\t\t\t\t\t\t\t\t\t\t.setTitle(\"提示\")\n\t\t\t\t\t\t\t\t\t\t\t\t.setMessage(errStr)\n\t\t\t\t\t\t\t\t\t\t\t\t.setIcon(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tandroid.R.drawable.ic_dialog_info)\n\t\t\t\t\t\t\t\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"确定\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}).show();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tJSONArray msgArray = userObj.getJSONArray(\"msg\");\n\t\t\t\t\t\t\t\t\t\t// {\"recv_lid\":\"5\",\"recv_name\":\"1\",\"alname\":\"01\",\"dist_time\":\"2014-11-10T16:51:12.000Z\",\"par_id\":\"0442d37abe3480\",\"send_lid\":\"2\",\"send_name\":\"97\"}\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < msgArray.length(); i++) {\n\t\t\t\t\t\t\t\t\t\t\tJSONObject oj = msgArray.getJSONObject(i);\n\t\t\t\t\t\t\t\t\t\t\tManagementChainBean chainBean = new ManagementChainBean();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tString time = oj.getString(\"dist_time\");\n\t\t\t\t\t\t\t\t\t\t\tString sendLID = oj.getString(\"send_lid\");\n\t\t\t\t\t\t\t\t\t\t\tString sendID = oj.getString(\"send_name\");\n\t\t\t\t\t\t\t\t\t\t\tString sendLName = Helper.getLevelName(levelList, sendLID);\n\t\t\t\t\t\t\t\t\t\t\tString sendName = Helper.getUserNameByID(userInfoList, sendID);\n\t\t\t\t\t\t\t\t\t\t\tString recvLID = oj.getString(\"recv_lid\");\n\t\t\t\t\t\t\t\t\t\t\tString recvID = oj.getString(\"recv_name\");\n\t\t\t\t\t\t\t\t\t\t\tString recvLName = Helper.getLevelName(levelList, recvLID);\n\t\t\t\t\t\t\t\t\t\t\tString recvName = Helper.getUserNameByID(userInfoList, recvID);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setTime(time);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setSendLID(sendLID);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setSendID(sendID);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setSendLName(sendLName);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setSendName(sendName);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setRecvLID(recvLID);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setRecvID(recvID);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setRecvLName(recvLName);\n\t\t\t\t\t\t\t\t\t\t\tchainBean.setRecvName(recvName);\n\t\t\t\t\t\t\t\t\t\t\tmgntChainList.add(chainBean);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\t\t\t\t\t\tbundle.putSerializable(\"CHAINBEANs\", mgntChainList);\n\n\t\t\t\t\t\t\t\t\t\tFragmentManagementHistoryResultDetail fResult = new FragmentManagementHistoryResultDetail();\n\t\t\t\t\t\t\t\t\t\tFragmentManager fm = getFragmentManager();\n\t\t\t\t\t\t\t\t\t\tFragmentTransaction tx = fm.beginTransaction();\n\t\t\t\t\t\t\t\t\t\tfResult.setArguments(bundle);\n\t\t\t\t\t\t\t\t\t\ttx.add(R.id.main_details, fResult);\n\t\t\t\t\t\t\t\t\t\ttx.addToBackStack(null);\n\t\t\t\t\t\t\t\t\t\ttx.commit();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (JSONException ex) {\n\t\t\t\t\t\t\t\t\tString errStr = \"非法的标签\";\n\t\t\t\t\t\t\t\t\tnew AlertDialog.Builder(\n\t\t\t\t\t\t\t\t\t\t\tFragmentManagementHistoryResult.this.getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.setTitle(\"提示\")\n\t\t\t\t\t\t\t\t\t\t\t.setMessage(errStr)\n\t\t\t\t\t\t\t\t\t\t\t.setIcon(android.R.drawable.ic_dialog_info)\n\t\t\t\t\t\t\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"确定\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}).show();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\t\t\tnew AlertDialog.Builder(FragmentManagementHistoryResult.this\n\t\t\t\t\t\t\t\t\t\t.getActivity())\n\t\t\t\t\t\t\t\t\t\t.setTitle(\"提示\")\n\t\t\t\t\t\t\t\t\t\t.setMessage(\"服务器请求失败\")\n\t\t\t\t\t\t\t\t\t\t.setIcon(android.R.drawable.ic_dialog_info)\n\t\t\t\t\t\t\t\t\t\t.setPositiveButton(\"确定\",\n\t\t\t\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}).show();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Book currentBook = mAdapter.getItem(position);\n\n // Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri bookUri = Uri.parse(currentBook.getBookPreviewUrl());\n\n // Create a new intent to view the book URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, bookUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 325) {\n if (resultCode == Activity.RESULT_OK) {\n String result = data.getStringExtra(\"RESULT_ISBN\");\n if (result.equals(clickedBook.getISBN())){\n //owner confirm receive returned book\n Toast.makeText(getActivity(), \"You successfully received this book\", Toast.LENGTH_SHORT).show();\n currentBookDocRef.update(\"returnDenoted\",\"false\");\n currentBookDocRef.update(\"status\",\"Available\");\n currentBookDocRef.update(\"borrowerID\", FieldValue.delete());\n currentBookDocRef.update(\"borrowerUname\", FieldValue.delete());\n currentBookDocRef.update(\"lat\", FieldValue.delete());\n currentBookDocRef.update(\"lng\", FieldValue.delete());\n borrowerSideBorrowedBookRef.update(\"returnDenoted\",\"false\");\n\n // for borrower,remove book from BorrowedBook\n borrowerSideBorrowedBookRef.delete();\n\n }\n else {\n Toast.makeText(getActivity(), \"The ISBN you scaned does not match the ISBN of the book\", Toast.LENGTH_SHORT).show();\n\n }\n }\n }\n }", "public void suit_me_listner(Uri uri);", "public void buyTicket(View v)\n {\n final String event_id = Integer.toString(v.getId());\n final String user_id = preferenceConfig.LoadUserId();\n final String key = UUID.randomUUID().toString().replaceAll(\"-\", \"\");\n\n URL_ADDTICKET = getString(R.string.URL_ADDTICKET);\n\n StringRequest stringRequest = new StringRequest(Request.Method.POST, URL_ADDTICKET,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonObject = new JSONObject(response);\n String success = jsonObject.getString(\"success\");\n\n if(success.equals(\"1\")){\n Toast.makeText(getContext(),\"Ticket ID: \" + key,Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e){\n e.printStackTrace();\n Toast.makeText(getContext(),\"Cannot buy ticket. Error: \" + e.toString(),Toast.LENGTH_LONG).show();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getContext(),\"Cannot buy ticket. Error: \" + error.toString(),Toast.LENGTH_LONG).show();\n }\n })\n {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String,String> params = new HashMap<>();\n params.put(\"event_id\", event_id);\n params.put(\"user_id\", user_id);\n params.put(\"key\", key);\n return params;\n }\n };\n\n RequestQueue requestQueue = Volley.newRequestQueue(getContext());\n requestQueue.add(stringRequest);\n }", "public void onClicked(View check, View emailTxt, View passwordTxt) {\n\n try {\n email = ((EditText) emailTxt).getText().toString();\n password = ((EditText) passwordTxt).getText().toString();\n CheckBox checkbox = ((CheckBox) check);\n\n\n if (!email.isEmpty() && !password.isEmpty()) {\n\n SharedPreference_Login login=new SharedPreference_Login(activity);\n\n //check the auth data saved\n if (new SharedPreference_Auth(activity).IsExpired()\n && (email.equals(login.emailOriginal())&&password.equals(login.passwordOriginal())))\n {\n\n Intent intent = new Intent(activity, ActivityMain.class);\n activity.startActivity(intent);\n activity.finish();\n\n\n } else {\n JsonReceiver jsonReceiver = new JsonReceiver(activity, \"https://puresoftware.org/user/en/oauth2/access/token.json\");\n Map<String, String> parser = new HashMap<String, String>();\n parser.put(\"grant_type\", \"password\");\n parser.put(\"username\", email);\n parser.put(\"password\", password);\n parser.put(\"scope\", \"climax\");\n jsonReceiver.post(parser,processor);\n }\n } else {\n checkbox.setChecked(false);\n ((EditText) emailTxt).getText().clear();\n ((EditText) passwordTxt).getText().clear();\n Toast.makeText(activity, \"please fill text boxes\", Toast.LENGTH_LONG).show();\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n createBookingTimeStart.localTimeProperty().set(LocalTime.of(0,0));\n createBookingTimeEnd.localTimeProperty().set(LocalTime.of(0,0));\n \n booking = new Booking();\n \n \n createBookingType.getItems().addAll(dbH.getBookingTypes(2).toArray(new String[dbH.getBookingTypes(2).size()]));\n \n createBookingMechanic.getItems().addAll(getMechanicNames(dbH.getAllMechanics())); \n \n }", "private void performOAuthLogin(View arg) {\n hideKeyboard(arg);\n // Pass the username and password to the OAuth login activity for OAuth login.\n // Once the login is successful, we automatically check in the merchant in the OAuth activity.\n Intent intent = new Intent(LoginScreenActivity.this, OAuthLoginActivity.class);\n intent.putExtra(\"username\", mUsername);\n intent.putExtra(\"password\", mPassword);\n String serverName = mServerName;\n if(null != serverName && serverName.equals(PayPalHereSDK.ControlledSandbox)){\n serverName = PayPalHereSDK.Live;\n }\n intent.putExtra(\"servername\",serverName);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n\n if (v == button_cancel) {\n\n this.finish();\n\n } else if (v == button_next && checkSpinner()) {\n\n if (InternetConnection.checkNetworkConnection(context)) {\n\n\n String url = ApplicationData.URL_CHARACTERISTIC + person_id;\n new PutAsync().execute(url, createJsonBody());\n\n Log.e(\"JSOn BOdy \", createJsonBody());\n Log.e(\"URL are \", url);\n\n } else {\n\n Toast.makeText(getApplicationContext(),ApplicationData.OFFLINE_SAVED_SUCCESSFULLY,Toast.LENGTH_LONG).show();\n ApplicationData.writeToFile(this, ApplicationData.OFFLINE_DB_HOUSE_HOLD_CHARACTERISTICS, createJsonBody());\n finish();\n }\n\n }\n\n }", "public void executeRequest() throws CloneNotSupportedException {\n\t\t\n\t\tfor (BookingRequest bookingRequest : bookingRequestList) {\n\t\t\tCab assignedCab = null;\n\t\t\tdouble bestProfitMargin = 0;\n\t\t\tfor (Cab cabDetail : cabDetailList) {\n\t\t\t\t//check the business logic for booking cabs\n\t\t\t\tboolean checkCabReachability = checkCabReachability(bookingRequest, cabDetail);\n\t\t\t\tdouble cabProfitMargin = checkCabProfitMargin(bookingRequest, cabDetail);\n\t\t\t\t\n\t\t\t\tif (checkCabReachability && (cabProfitMargin > bestProfitMargin)) {\n\t\t\t\t\t assignedCab = cabDetail;\n\t\t\t\t\t bestProfitMargin = cabProfitMargin;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (assignedCab != null) {\n\t\t\t\tbookingRequest.setAssignedCab(assignedCab.clone());\n\t\t\t\t//adding o calculate profit\n\t\t\t\tbookingRequest.setProfit(bestProfitMargin);\n\t\t\t\tCalendar newCabTime = bookingRequest.getPickUpTime();\n\t\t\t\tInteger tripDistance = Utils.calculateDistance(bookingRequest.getPickUpArea(), bookingRequest.getDropArea());\n\t\t\t\tnewCabTime.add(Calendar.MINUTE, tripDistance * Constants.DISTANCE_BETWEEN_AREA);\n\t\t\t\tassignedCab.setCurrentLocationTime(newCabTime);\n\t\t\t\tassignedCab.setInitialLocation((Area)bookingRequest.getDropArea().clone());\n\t\t\t}\n\t\t}\n\t\t//finally displaying the response from the application\n\t\tdisplayMappingOfCabs(bookingRequestList);\n\t}", "public void sendOfferToServer(Offers offer, String userId, String state)\n {\n client = new DefaultHttpClient();\n post = new HttpPost(urlString);\n try {\n List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();\n\n nameValuePairs.add(new BasicNameValuePair(\"registerOffer\", \"registerOffer\"));\n nameValuePairs.add(new BasicNameValuePair(\"userId\", userId));\n\n nameValuePairs.add(new BasicNameValuePair(\"id\", offer.getId()));\n nameValuePairs.add(new BasicNameValuePair(\"brand_id\", offer.getBrand_id()));\n nameValuePairs.add(new BasicNameValuePair(\"clothes_id\", offer.getClothes_id()));\n nameValuePairs.add(new BasicNameValuePair(\"style_id\", offer.getStyle_id()));\n nameValuePairs.add(new BasicNameValuePair(\"discount\", offer.getDiscount().toString()));\n nameValuePairs.add(new BasicNameValuePair(\"gender\", offer.getGender()));\n nameValuePairs.add(new BasicNameValuePair(\"minage\", offer.getMinage().toString()));\n nameValuePairs.add(new BasicNameValuePair(\"maxage\", offer.getMaxage().toString()));\n nameValuePairs.add(new BasicNameValuePair(\"url\", offer.getUrl()));\n nameValuePairs.add(new BasicNameValuePair(\"bluetooth_id\", offer.getBluetooth_id()));\n nameValuePairs.add(new BasicNameValuePair(\"creation_time\", offer.getCreation_time()));\n nameValuePairs.add(new BasicNameValuePair(\"state\", state));\n\n post.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n client.execute(post);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void showcomplaints(String url2){\r\n\r\n lvProduct = (ListView) findViewById(R.id.listview_product);\r\n mProductList = new ArrayList<>();\r\n RequestQueue rq = Volley.newRequestQueue(this);\r\n StringRequest s1 = new StringRequest(Request.Method.GET, url2,\r\n new Response.Listener<String>() {\r\n @Override\r\n\r\n public void onResponse(String response) {\r\n // JSON Parsing\r\n try {\r\n JSONObject resp = new JSONObject(response);\r\n JSONArray complaints = resp.getJSONArray(\"complaints\");\r\n\r\n if(complaints.length()==0){\r\n mProductList.add(new Product(0, \"NO COMPLAINTS\",\"\",\"\",\"\"));\r\n }\r\n Bundle extras2 = getIntent().getExtras();\r\n final String hostel = extras2.getString(\"hostel\");\r\n final String validid = extras2.getString(\"validid\");\r\n\r\n //list of all complaints is stored to the adarter\r\n for (int i = 0; i < complaints.length(); i++) {\r\n JSONObject list = complaints.getJSONObject(i);\r\n JSONObject complaint = list.getJSONObject(\"complaints\");\r\n JSONObject user = list.getJSONObject(\"users\");\r\n String name = user.getString(\"name\");\r\n String hostel1 = user.getString(\"hostel\");\r\n String title = complaint.getString(\"title\");\r\n int complaint_status = complaint.getInt(\"complaint_status\");\r\n String description = complaint.getString(\"description\");\r\n int complaint_type = complaint.getInt(\"complaint_type\");\r\n String id = complaint.getString(\"id\");\r\n String posted_at = complaint.getString(\"posted_at\");\r\n String userid = complaint.getString(\"user_id\");\r\n String concernedid = complaint.getString(\"concerned_user\");\r\n String type,status;\r\n\r\n if (complaint_status==1){status =\"Status: Resolved\";}\r\n else {status = \"Status: Unresolved\";}\r\n\r\n if(complaint_type == 1){type = \"Type: Hostel Level\";}\r\n else if(complaint_type == 2){type = \"Type: Institute Level\";}\r\n else {type = \"Type: Individual Level\";}\r\n\r\n\r\n //filters the list of complaints according to the logged in user\r\n if(complaint_type==2) {\r\n mProductList.add(new Product(i + 1, \"Title: \" + title, type + \"\\n\" + status, \"Posted by: \" + name + \"\\nPosted at: \"+ posted_at, id));\r\n }\r\n else if(complaint_type==1 && (hostel1.equals(hostel))){\r\n mProductList.add(new Product(i + 1, \"Title: \" + title, type + \"\\n\" + status, \"Posted by: \" + name + \"\\nPosted at: \"+ posted_at, id));\r\n }\r\n else if(complaint_type==0 && (validid.equals(concernedid) || validid.equals(userid)) ) {\r\n mProductList.add(new Product(i + 1, \"Title: \" + title, type + \"\\n\" + status, \"Posted by: \" + name + \"\\nPosted at: \"+ posted_at, id));\r\n }\r\n }\r\n adapter = new ProductAdapter(getApplicationContext(), mProductList);\r\n lvProduct.setAdapter(adapter);\r\n\r\n //on item click\r\n lvProduct.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n\r\n //calls the listactivity to show details of a particular complaint\r\n Intent nextScreen = new Intent(getApplicationContext(), ListActivity.class);\r\n nextScreen.putExtra(\"complaint_id\",mProductList.get(position).getCredits());\r\n startActivity(nextScreen);\r\n\r\n }\r\n }\r\n );\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }\r\n },\r\n //giving volley error\r\n\r\n new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Dialog(error.toString(),\"error\");\r\n }\r\n }\r\n\r\n ){\r\n\r\n /*public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map<String, String> getHeader = new HashMap<String, String>();\r\n getHeader.put(\"Cookie\",LoginActivity.use.getString(\"Set-Cookie\",\"\"));\r\n return getHeader;\r\n }*/\r\n };\r\n\r\n\r\n rq.add(s1);\r\n\r\n }", "private void changeStatus(){\n\n StringRequest sringRequest = new StringRequest(Request.Method.POST,\n Constants.CHANGE_STATUS_DELIVERY,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n // progressDialog.dismiss();\n try {\n JSONObject jsonObject = new JSONObject(response);\n\n String message = jsonObject.getString(\"message\");\n\n Toast.makeText(DetailDelivery.this, message, Toast.LENGTH_LONG).show();\n\n\n } catch (JSONException e) {\n Log.e(\"JsonException\", e.toString());\n Toast.makeText(getApplicationContext(), Constants.ERROR_MESSAGE, Toast.LENGTH_LONG).show();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // progressDialog.hide();\n Log.e(\"Volley Error\",error.toString());\n Toast.makeText(getApplicationContext(),Constants.ERROR_MESSAGE,Toast.LENGTH_LONG).show();\n }\n })\n {\n @Override\n protected Map<String, String> getParams() {\n\n Map<String,String> params = new HashMap<>();\n\n params.put(\"status\",delivery_status.getSelectedItem().toString());\n params.put(\"email\",email_delivery.getText().toString());\n params.put(\"order_id\",order_id.getText().toString());\n\n return params;\n }\n };\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(sringRequest);\n }", "public Book(String title, String isbn, String author, String description, String owner, String borrower, String status, ArrayList<String> requests) {\n this.title = title;\n this.isbn = isbn;\n this.author = author;\n this.description = description;\n this.owner = owner;\n this.borrower = borrower;\n this.status = status;\n this.requests = requests;\n }", "@Override\n public void onClick(View v) {\n try {\n Intent callIntent = new Intent(Intent.ACTION_CALL);\n callIntent.setData(Uri.parse(\"tel:\" + books.getBuy()));\n context.startActivity(callIntent);\n\n } catch (ActivityNotFoundException e) {\n Log.e(\"helloandroid dialing \", \"Call failed\", e);\n }\n }", "public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootview = inflater.inflate(R.layout.myjob_converted, container, false);\n init(rootview);\n\n IntentFilter filter = new IntentFilter();\n filter.addAction(\"com.app.MyJob_Completed_Fragment\");\n convertedReciver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n\n System.out.println(\"ongoing---------\");\n Str_type = (String) intent.getExtras().get(\"Type\");\n Str_sortby = (String) intent.getExtras().get(\"SortBy\");\n Str_orderby = (String) intent.getExtras().get(\"OrderBy\");\n Str_from = (String) intent.getExtras().get(\"from\");\n Str_to = (String) intent.getExtras().get(\"to\");\n\n postJobRequestSorting(ServiceConstant.myjobs_sortingurl, Str_type);\n\n System.out.println(\"sortancompletedl-------\" + ServiceConstant.myjobs_sortingurl);\n\n }\n };\n getActivity().registerReceiver(convertedReciver, filter);\n\n\n Rl_myjob_converted_empty_editprofile_layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Intent intent = new Intent(getActivity(), EditProfilePage.class);\n startActivity(intent);\n getActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n\n }\n });\n\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n isInternetPresent = cd.isConnectingToInternet();\n if (isInternetPresent) {\n Intent intent = new Intent(getActivity(), MyJobs_OnGoingDetailPage.class);\n intent.putExtra(\"JobId\", convertedlist.get(position).getOrder_id());\n startActivity(intent);\n getActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n\n } else {\n Alert(getResources().getString(R.string.alert_label_title), getResources().getString(R.string.alert_nointernet));\n }\n\n\n }\n });\n\n listView.setOnScrollListener(new AbsListView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n int threshold = 1;\n int count = listView.getCount();\n if (scrollState == SCROLL_STATE_IDLE) {\n if (listView.getLastVisiblePosition() >= count - threshold && !(loadingMore)) {\n if (swipeRefreshLayout.isRefreshing()) {\n //nothing happen(code to block loadMore functionality when swipe to refresh is loading)\n } else {\n if (show_progress_status) {\n ConnectionDetector cd = new ConnectionDetector(getActivity());\n boolean isInternetPresent = cd.isConnectingToInternet();\n\n if (isInternetPresent) {\n Rl_myjob_converted_main_layout.setVisibility(View.VISIBLE);\n Rl_myjob_converted_nointernet_layout.setVisibility(View.GONE);\n layout_nojobs_converted.setVisibility(View.GONE);\n myjob_LoadMore_converted_PostRequest(getActivity(), ServiceConstant.MYJOBON_LIST_URL);\n System.out.println(\"--------------newleads_loadmore-------------------\" + ServiceConstant.MYJOBON_LIST_URL);\n } else {\n Rl_myjob_converted_main_layout.setVisibility(View.GONE);\n Rl_myjob_converted_nointernet_layout.setVisibility(View.VISIBLE);\n layout_nojobs_converted.setVisibility(View.GONE);\n\n\n }\n }\n }\n }\n }\n }\n\n @Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n boolean enable = false;\n\n if (firstVisibleItem == 0) {\n swipeRefreshLayout.setEnabled(true);\n } else {\n swipeRefreshLayout.setEnabled(false);\n }\n\n }\n });\n\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n\n ConnectionDetector cd = new ConnectionDetector(getActivity());\n boolean isInternetPresent = cd.isConnectingToInternet();\n\n if (isInternetPresent) {\n Rl_myjob_converted_main_layout.setVisibility(View.VISIBLE);\n Rl_myjob_converted_nointernet_layout.setVisibility(View.GONE);\n layout_nojobs_converted.setVisibility(View.GONE);\n\n asyntask_name = \"swipe\";\n myjob_converted_PostRequest(getActivity(), ServiceConstant.MYJOBON_LIST_URL);\n } else {\n swipeRefreshLayout.setRefreshing(false);\n Rl_myjob_converted_main_layout.setVisibility(View.GONE);\n Rl_myjob_converted_nointernet_layout.setVisibility(View.VISIBLE);\n layout_nojobs_converted.setVisibility(View.GONE);\n }\n }\n });\n\n return rootview;\n\n }", "private void butCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butCheckActionPerformed\n\n Borrower bor = createBorrower();\n String date = tfDate.getText();\n\n if (driver.dateFormatValid(date)) {\n //valid date format, perform check out/in\n if (radBorrow.isSelected()) {\n //check out\n\n Book book = createBook();//create book\n\n if (!book.isOnLoan()) {\n //book is not on loan, can be loaned out\n\n //perform loan, inform user of success\n if (bor.borrow(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" loaned successfully to \" + bor.getName());\n\n } else {\n driver.errorMessageNormal(\"Book could not be loaned\");\n }\n\n } else {\n //is on loan\n driver.errorMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is already on loan.\");\n\n }\n\n } else if (radReturn.isSelected()) {\n //check in / returning\n\n Book book = createBook();\n\n if (book.isOnLoan()) {\n //book is on loan, and can be returned\n\n if (bor.returnBook(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" has been returned.\");\n\n } else {\n driver.infoMessageNormal(\"The book could not be returned.\");\n }\n\n } else {\n //not on loan\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is not on loan.\");\n }\n\n } else {\n driver.errorMessageNormal(\"Please select whether the book is being checked in or being returned.\");\n }\n\n } else {\n //invalid format\n driver.errorMessageNormal(\"Please ensure the date is in the format DD/MM/YYY\");\n }\n\n\n }", "public void run() {\n final androidx.appcompat.app.AlertDialog.Builder continueBookingDialog = new AlertDialog.Builder(view.getContext());\n continueBookingDialog.setTitle(\"Book locker for \" + marker.getTitle() + \" \" + marker.getSnippet() +\"?\");\n // resendVerificationMailDialog.setView(resendVerificationEditText);\n continueBookingDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n\n //Pass marker.getTitle();\n// AccountsFragment af = new AccountsFragment();\n// Bundle args = new Bundle();\n// args.putString(\"title\", marker.getTitle());\n// af.setArguments(args);\n// Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n// .show();\n//\n// getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, af).commit();\n Intent intent = new Intent(getActivity(), BookingActivity.class);\n intent.putExtra(\"title\", marker.getTitle());\n intent.putExtra(\"postal\",post);\n Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n .show();\n getActivity().startActivity(intent);\n }\n });\n continueBookingDialog.setNegativeButton(\"Back\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Automatically close the dialog\n\n }\n });\n continueBookingDialog.show();\n\n }", "private void hitApiForActivateDeal() {\n appUtils.showProgressDialog(mActivity, false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.DEAL_ID, dealData.getDealId());\n params.put(ApiKeys.DEAL_STATUS, \"1\");\n\n params.put(ApiKeys.DEAL_TITLE, etTitle.getText().toString().trim());\n params.put(ApiKeys.DEAL_DESCRIPTION, etDescription.getText().toString().trim());\n params.put(ApiKeys.TOTAL_ITEMS, etTotalItems.getText().toString().trim());\n params.put(ApiKeys.ORIGINAL_PRICE, etOriginalPrice.getText().toString().trim());\n params.put(ApiKeys.NEW_PRICE, tvNewPrice.getText().toString());\n params.put(ApiKeys.START_DATE_TIME, parseTime(etBeginTime.getText().toString().trim()));\n params.put(ApiKeys.END_DATE_TIME, parseTime(etEndTime.getText().toString().trim()));\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.deactivateDeal(AppSharedPrefs.getInstance(mActivity).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(mActivity, call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(\"CODE\") == 200) {\n appUtils.showToast(mActivity, getString(R.string.deal_activated));\n Intent intent = new Intent();\n intent.putExtra(Constants.DEAL_POSITION_KEY, position);\n intent.putExtra(Constants.DEAL_STATUS_KEY, \"1\");\n setResult(Constants.DEAL_ACTIVIATE_RESULT_CODE, intent);\n Intent intent1 = new Intent(Constants.REFRESH_RECCEIVER_KEY);\n // You can also include some extra data.\n intent1.putExtra(\"refresh\", true);\n LocalBroadcastManager.getInstance(mActivity).sendBroadcast(intent1);\n finish();\n } else if (mainObject.getInt(\"CODE\") == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(mActivity, mainObject.optString(\"MESSAGE\"));\n } else {\n appUtils.showSnackBar(activityCreateDeal, mainObject.optString(\"MESSAGE\"));\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n appUtils.showSnackBar(activityCreateDeal, getString(R.string.txt_something_went_wrong));\n }\n });\n\n }", "@Override\n public void onClick(View v) {\n String url = buildSearchURL(input.getText().toString()); // build the url from input\n // create new string request\n StringRequest stringRequest = new StringRequest(url,responseListener,errorListener);\n // add the string request into the queue\n MySingleton.getInstance(c).addToRequestQueue(stringRequest);\n }", "public void run() {\n final androidx.appcompat.app.AlertDialog.Builder continueBookingDialog = new AlertDialog.Builder(view.getContext());\n continueBookingDialog.setTitle(\"Book locker for \" + marker.getTitle() + \" \" + marker.getSnippet() +\"?\");\n // resendVerificationMailDialog.setView(resendVerificationEditText);\n continueBookingDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n\n //Pass marker.getTitle();\n// AccountsFragment af = new AccountsFragment();\n// Bundle args = new Bundle();\n// args.putString(\"title\", marker.getTitle());\n// af.setArguments(args);\n// Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n// .show();\n//\n// getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, af).commit();\n Intent intent = new Intent(getActivity(), BookingActivity.class);\n intent.putExtra(\"title\", marker.getTitle());\n intent.putExtra(\"postal\",post);\n\n Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n .show();\n getActivity().startActivity(intent);\n //getChildFragmentManager().beginTransaction().add(R.id.fragment_container, af).commit();\n // getActivity().startActivity(intent);\n // getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new AccountsFragment(),null).commit();\n //getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new AccountsFragment(),null).commit();\n }\n });\n continueBookingDialog.setNegativeButton(\"Back\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Automatically close the dialog\n\n }\n });\n continueBookingDialog.show();\n\n }", "@Override\n public void reloadStatus(Context context) {\n Uri.Builder builder = Uri.parse(context.getString(R.string.donate_server_url)).buildUpon();\n Account[] accounts = AccountManager.get(context).getAccountsByType(\"com.google\");\n for (Account acct : accounts) {\n builder.appendQueryParameter(\"id\", cleanName(acct.name));\n }\n builder.appendQueryParameter(\"id\", phoneNumber);\n \n // Send it to the server and see what comes back\n HttpService.addHttpRequest(context, new HttpRequest(builder.build(), true){\n \n @Override\n public void processBody(String body) {\n for (String line : body.split(\"<br>\")) {\n \n String flds[] = line.split(\",\");\n if (flds.length < 2) continue;\n \n // Evaluate the status field. Value of LIFE translates to year 9999\n int year = -1;\n String stat = flds[1].trim();\n if (stat.equals(\"LIFE\")) {\n year = 9999;\n } else {\n try {\n year = Integer.parseInt(stat);\n } catch (NumberFormatException ex) {}\n if (year < 2011 && year > 2050) year = -1;\n }\n \n // get the current status year. If new status is better, update\n // the user status\n int paidYear = ManagePreferences.freeRider() ? 9999 : ManagePreferences.paidYear();\n if (year > paidYear) {\n if (year == 9999) {\n ManagePreferences.setFreeRider(true);\n } else {\n ManagePreferences.setPaidYear(year, true);\n }\n }\n \n // If status is less that current, ignore everything else\n if (year < paidYear) continue;\n \n // Otherwise evaluate and accept purchase date\n if (flds.length <= 2) continue;\n if (year >= paidYear) {\n Date purchaseDate = null;\n try {\n purchaseDate = DATE_FMT.parse(flds[2].trim());\n } catch (ParseException ex) {}\n if (purchaseDate != null) {\n ManagePreferences.setPurchaseDate(purchaseDate);\n }\n }\n \n // If sponsor code is \"FREE\", set the free subscriber flag\n String sponsor = null;\n boolean free = false;\n if (flds.length > 3) {\n sponsor = flds[3].trim();\n if (sponsor.equals(\"FREE\")) { \n free = true;\n sponsor = null;\n } else if (sponsor.length() == 0) sponsor = null;\n }\n ManagePreferences.setFreeSub(free);\n ManagePreferences.setSponsor(sponsor);\n }\n \n // Set the authorization last checked date\n ManagePreferences.setAuthLastCheckTime();\n }\n });\n }", "@Override\n public void onClick(View v) {\n String url=ServerCallAsyncTask.BASE_URL+\"find_Docbook_array\";\n HashMap<String,String> hashMap=new HashMap<String, String>();\n hashMap.put(\"email\", etemail.getText().toString());\n ServerCallAsyncTask asyncTask=new ServerCallAsyncTask(AdminDoctorDetails.this,url,hashMap,DBSelect);\n asyncTask.execute();\n //endregion\n }", "@Override\n public void onPassFetchSuccess(List<Pass> pass) {\n\n Intent intent = new Intent(this.getContext(), PassSelectionActivity.class);\n intent.putExtra(PassSelectionActivity.EXTRA_PASSES, new ArrayList<>(pass));\n intent.putExtra(PassSelectionActivity.EXTRA_PRODUCT, bookingProduct);\n startActivityForResult(intent, REQUEST_CODE_ORDER_FLOW);\n }", "@Override\n public void onClick(Uri uri) {\n callback.onItemSelected(uri);\n\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 }", "public void onClick(final DialogInterface dialog, int whichButton) {\n String URL = \"https://\"+ appState.ENDPOINT + \"/v2/companies/test/set/\" + appState.TEST_ID;\n\n HashMap<String, String> params = new HashMap<String, String>();\n params.put(\"username\", appState.USERNAME);\n params.put(\"passcode\", appState.PASSCODE);\n params.put(\"action\",\"complete\");\n// params.put(\"page_number\",mTEST_SECTION_DELIMITERS[mTEST_SECTION_DELIMITERS.length-1]);\n// params.put(\"testEndFlag\",\"true\");\n// mCURRECT_SECTION_INDEX_IN_DELIMIERTS_ARRAY = mTEST_SECTION_DELIMITERS.length-1;\n JsonObjectRequest request_json = new JsonObjectRequest(URL, new JSONObject(params), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n getCurrentTestInfo();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(\"Error: \", error.getMessage());\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(TestAdminActivity.this);\n request_json.setShouldCache(false);\n requestQueue.add(request_json);\n }", "public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n itemPosition = position;\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n if(check.equals(\"true\")){\n if(MainActivity.bm.checkBooked(admin, itemValue)){\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this)\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"You already booked this itinerary: \"+\"\\n\" + itemValue)\n .setNegativeButton( \"back\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n else{\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this )\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"Do you want book this itinerary:\"+\"\\n\" + itemValue)\n .setPositiveButton( \"YES\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d(\"AlertDialog\", \"Positive\");\n MainActivity.bm.bookItinerary(admin, itineraries.get(itemPosition));\n //save the client info\n try {\n MainActivity.saveFileBook();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // modify the fm\n for(Flight flight:itineraries.get(itemPosition).itinerary){\n MainActivity.fm.getFlight(flight.flightNum).bookFlight();\n }\n try {\n MainActivity.saveFileFlight();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Intent intent = new Intent(\n Search_Itinerary_ResultActivity.this,\n View_Booked_ItinerariesActivity.class);\n intent.putExtra(MainActivity.USER, email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n })\n .setNegativeButton( \"NO\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n\n }\n else{\n if(MainActivity.bm.checkBooked(client, itemValue)){\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this)\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"You already booked this itinerary: \"+\"\\n\" + itemValue)\n .setNegativeButton( \"back\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n // Client\n else{\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this )\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"Do you want book this itinerary:\"+\"\\n\" + itemValue)\n .setPositiveButton( \"YES\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Positive\" );\n // if client able to book\n System.out.println(itemPosition);\n MainActivity.bm.bookItinerary(client, itineraries.get(itemPosition));\n //save the client info\n try {\n MainActivity.saveFileBook();\n } catch (ClassNotFoundException e) {\n\n e.printStackTrace();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n // modify the fm\n for(Flight flight:itineraries.get(itemPosition).itinerary){\n MainActivity.fm.getFlight(flight.flightNum).bookFlight();\n }\n try {\n MainActivity.saveFileFlight();\n } catch (ClassNotFoundException e) {\n\n e.printStackTrace();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n Intent intent = new Intent(\n Search_Itinerary_ResultActivity.this,\n View_Booked_ItinerariesActivity.class);\n intent.putExtra(MainActivity.USER, email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n })\n .setNegativeButton( \"NO\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Hashtable Param = new Hashtable<>();\n Param.put(\"SPName\", \"SP_picking_order_goods_Upd\");\n String usernames = AppStart.GetInstance().initUserEntity();\n int userid = AppStart.GetInstance().getUserID();\n Param.put(\"pickingcode\", jhorder);\n Param.put(\"currUserid\", \"\" + userid + \"\");\n Param.put(\"currUserName\", usernames);\n Param.put(\"whid\", \"\"+AppStart.GetInstance().Warehouse+\"\");\n Param.put(\"msg\", \"output-varchar-500\");\n Param.put(\"details \", datalsit);\n\n\n List<Hashtable> querypick = new ArrayList<Hashtable>();\n querypick = Datarequest.GETstored(Param);\n if (querypick.get(0).get(\"result\").toString().equals(\"0.0\")) {\n AlertDialog.Builder build = new AlertDialog.Builder(picking.this);\n build.setMessage(\"拣货成功!\").show();\n\n Intent intent = new Intent();\n intent.setClass(picking.this, pickingquery.class);\n startActivity(intent);/*调用startActivity方法发送意图给系统*/\n picking.this.finish();\n } else {\n AlertDialog.Builder build = new AlertDialog.Builder(picking.this);\n build.setMessage(querypick.get(0).get(\"msg\").toString()).show();\n }\n\n\n\n\n\n\n }", "public void run() {\n final androidx.appcompat.app.AlertDialog.Builder continueBookingDialog = new AlertDialog.Builder(view.getContext());\n continueBookingDialog.setTitle(\"Book locker for \" + marker.getTitle() + \" \" + marker.getSnippet() +\"?\");\n // resendVerificationMailDialog.setView(resendVerificationEditText);\n continueBookingDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent intent = new Intent(getActivity(), BookingActivity.class);\n intent.putExtra(\"title\", marker.getTitle());\n intent.putExtra(\"postal\",post);\n Toast.makeText(getActivity(),marker.getTitle() +\" is selected.\",Toast.LENGTH_SHORT)\n .show();\n getActivity().startActivity(intent);\n }\n });\n continueBookingDialog.setNegativeButton(\"Back\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Automatically close the dialog\n\n }\n });\n continueBookingDialog.show();\n\n }", "private void handleActionGetAllBiers(String param1, String param2) {\n // TODO: Handle action Foo\n Log.i(\"getallbiers\",\"Log de handleActionGetAllBiers\");\n Log.i(\"getallbiers\",\"Thread service name : \"+Thread.currentThread().getName());\n URL url = null;\n\n try {\n\n url = new URL(\"http://binouze.fabrigli.fr/bieres.json\");\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n if(HttpURLConnection.HTTP_OK == conn.getResponseCode()){\n copyInputStreamToFile(conn.getInputStream(), new File(getCacheDir(),\"bieres.json\"));\n Log.d(\"getallbiers\",\"Bieres json downloaded\");\n }\n\n //lance un intent pour signaler l'update\n LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(MainActivity.BIERS_UPDATE));\n\n }catch(MalformedURLException e){\n e.printStackTrace();\n\n\n } catch (IOException e) {\n e.printStackTrace();\n\n\n }\n\n }", "private void loadOrders() {\n\n if (!Prefs.getString(ID_NUMBER, \"\").equals(\"\")) {\n\n final String idNumber = Prefs.getString(ID_NUMBER, \"\");\n\n if (new InternetConnection(getBaseContext()).isInternetAvailable()) {\n// show progress dialog\n showRefreshing(true);\n\n Log.i(TAG, \"loadProducts: The id Number to be posted is= \" + idNumber);\n\n StringRequest request = new StringRequest(Request.Method.POST, ORDERS_URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String result) {\n showRefreshing(false);\n\n SimpleToast.ok(getBaseContext(), \"Orders loaded successfully!!!\");\n\n Log.i(TAG, \"onResponse: Orders Result= \" + result);\n try {\n parseProductsResult(new JSONObject(result));\n } catch (JSONException e) {\n e.printStackTrace();\n Log.e(TAG, \"onResponse: Error while converting string to json =\" + e.getMessage());\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n showRefreshing(false);\n\n SimpleToast.error(getBaseContext(), \"Server Error \");\n Log.e(TAG, \"onErrorResponse: Error= \" + error);\n Log.e(TAG, \"onErrorResponse: Error= \" + error.getMessage());\n }\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(ID_NUMBER, idNumber);\n return params;\n }\n };\n\n AppController.getInstance().addToRequestQueue(request);\n } else {\n// show Wireless Settings\n// SimpleToast.warning(getBaseContext(),\"Internet Connection Error\");\n showWirelessSettings();\n }\n } else {\n SimpleToast.muted(getBaseContext(), \"Add an Account first\");\n\n emptyOrder.setVisibility(View.VISIBLE);\n }\n }", "public void onClick(final DialogInterface dialog, int whichButton) {\n String URL = \"https://\"+ appState.ENDPOINT + \"/v2/companies/test/set/\" + appState.TEST_ID;\n\n HashMap<String, String> params = new HashMap<String, String>();\n params.put(\"username\", appState.USERNAME);\n params.put(\"passcode\", appState.PASSCODE);\n params.put(\"action\",\"start\");\n// params.put(\"page_number\",mTEST_SECTION_DELIMITERS[0]);\n// mCURRECT_SECTION_INDEX_IN_DELIMIERTS_ARRAY = 0;\n JsonObjectRequest request_json = new JsonObjectRequest(URL, new JSONObject(params), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n getCurrentTestInfo();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(\"Error: \", error.getMessage());\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(TestAdminActivity.this);\n request_json.setShouldCache(false);\n requestQueue.add(request_json);\n }", "@Override\n public void onClick(View arg0) {\n clickedRide.setEmail(clickedRide.getEmail().replace(\".\",\",\"));\n //Check to see if the dispatcher/driver entered a valid integer\n if (TextUtils.isDigitsOnly(waitTimeField.getText()) && !waitTimeField.getText().toString().equals(\"\")) {\n //updating an active ride\n int waitTime = Integer.parseInt(waitTimeField.getText().toString());\n Timestamp ts = new Timestamp(System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(waitTime));\n String eta = new SimpleDateFormat(\"hh:mm aaa\").format(ts);\n if (updated == true && pending == false) {\n activeRides.child(clickedRide.getEmail()).child(\"waitTime\").setValue(waitTime);\n clickedRide.setWaitTime(waitTime);\n activeRides.child(clickedRide.getEmail()).child(\"eta\").setValue(eta);\n clickedRide.setETA(eta);\n }\n //sending a pending ride to active\n else if (pending == true) {\n pendingRides.child(clickedRide.getEmail()).setValue(null);\n activeRides.child(clickedRide.getEmail()).setValue(clickedRide);\n activeRides.child(clickedRide.getEmail()).child(\"waitTime\").setValue(waitTime);\n clickedRide.setWaitTime(waitTime);\n activeRides.child(clickedRide.getEmail()).child(\"eta\").setValue(eta);\n clickedRide.setETA(eta);\n }\n //sending an active ride to archived\n else {\n activeRides.child(clickedRide.getEmail()).setValue(null);\n //Get the time for when the ride was completed.\n String time = new SimpleDateFormat(\"MMM d hh:mm aaa\").format(new Timestamp(System.currentTimeMillis()));\n clickedRide.setEndTime(time);\n archivedRides.child(clickedRide.getEmail() + \"_\" + clickedRide.getTime()).setValue(clickedRide);\n }\n }\n }", "public void book(View view){\n Intent intent = new Intent(this, View_Booked_ItinerariesActivity.class);\n intent.putExtra(MainActivity.USER, email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n\n cartDataSource.open();\n foodIdList = cartDataSource.getAllItem(currentUserEmail);\n cartDataSource.close();\n final String customerId = currentUserId;\n final int ongkir = deliveryFee;\n final String promo = promoCode;\n\n // Response Listener\n Response.Listener<String> responseListener = new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonObject = new JSONObject(response);\n if (jsonObject != null){\n cartDataSource.open();\n cartDataSource.clearCart(currentUserEmail);\n cartDataSource.close();\n Toast.makeText(OrderActivity.this, \"Order made\", Toast.LENGTH_SHORT).show();\n //Toast.makeText(OrderActivity.this, (\"foodIdList: \" + foodIdList), Toast.LENGTH_SHORT).show();\n //Toast.makeText(OrderActivity.this, (\"currentUserId: \" + currentUserId), Toast.LENGTH_SHORT).show();\n //Toast.makeText(OrderActivity.this, (\"deliveryFee: \" + deliveryFee), Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(OrderActivity.this, MainActivity.class);\n intent.putExtra(\"currentUserId\", customerId);\n startActivity(intent, ActivityOptionsCompat.makeSceneTransitionAnimation(OrderActivity.this).toBundle());\n }\n } catch (JSONException e){\n Toast.makeText(OrderActivity.this, \"Order failed to be made\", Toast.LENGTH_SHORT).show();\n }\n }\n };\n\n // Request Baru\n OrderRequest buatRequest = null;\n if(selectedPayment.equals(\"Cash\")){\n buatRequest = new OrderRequest(foodIdList, customerId, ongkir, responseListener);\n } else if(selectedPayment.equals(\"Cashless\")){\n buatRequest = new OrderRequest(foodIdList, customerId, promo, responseListener);\n }\n\n // Queue Baru\n RequestQueue queue = Volley.newRequestQueue(OrderActivity.this);\n queue.add(buatRequest);\n }", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t\tpostParameters[0] = new PostParameter(\"keyword\", searchKeyword);\n\t\t\t\tpostParameters[1] = new PostParameter(\"university\", university);\n\t\t\t\tpostParameters[2] = new PostParameter(\"page\", Integer.toString(requestTime));\n\t\t\t\t\n\t\t\t\tjsonString = HttpUtil.httpRequest(HttpUtil.USER_SEARCHBOOKS, postParameters, HttpUtil.POST);\n\t\t\t\tif (jsonString != null) {\t\t\t\t\t\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.what = what;\n\t\t\t\t\thandler.sendMessage(msg);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\thandler.sendEmptyMessage(-1);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onClick(View v) {\n System.out.println(societyName + \"!!!!!!!!!!!!!!!!!!!!!!\");\n if (societyName == \"\" || societyName.equals(\"\")\n || societyName == \"null\" || societyName == null || sociList.isEmpty() || sociList.size() == 0) {\n Constants.showSnack(v,\n \"Select society!\",\n \"OK\");\n } else if (financialYr == \"\" || financialYr.equals(\"\")\n || financialYr == null || financialYr == \"null\") {\n Constants.showSnack(v,\n \"Select financial year!\",\n \"OK\");\n } else if (monthName == \"\" || monthName.equals(\"\")\n || monthName == null || monthName == \"null\") {\n Constants.showSnack(v,\n \"Select month!\",\n \"OK\");\n } else if (actionType == \"\" || actionType.equals(\"\")\n || actionType == null || actionType == \"null\") {\n Constants.showSnack(v,\n \"Select View/Upload!\",\n \"OK\");\n } else {\n\n if (actionType == \"Upload\" || actionType.equals(\"Upload\")) {\n if (selectedFile == null || selectedFile.toString() == \"null\") {\n Constants.showSnack(v,\n \"Select a file to upload!\",\n \"OK\");\n } else {\n new PostSocietyBill().execute();\n }\n\n\n } else if (actionType == \"View\"\n || actionType.equals(\"View\")) {\n System.out.println(actionType\n + \" ^^^^^^^^^^^^^^^^^^^^^^^^\");\n new ViewBill().execute();\n\n }\n }\n\n }", "@Override\n public void onClick(View v)\n {\n String servicestring = Context.DOWNLOAD_SERVICE;\n DownloadManager downloadmanager;\n downloadmanager = (DownloadManager)getApplicationContext().getSystemService( servicestring );\n\n\n\n //int booknumber = Integer.parseInt( getIntent().getStringExtra( \"position\" ) );\n\n int value =0;\n\n booknumber = (getIntent().getIntExtra( \"position\" , value)) ;\n\n if(booknumber == 0 )\n {\n\n Uri uri = Uri\n .parse(\"http://153.91.191.175/Educations/android_tutorial.pdf\"); //creates a new Uri object from a properly formated String .\n DownloadManager.Request request = new DownloadManager.Request(uri);\n downloadmanager.enqueue(request);\n\n\n Toast.makeText(getApplicationContext(), \"Downloading...\", Toast.LENGTH_LONG ).show();\n\n }\n else if (booknumber== 1)\n\n {\n\n Uri uri = Uri\n .parse(\"http://192.168.0.31/Educations/Computer_Networkig.pdf\");\n DownloadManager.Request request = new DownloadManager.Request(uri);\n downloadmanager.enqueue(request);\n\n Toast.makeText( getApplicationContext(), \"Downloading...\", Toast.LENGTH_SHORT ).show();\n\n }\n\n\n\n else if (booknumber==2)\n\n {\n Uri uri = Uri\n .parse(\"http://192.168.0.31/Educations/database_fundamentals.pdf\");\n\n DownloadManager.Request request = new DownloadManager.Request(uri);\n\n downloadmanager.enqueue(request);\n\n Toast.makeText( getApplicationContext(), \"Downloading...\", Toast.LENGTH_SHORT ).show();\n }\n\n\n else if (booknumber==3)\n\n {\n\n Uri uri = Uri\n .parse(\"http://192.168.0.31/Educations/ios_tutorial.pdf\");\n\n DownloadManager.Request request = new DownloadManager.Request(uri);\n\n downloadmanager.enqueue(request);\n\n Toast.makeText( getApplicationContext(), \"Downloading...\", Toast.LENGTH_SHORT ).show();\n\n }\n\n else if (booknumber==4)\n\n {\n Uri uri = Uri\n .parse(\"http://192.168.0.31/Educations/java_tutorial.pdf\");\n\n DownloadManager.Request request = new DownloadManager.Request(uri);\n\n downloadmanager.enqueue(request);\n\n Toast.makeText( getApplicationContext(), \"Downloading...\", Toast.LENGTH_SHORT ).show();\n\n\n }\n\n }", "private void postRequest_CabilyMoney(String Url) {\n dialog = new Dialog(CabilyMoneyTransaction.this);\n dialog.getWindow();\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.custom_loading);\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n\n TextView dialog_title = (TextView) dialog.findViewById(R.id.custom_loading_textview);\n dialog_title.setText(getResources().getString(R.string.action_loading));\n\n\n System.out.println(\"-------------CabilyMoney Transaction Url----------------\" + Url);\n\n HashMap<String, String> jsonParams = new HashMap<String, String>();\n jsonParams.put(\"user_id\", UserID);\n jsonParams.put(\"type\", \"all\");\n\n mRequest = new ServiceRequest(CabilyMoneyTransaction.this);\n mRequest.makeServiceRequest(Url, Request.Method.POST, jsonParams, new ServiceRequest.ServiceListener() {\n @Override\n public void onCompleteListener(String response) {\n\n System.out.println(\"-------------CabilyMoney Transaction Response----------------\" + response);\n\n String Sstatus = \"\";\n try {\n JSONObject object = new JSONObject(response);\n Sstatus = object.getString(\"status\");\n\n if (Sstatus.equalsIgnoreCase(\"1\")) {\n JSONObject response_object = object.getJSONObject(\"response\");\n if (response_object.length() > 0) {\n // Currency currencycode = Currency.getInstance(getLocale(response_object.getString(\"currency\")));\n ScurrencySymbol = CurrencySymbolConverter.getCurrencySymbol(response_object.getString(\"currency\"));\n\n // ScurrencySymbol = CurrencySymbolConverter.getCurrencySymbol(response_object.getString(\"currency\"));\n Object check_trans_object = response_object.get(\"trans\");\n if (check_trans_object instanceof JSONArray) {\n JSONArray trans_array = response_object.getJSONArray(\"trans\");\n if (trans_array.length() > 0) {\n itemlist_all.clear();\n for (int i = 0; i < trans_array.length(); i++) {\n JSONObject trans_object = trans_array.getJSONObject(i);\n\n CabilyMoneyTransactionPojo pojo = new CabilyMoneyTransactionPojo();\n pojo.setTrans_type(trans_object.getString(\"type\"));\n pojo.setTrans_amount(trans_object.getString(\"trans_amount\"));\n pojo.setTitle(trans_object.getString(\"title\"));\n pojo.setTrans_date(trans_object.getString(\"trans_date\"));\n pojo.setBalance_amount(trans_object.getString(\"balance_amount\"));\n pojo.setCurrencySymbol(ScurrencySymbol);\n\n itemlist_all.add(pojo);\n\n if (trans_object.getString(\"type\").equalsIgnoreCase(\"CREDIT\")) {\n itemlist_credit.add(pojo);\n } else {\n itemlist_debit.add(pojo);\n }\n }\n isTransactionAvailable = true;\n } else {\n isTransactionAvailable = false;\n }\n }else {\n isTransactionAvailable = false;\n }\n\n }\n\n }\n\n\n if (Sstatus.equalsIgnoreCase(\"1\")) {\n if (isTransactionAvailable) {\n empty_text.setVisibility(View.GONE);\n adapter = new CabilyMoneyTransactionAdapter(CabilyMoneyTransaction.this, itemlist_all);\n listview.setAdapter(adapter);\n } else {\n empty_text.setVisibility(View.VISIBLE);\n listview.setEmptyView(empty_text);\n }\n } else {\n String Sresponse = object.getString(\"response\");\n Alert(getResources().getString(R.string.alert_label_title), Sresponse);\n }\n\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n dialog.dismiss();\n }\n\n @Override\n public void onErrorListener() {\n dialog.dismiss();\n }\n });\n\n }", "public void requestToPutFollow(String bravoUserID, final IRequestListener iRequestListener, FragmentBasic fragmentBasic) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"User_ID\", bravoUserID);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_PUT_FOLLOWING.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPut putFollow = new AsyncHttpPut(mContext, new AsyncHttpResponseProcess(mContext, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putFollow :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObPutFollowing obPutFollowing;\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n obPutFollowing = gson.fromJson(response.toString(), ObPutFollowing.class);\r\n iRequestListener.onErrorResponse(obPutFollowing.error);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n AIOLog.d(\"response error\");\r\n }\r\n }, params, true);\r\n AIOLog.d(url);\r\n putFollow.execute(url);\r\n }", "@Override\n public void onClick(View view) {\n selectedOfferId = (((JSONObject) radioButtonOffer.getTag()).optInt(\"offerID\"));\n\n // Remove Edit Booking Offer Id\n if (dataJsonObject.opt(AppConstant.JSON_PARAM_EDIT_BOOKING_OFFER_ID) != null) {\n dataJsonObject.remove(AppConstant.JSON_PARAM_EDIT_BOOKING_OFFER_ID);\n }\n\n // Deselect all options\n deselectAllOffers(viewHolder.getRadioGroupOfferList());\n\n // Set Offer Selected\n radioButtonOffer.setChecked(true);\n\n // Save Selected Offer\n saveSelectedOffer(radioButtonOffer);\n\n // Set true since Offer is selected\n setOfferSelected(true);\n\n // Enable Book Now Button\n if (isAdditionalOfferAvailable()) {\n // Since Adapter is in process of loading the layout, this call will throw\n // java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling\n // Hence, keep it inside try-catch block\n try {\n notifyItemChanged(getAdditionalOfferItemPosition());\n } catch (Exception e) {\n // Do Nothing...\n }\n } else {\n viewHolder.getButtonOfferBookNow().setEnabled(true);\n }\n }", "@Test\n public void userClicksAgree_RedirectsToRequestPickup(){\n //Validates the agree button exists\n onView(ViewMatchers.withId(R.id.button_rules_agree)).perform(click());\n\n //Checks that the Request ride page appears\n Activity mRequestRide = mInstrumentation.waitForMonitorWithTimeout(mRulesMonitor, 1000);\n Assert.assertNotNull(mRequestRide);\n }", "public void run() {\n\t \t\t\t\t\t\tint success;\r\n\t \t\t\t\t\t\tString activity = \"\";\r\n\t \t\t\t\t\t\ttry {\r\n\t \t\t\t\t\t\t\t// Building Parameters\r\n\t \t\t\t\t\t\t\tif (paramInput.getText().toString().isEmpty())\r\n\t \t\t\t\t\t\t\t{\r\n\t \t\t\t\t\t\t\t\t activity = \"open_main_door\";\r\n\t \t\t\t\t\t\t\t}\r\n\t \t\t\t\t\t\t\telse\r\n\t \t\t\t\t\t\t\t{\r\n\t \t\t\t\t\t\t\t\t activity = \"grant_main_door_access_to_\" + paramInput.getText().toString();\r\n\t \t\t\t\t\t\t\t}\r\n\t \t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(Calendar.getInstance().getTime());\r\n\t \t\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\r\n\t \t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_ACT, activity));\r\n\t \t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_DATE, date));\r\n\t \t\t\t\t\t\t\t// getting product details by making HTTP request\r\n\t \t\t\t\t\t\t\t// Note that product details url will use GET request\r\n\t \t\t\t\t\t\t\tJSONObject json = jsonParser.makeHttpRequest(\r\n\t \t\t\t\t\t\t\t\t\turl_update_record, \"GET\", params);\r\n\t \t\t\t\t\t\t\tif (json.getInt(TAG_SUCCESS) == 1 && !paramInput.getText().toString().isEmpty())\r\n\t \t\t\t\t\t\t\t{\t\r\n\t \t\t\t\t\t\t\t\tString gaResult = \"To \" + paramInput.getText().toString() +\"\\n\";\r\n\t \t\t\t\t\t\t\t\twelcome.append(myUI.getStyle(gaResult, 2, 8,\"GREEN\") );\r\n\t \t\t\t\t\t\t\t}\r\n\t \t\t\t\t\t\t// check your log for json response\r\n\t \t\t\t\t\t\t\tLog.d(\"Smart Home\",\"===========record_update=================\");\r\n\t \t\t\t\t\t\t\tLog.d(\"Smart Home\", json.getString(TAG_MSG));\t\t\t\r\n\t \t\t\t\t\t\t} \r\n\t \t\t\t\t\t\tcatch (Exception e) {\r\n\t \t\t\t\t\t\t\te.printStackTrace();\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}", "private void findBridges() {\n final ProgressDialog progressDialog = new ProgressDialog(getActivity());\n progressDialog.setMessage(\"Searching for bridges...\");\n progressDialog.show();\n\n // Create new HTTP request to find bridges\n StringRequest request = new StringRequest(Request.Method.GET,\n findBridgeURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //JSONObject jsonResponse = new JSONObject(response);\n //JSONArray jsonArray = jsonResponse.getJSONArray(\"\");\n\n JSONArray jsonArray = new JSONArray(response);\n\n for(int i = 0; i < jsonArray.length(); i++)\n {\n JSONObject o = jsonArray.getJSONObject(i);\n\n ListItemBridge newItem = new ListItemBridge(\n \"Getting Name...\",\n o.getString(\"id\"),\n o.getString(\"internalipaddress\"),\n \"BSB002\"\n );\n bridgeList.add(newItem);\n }\n\n for(int i = 0; i < jsonArray.length(); i++)\n {\n getBridgeName(i);\n }\n\n bridgeDiscoveryAdapter = new BridgeAdapter(bridgeList, getActivity());\n recyclerViewBridge.setAdapter(bridgeDiscoveryAdapter);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n\n RequestQueue queue = Volley.newRequestQueue(getActivity());\n queue.add(request);\n }", "private void sendSupportRequest()\n {\n if (HelperHttp.isNetworkAvailable(getActivity()))\n {\n //Add parameters to request in arraylist\n ArrayList<Parameter> parameterList = new ArrayList<Parameter>();\n parameterList.add(new Parameter(\"userHash\", DataManager.getInstance().user.getUserHash(), String.class));\n parameterList.add(new Parameter(\"ticketType\", selectedRequestId, Integer.class));\n parameterList.add(new Parameter(\"ticketTitle\", edTitle.getText().toString(), String.class));\n parameterList.add(new Parameter(\"ticketDetails\", edDescription.getText().toString(), String.class));\n\n //create web service inputs\n DataInObject inObj = new DataInObject();\n inObj.setMethodname(\"LogNewSupportRequest\");\n inObj.setNamespace(Constants.TEMP_URI_NAMESPACE);\n inObj.setSoapAction(Constants.TEMP_URI_NAMESPACE + \"IPlannerService/LogNewSupportRequest\");\n inObj.setUrl(Constants.PLANNER_WEBSERVICE_URL);\n inObj.setParameterList(parameterList);\n\n //Network call\n showProgressDialog();\n new WebServiceTask(getActivity(), inObj, true, new TaskListener()\n {\n @Override\n public void onTaskComplete(Object response)\n {\n //Added by Asmita on 24th Jan 2017 as client asked to temporary hide the functionality due to server side error\n try\n {\n SoapObject outer = (SoapObject) response;\n SoapObject inner = (SoapObject) outer.getPropertySafely(\"Success\");\n successMessage = inner.getPropertySafelyAsString(\"Message\", \"0\");\n planTaskId = Integer.parseInt(inner.getPropertySafelyAsString(\"PlanTaskID\", \"0\"));\n\n if (imageDragableGridView.getUpdatedImageListWithoutPlus().size() >= 1)\n {\n for (int i = 0; i < imageDragableGridView.getUpdatedImageListWithoutPlus().size(); i++)\n {\n uploadDocFiles();\n }\n\n } else\n {\n hideProgressDialog();\n CustomDialogManager.showOkDialog(getActivity(), successMessage, new DialogListener()\n {\n @Override\n public void onButtonClicked(int type)\n {\n hideProgressDialog();\n if (getFragmentManager().getBackStackEntryCount() != 0)\n {\n getFragmentManager().popBackStack();\n } else\n {\n getActivity().finish();\n }\n }\n });\n }\n\n } catch (Exception e)\n {\n hideProgressDialog();\n e.printStackTrace();\n }\n\n }\n }).execute();\n } else\n {\n CustomDialogManager.showOkDialog(getActivity(), getString(R.string.no_internet_connection));\n }\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tfinal int position = (Integer) v.getTag();\r\n\t\t\t\t\tfinal MainActivity act = (MainActivity) v.getContext();\r\n\t\t\t\t\tHashMap<String, String> data = new HashMap<String, String>() {\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tput(\"token\", Constants.TOKEN);\r\n\t\t\t\t\t\t\tput(\"objectId\", list.get(position).getUid());\r\n\t\t\t\t\t\t\tput(\"isLike\", \"true\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tRequestData request = HttpUtils.simplePostData(Address.HOST\r\n\t\t\t\t\t\t\t+ Address.LIKE, data);\r\n\t\t\t\t\tact.startHttpTask(new TaskResultListener() {\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void result(ResposneBundle b) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tLog.e(\"result\", b.getContent());\r\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tJSONObject job = new JSONObject(b.getContent());\r\n\t\t\t\t\t\t\t\tif (job.getInt(\"code\") == -1) {\r\n\t\t\t\t\t\t\t\t\tact.showToast(job.getString(\"msg\"));\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tf.refreshFriendList();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, request);\r\n\t\t\t\t}", "@Override\r\n public void onReceive(Context context, Intent intent) {\r\n boolean isConnected = User.isConnectToInternet(ListWarehouseActivity.this);\r\n // If the connection is established\r\n if (isConnected) {\r\n // Check if there is a modification to send to the server\r\n List<String> depot = editWarehouse.readEditWarehouses();\r\n if(!depot.isEmpty()) {\r\n new Dialogs(ListWarehouseActivity.this).sendDialog();\r\n }\r\n\r\n }// otherwise\r\n else {\r\n // OfflineMode\r\n Toast.makeText(ListWarehouseActivity.this,getString(R.string.offline_mode), Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\n\t\tsuper.onActivityResult(requestCode, resultCode, intent);\n\t\t// Choose what to do based on the request code\n\t\tswitch (requestCode) {\n\t\tcase LocationUtils.REQUEST_ACCOUNT_PICKER:\n\t if (intent != null && intent.getExtras() != null) {\n\n\t \t LocationUtils.accountName = intent.getExtras().getString(AccountManager.KEY_ACCOUNT_NAME);\n\t if (LocationUtils.accountName != null) {\n\t \t LocationUtils.credential.setSelectedAccountName(LocationUtils.accountName);\n\t \t \n\t \t AnyTaxi.Builder endpointBuilder = new AnyTaxi.Builder(\n\t AndroidHttp.newCompatibleTransport(),\n\t new JacksonFactory(),\n\t LocationUtils.credential);\n\t \t LocationUtils.endpoint = CloudEndpointUtils.updateBuilder(endpointBuilder).build();\n\t }\n\t }\n\t\t\tAsyncTask<Void, Void, Driver> task = new EndpointsTask(this, \n\t\t\t\t\tLocationUtils.endpoint, \"ywangbc@gmail.com\");\n\t\t\ttask.execute();\n\t\t\tbreak;\n\n\t\t\t// If the request code matches the code sent in onConnectionFailed\n\t\tcase LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n\n\t\t\tswitch (resultCode) {\n\t\t\t// If Google Play services resolved the problem\n\t\t\tcase Activity.RESULT_OK:\n\n\t\t\t\t// Log the result\n\t\t\t\tLog.d(LocationUtils.APPTAG, getString(R.string.resolved));\n\n\t\t\t\t// Display the result\n\t\t\t\tmConnectionState.setText(R.string.connected);\n\t\t\t\tmConnectionStatus.setText(R.string.resolved);\n\t\t\t\tbreak;\n\n\t\t\t\t// If any other result was returned by Google Play services\n\t\t\tdefault:\n\t\t\t\t// Log the result\n\t\t\t\tLog.d(LocationUtils.APPTAG, getString(R.string.no_resolution));\n\n\t\t\t\t// Display the result\n\t\t\t\tmConnectionState.setText(R.string.disconnected);\n\t\t\t\tmConnectionStatus.setText(R.string.no_resolution);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// If any other request code was received\n\t\tdefault:\n\t\t\t// Report that this Activity received an unknown requestCode\n\t\t\tLog.d(LocationUtils.APPTAG,\n\t\t\t\t\tgetString(R.string.unknown_activity_request_code, requestCode));\n\n\t\t\tbreak;\n\t\t}\n\t}", "public void submit(View view) {\n EditText nameBox = (EditText)findViewById(R.id.name);\n String name = \"null\";\n try {\n name = URLEncoder.encode(nameBox.getText().toString(), \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n System.out.println(\"Error Encoding Name\");\n }\n String encodedData = JSONify.encode(name, data);\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = Reference.BASE_URL + \"b/\" + Reference.ean + encodedData;\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(com.android.volley.Request.Method.GET, url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //TODO add an alert here\n System.out.println(\"GET request error\");\n }\n });\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n\n Reference.ean = null;\n Reference.name = null;\n Reference.canEat = -1;\n Reference.data = null;\n switchToHome();\n }", "public void invokeViewItem(String itemToSearch){\n AsyncHttpClient client = new AsyncHttpClient();\n client.setBasicAuth(globalUsername, globalPassword);\n client.get(\"http://\" + globalURL + \"/Auction_Server/items/\"+itemToSearch, new AsyncHttpResponseHandler() { // deleted params\n\n @Override\n public void onSuccess(int i, Header[] headers, byte[] bytes)\n {\n try {\n String response = new String(bytes, \"UTF-8\");\n JSONObject obj = new JSONObject(response);\n String itemId = obj.get(\"item_id\").toString();\n String itemName = obj.get(\"item_name\").toString();\n String itemCategory = obj.get(\"item_category\").toString();\n String itemDescription = obj.get(\"item_desc\").toString();\n String itemStartPrice = obj.get(\"item_start_price\").toString();\n String itemLastBidPrice = obj.get(\"item_latest_bid_price\").toString();\n String itemPictureString = \"\";\n if (!obj.isNull(\"item_picture\")) { // displaying the picture from string to byte[] to bitmap and display\n itemPictureString = obj.get(\"item_picture\").toString();\n byte[] itemPictureBytes = new BASE64Decoder().decodeBuffer(itemPictureString);\n Bitmap itemPictureBitmap = BitmapFactory.decodeByteArray(itemPictureBytes, 0, itemPictureBytes.length);\n ImageView showItemPicture = (ImageView) findViewById(R.id.viewItemImageViewId);\n showItemPicture.setImageBitmap(itemPictureBitmap);\n }\n TextView fillUserInfo = (TextView) findViewById(R.id.viewItemInfoTextViewId);\n fillUserInfo.setText(\"Item Name: \" + obj.get(\"item_name\") + \"\\nItem Description: \" + obj.get(\"item_desc\") +\n \"\\nCategory: \" + obj.get(\"item_category\") + \"\\nCurrent Bid: \" + obj.get(\"item_latest_bid_price\") +\n \"\\nStarting price: \" + obj.get(\"item_start_price\") + \"\\nNumber of Bids: \" + obj.get(\"item_num_bids\") +\n \"\\nLatest bid username: \" + obj.get(\"item_latest_bid_username\") + \"\\nLast Bid Time: \" + obj.get(\"item_latest_bid_time\").toString().substring(0,16));\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error Occured [Server's JSON response might be invalid]!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable)\n {\n String response = \"\";\n try {\n response = new String(bytes, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n Toast.makeText(getApplicationContext(), response, Toast.LENGTH_LONG).show();\n }\n\n });\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.Profil) {\n Intent intent = new Intent(Commissioner.this,CommissionerProfil.class);\n startActivity(intent);\n }\n if (id == R.id.Payment) {\n Intent intent = new Intent(Commissioner.this,EnduserPayment.class);\n startActivity(intent);\n }\n if (id == R.id.accounts) {\n Intent intent = new Intent(Commissioner.this,AccountsIndex.class);\n startActivity(intent);\n }\n if (id==R.id.search){\n // Toast.makeText(Commissioner.this,\"Search Views\",Toast.LENGTH_LONG).show();\n int tabPos=getSupportActionBar().getSelectedTab().getPosition();\n if (tabPos==1)\n edtSearch.setVisibility(View.VISIBLE);\n }\n if(id==R.id.balance){\n progressDialog=new ProgressDialog(Commissioner.this);\n progressDialog.setMessage(getString(R.string.loaddata));\n progressDialog.show();\n String uid = synchronizer.getSession();\n String url = synchronizer.getHost()+\"/ajax/users.php\";\n //String url = \"192.168.173.1:12/RUT/etracking/ajax/citizens.php\";\n String data = \"cate=loadbyid&id=\" + uid;\n\n RequestQueue queue = Volley.newRequestQueue(this);\n final JsonObjectRequest jsObjRequest = new JsonObjectRequest\n (Request.Method.GET, \" http://\" + url + \"?\" + data, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try{\n progressDialog.dismiss();\n final AlertDialog alertDialog=new AlertDialog.Builder(Commissioner.this).create();\n alertDialog.setTitle(getString(R.string.accbalance));\n alertDialog.setMessage(getString(R.string.accamount)+\" \"+response.getJSONArray(\"user\").getJSONObject(0).getString(\"usr_amount\")+\" RWF\");\n alertDialog.setButton(\"Close\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alertDialog.dismiss();\n }\n });\n alertDialog.show();\n }catch (JSONException ex){\n ex.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // TODO Auto-generated method stub\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }\n });\n queue.add(jsObjRequest);\n }else{\n Toast.makeText(this,getString(R.string.offline),Toast.LENGTH_SHORT).show();\n }\n\n if (id == R.id.action_lock) {\n Intent intent = new Intent(Commissioner.this,changepwd.class);\n startActivity(intent);\n }\n if(id==R.id.help){\n startActivity(new Intent(Commissioner.this,Issues.class));\n }\n if(id==R.id.logout){\n synchronizer.logout();\n finish();\n }\n if (id==R.id.exit){\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_search__itinerary__result);\n Intent intent = getIntent();\n this.email = (String) intent.getSerializableExtra(MainActivity.USER);\n this.check = (String) intent.getSerializableExtra(MainActivity.CHECK_ADMIN);\n if(check.equals(\"true\")){\n admin = MainActivity.am.getAdmin(email);\n }\n else{\n client = MainActivity.cm.getClient(email);\n }\n listView = (ListView) findViewById(R.id.list_itinerary);\n itineraries= (ArrayList<Itinerary>)\n intent.getSerializableExtra(\n Search_FlightActivity.SEARCH_FLIGHT_RESULT);\n String[] values = new String[itineraries.size()];\n for(int i = 0; i<itineraries.size(); i++){\n values[i] = itineraries.get(i).toString();\n }\n adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_list_item_1, android.R.id.text1, values);\n // Assign adapter to ListView\n listView.setAdapter(adapter);\n // ListView Item Click Listener\n listView.setOnItemClickListener(new OnItemClickListener() {\n\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n // ListView Clicked item index\n itemPosition = position;\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n if(check.equals(\"true\")){\n if(MainActivity.bm.checkBooked(admin, itemValue)){\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this)\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"You already booked this itinerary: \"+\"\\n\" + itemValue)\n .setNegativeButton( \"back\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n else{\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this )\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"Do you want book this itinerary:\"+\"\\n\" + itemValue)\n .setPositiveButton( \"YES\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d(\"AlertDialog\", \"Positive\");\n MainActivity.bm.bookItinerary(admin, itineraries.get(itemPosition));\n //save the client info\n try {\n MainActivity.saveFileBook();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // modify the fm\n for(Flight flight:itineraries.get(itemPosition).itinerary){\n MainActivity.fm.getFlight(flight.flightNum).bookFlight();\n }\n try {\n MainActivity.saveFileFlight();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Intent intent = new Intent(\n Search_Itinerary_ResultActivity.this,\n View_Booked_ItinerariesActivity.class);\n intent.putExtra(MainActivity.USER, email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n })\n .setNegativeButton( \"NO\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n\n }\n else{\n if(MainActivity.bm.checkBooked(client, itemValue)){\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this)\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"You already booked this itinerary: \"+\"\\n\" + itemValue)\n .setNegativeButton( \"back\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n // Client\n else{\n new AlertDialog.Builder(Search_Itinerary_ResultActivity.this )\n .setTitle( \"BOOK ITINERARY\" )\n .setMessage( \"Do you want book this itinerary:\"+\"\\n\" + itemValue)\n .setPositiveButton( \"YES\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Positive\" );\n // if client able to book\n System.out.println(itemPosition);\n MainActivity.bm.bookItinerary(client, itineraries.get(itemPosition));\n //save the client info\n try {\n MainActivity.saveFileBook();\n } catch (ClassNotFoundException e) {\n\n e.printStackTrace();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n // modify the fm\n for(Flight flight:itineraries.get(itemPosition).itinerary){\n MainActivity.fm.getFlight(flight.flightNum).bookFlight();\n }\n try {\n MainActivity.saveFileFlight();\n } catch (ClassNotFoundException e) {\n\n e.printStackTrace();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n Intent intent = new Intent(\n Search_Itinerary_ResultActivity.this,\n View_Booked_ItinerariesActivity.class);\n intent.putExtra(MainActivity.USER, email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n })\n .setNegativeButton( \"NO\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Log.d( \"AlertDialog\", \"Negative\" );\n }\n } )\n .show();\n }\n }\n }\n\n });\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\t\t\tint position, long arg3) {\n\t\t\t\tif (responseList != null) {\n\t\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\t\tWebviewActivity.class);\n\t\t\t\t\tString url = responseList.get(position).getUrl();\n\t\t\t\t\tintent.putExtra(\"URL\", url);\n\t\t\t\t\tstartActivity(intent); // Starts a new activity to show\n\t\t\t\t\t// recipe details in a webview\n\t\t\t\t\tRecipeDB.getInstance(getActivity()).saveHistory(responseList.get(position));\n\t\t\t\t}\n\n\t\t\t}", "private void getBooks(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Fetching Data\",\"Please wait...\",false,false);\n\n //Creating a rest adapter\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(ROOT_URL)\n .build();\n\n //Creating an object of our api interface\n BooksAPI api = adapter.create(BooksAPI.class);\n\n //Defining the method\n api.getBooks(new Callback<List<Book>>() {\n @Override\n public void success(List<Book> list, Response response) {\n //Dismissing the loading progressbar\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }\n\n @Override\n public void failure(RetrofitError error) {\n //you can handle the errors here\n Log.e(\"error\",error.getResponse().getReason());\n }\n });\n }", "private static void checkoutBook(){\n\t\tSystem.out.println(\"===Book Checkout===\");\n\t\tScanner string_input = new Scanner(System.in); //gets String values entered by the user\n\t\tScanner integer_input = new Scanner(System.in); //gets integer values entered by the user\n\t\tboolean exit = false; //indicates whether method should be exited\n\t\t\n\t\tSystem.out.println(\"Enter Id of book to be checked out: \");\n\t\tint bookId = getIntegerInput();//ensures user input is an integer value\n\t\t//if bookId entered does not exist then continually ask user to enter bookId until a bookId that exists is entered\n\t\twhile(!ALL_BOOKS.containsKey(bookId)){\n\t\t\tSystem.out.println(\"Book Id entered does not exist! Enter BookId: \");\n\t\t\tbookId = integer_input.nextInt();\n\t\t}\n\t\t\n\t\t/*Print statements to notify book has been found, the book's details, and its availabilty*/\n\t\tSystem.out.println(\"Book Found!\");\n\t\tSystem.out.println(ALL_BOOKS.get(bookId).getBookTitle() + \" | Written By: \" + ALL_BOOKS.get(bookId).getAuthor().toString() + \" | Published By: \" + ALL_BOOKS.get(bookId).getPublisher());\n\t\tString availabilty = !ALL_BOOKS.get(bookId).getBorrowed() ? \"Available\" : \"Currently Borrowed\"; //stores whether book is currently borrowed or not.\n\t\tSystem.out.println(availabilty);\n\t\t\n\t\tif(!ALL_BOOKS.get(bookId).getBorrowed()){//if book is available to be borrowed then change it's status and set the date it should be returned (Next Month From Date of Borrowing)\n\t\t\tSystem.out.println(\"Enter Id of student borrowing the book: \");\n\t\t\tint studentId = getIntegerInput();//ensures user input is an integer value\n\t\t\tif(!studentExists(studentId)){ //if student Id entered does not exists\n\t\t\t\tSystem.out.println(\"Student Id entered does not exist. Do you want to add a new student? (Y --> Yes/ Any other button --> No): \");\n\t\t\t\tString user_option = string_input.next();\n\t\t\t\tif(user_option.equalsIgnoreCase(\"Y\"))\n\t\t\t\t\tstudentId = addNewStudent(); //adds a new student to the ALL_STUDENTS ArrayList and returns this new student's Id \n\t\t\t\telse\n\t\t\t\t\texit = true; //exit to main menu\n\t\t\t}\n\t\t\t\n\t\t\t/*Students cannot borrow more than one book at a time. Thus if the student's bookIdBorrowed is greater than 0 then\n\t\t\t * it implies the student currently has a book borrowed.*/\n\t\t\telse if(ALL_STUDENTS.get(studentId).getBookIdBorrowed() > 0){ \n\t\t\t\tStudentDetails student = ALL_STUDENTS.get(studentId); //stores student trying to checkout the book\n\t\t\t\tBookDetails bookBorrowed = ALL_BOOKS.get(student.getBookIdBorrowed()); //stores book currently borrowed by the student\n\t\t\t\tSystem.out.println(\"Sorry! Only one book can be borrowed at a time.\");\n\t\t\t\tSystem.out.println(student.getFullName() + \" currently has borrowed \" + bookBorrowed.getBookTitle());\n\t\t\t\tSystem.out.println(\"Please come back later when \" + bookBorrowed.getBookTitle() + \" is returned\");\n\t\t\t\texit = true; //exit to main menu\n\t\t\t}\n\t\t\t\n\t\t\t/*If the method has not been exited at this point then it implies the student can be borrow the book.*/\n\t\t\tif(!exit){\n\t\t\t\tBookDetails book = ALL_BOOKS.get(bookId);\n\t\t\t\tCalendar return_date = new GregorianCalendar(); //get the current date\n\t\t\t\treturn_date.add(Calendar.MONTH, 1); //set the return date to the next month from the current date\n\t\t\t\tbook.setBorrowed(true); //indicates book has been borrowed\n\t\t\t\tbook.setDateToReturn(return_date); //set book's return date\n\t\t\t\n\t\t\t\tALL_STUDENTS.get(studentId).setBookIdBorrowed(book.getBookId()); //indicate that the student has borrowed this book\n\t\t\t\tbook.setStudentBorrowed(studentId); //indicates book has been borrowed by the student with the given ID\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"You Are All Set!\");\n\t\t\t\tSystem.out.println(book.getBookId() + \" | \" + book.getBookTitle() + \" is due \" + SDF.format(return_date.getTime()));\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry check back later to borrow this book\");\t\n\t}", "public void selectNetwork(View view){\n\t\tLog.d(\"SelectNetwork\", spinnerSelection);\n\t\t\n\t\tif(spinnerSelection.equals(\"Millennial\")){\n\t\t\tIntent millennialIntent = new Intent(this, MillennialActivity.class);\n\t\t\tstartActivity(millennialIntent);\n\t\t}\n\t\t\n\t\telse if(spinnerSelection.equals(\"Nexage\")){\n\t\t\tIntent nexageIntent = new Intent(this, NexageActivity.class);\n\t\t\tstartActivity(nexageIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"Facebook\")){\n\t\t\tIntent facebookIntent = new Intent(this, FacebookActivity.class);\n\t\t\tstartActivity(facebookIntent);\n\t\t\t\n\t\t}\n\t\telse if(spinnerSelection.equals(\"InMobi\")){\n\t\t\tIntent inmobiIntent = new Intent(this, InMobiActivity.class);\n\t\t\tstartActivity(inmobiIntent);\n\t\t}\n\t\t\n\t\telse if(spinnerSelection.equals(\"AdMob\")){\t\t\t\n\t\t\tIntent admobIntent = new Intent(this, AdMobActivity.class);\n\t\t\tstartActivity(admobIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"MoPub\")){\t\t\t\n\t\t\tIntent MoPubIntent = new Intent(this, MoPubActivity.class);\n\t\t\tstartActivity(MoPubIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"Chartboost\")){\t\t\t\n\t\t\tIntent ChartboostIntent = new Intent(this, ChartboostActivity.class);\n\t\t\tstartActivity(ChartboostIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"AdColony\")){\t\t\t\n\t\t\tIntent AdColonyIntent = new Intent(this, AdColonyActivity.class);\n\t\t\tstartActivity(AdColonyIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"Burstly\")){\t\t\t\n\t\t\tIntent BurstlyIntent = new Intent(this, BurstlyActivity.class);\n\t\t\tstartActivity(BurstlyIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"AppLovin\")){\t\t\t\n\t\t\tIntent AppLovinIntent = new Intent(this, AppLovinActivity.class);\n\t\t\tstartActivity(AppLovinIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"MobFox\")){\t\t\t\n\t\t\tIntent MobFoxIntent = new Intent(this, MobFoxActivity.class);\n\t\t\tstartActivity(MobFoxIntent);\n\t\t}\n\t\telse if(spinnerSelection.equals(\"AppNexus\")){\t\t\t\n\t\t\tIntent AppNexusIntent = new Intent(this, AppNexusActivity.class);\n\t\t\tstartActivity(AppNexusIntent);\n\t\t}\n\t\telse {\n\t\t\t// Should never get here, but if we do - just notify the user to reselect the network\n\t\t\tToast.makeText(this, \"Error: Please reselect network\", Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(\"status\", \"2\");\n\t\t\t\tintent.putExtra(\"detail\", list.get(arg2));\n\t\t\t\tintent.setClass(MySave.this, JobDetail.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(UIJobOfferEditor.this, UIResultDisplay.class);\n AsyncTask.execute(new Runnable() {\n @Override\n public void run() {\n // Make sure hashtable gets filled\n CompareService.getRankedJobStrings();\n\n // get current job\n current = DataHandler.GetDataHandlerInstance().GetCurrentJob();\n String formattedComp =\n JOB.title + \" | \" + current.title + \"\\n\" +\n JOB.currentJob + \" | \" + current.currentJob + \"\\n\" +\n JOB.company + \" | \" + current.company + \"\\n\" +\n JOB.city + \" | \" + current.city + \"\\n\" +\n JOB.state + \" | \" + current.state + \"\\n\" +\n JOB.yearlySalary + \" | \" + current.yearlySalary + \"\\n\" +\n JOB.yearlyBonus + \" | \" + current.yearlyBonus + \"\\n\" +\n JOB.teleworkDaysPerWeek + \" | \" + current.teleworkDaysPerWeek + \"\\n\" +\n JOB.retirementBenefit + \" | \" + current.retirementBenefit + \"\\n\" +\n JOB.leaveTime + \" | \" + current.leaveTime;\n intent.putExtra(\"job1\", JOB.title + \", \" + JOB.company);\n intent.putExtra(\"job2\", current.title + \", \" + current.company);\n startActivity(intent);\n }\n });\n }", "@Override\n public void success(List<Book> list, Response response) {\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }", "@Override\n public void onListItemSelected(String asinID,String title,String price) {\n if(UtilityFunctions.isNetworkAvailable(getActivity())) {\n Intent i = new Intent(getActivity(), ProductInformationPageActivity.class);\n i.putExtra(Tag.PIP_URL, Tag.PIP_URL + asinID);\n i.putExtra(Tag.TITLE, title);\n i.putExtra(Tag.PRICE, price);\n startActivity(i);\n }\n else\n {\n Toast.makeText(getActivity(),Tag.NO_INTERNET,Toast.LENGTH_SHORT).show();\n }\n }", "public void OfflineplaceOrder() {\n String url = APIBaseURL.offlinepay+SaveSharedPreference.getLoggedInUserEmail(ConsumerCheckOutActivity.this)+\"/\"+true+\"/\"+true;\n\n CustomVolleyRequest stringRequest = new CustomVolleyRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n\n try {\n JSONObject jsonObject = new JSONObject(response);\n offlineorderDialog();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (error instanceof AuthFailureError) {\n //TODO\n ViewGroup viewGroup = ConsumerCheckOutActivity.this.findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(ConsumerCheckOutActivity.this).inflate(R.layout.access_token_expired_dialog, viewGroup, false);\n\n Button buttonreset = dialogView.findViewById(R.id.buttonreset);\n Button buttonOk = dialogView.findViewById(R.id.buttonOk);\n ImageView closeBtn = dialogView.findViewById(R.id.closeBtn);\n\n //Now we need an AlertDialog.Builder object\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(ConsumerCheckOutActivity.this);\n\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n android.app.AlertDialog alertDialog = builder.create();\n\n\n buttonOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n ConsumerMainActivity.logout();\n\n }\n });\n\n closeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n\n }\n });\n\n buttonreset.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n }\n });\n alertDialog.setCanceledOnTouchOutside(false);\n alertDialog.show();\n } else if (error instanceof NetworkError) {\n Toast.makeText(consumerCheckOutActivity, \"Cannot connect to Internet...Please check your connection!\", Toast.LENGTH_SHORT).show();\n }\n }\n }, consumerCheckOutActivity);\n ApplicationController.getInstance().addToRequestQueue(stringRequest, \"place_offline_order\");\n\n }", "public void requestWishList() {\n if (!hasInternetConnection()) {\n PromeetsDialog.show(this, getString(R.string.no_internet));\n } else {\n UserPOJO userPOJO = (UserPOJO) PromeetsUtils.getUserData(PromeetsPreferenceUtil.USER_OBJECT_KEY, UserPOJO.class);\n if (userPOJO == null) finish();\n String[] key = {Constant.USERID, Constant.PAGENUMBER};\n String[] value = {userPOJO.id + \"\", page + \"\"};\n\n PromeetsDialog.showProgress(this);\n HashMap<String, String> header = new HashMap<>();\n header.put(\"ptimestamp\", ServiceHeaderGeneratorUtil.getInstance().getPTimeStamp());\n header.put(\"promeetsT\", ServiceHeaderGeneratorUtil.getInstance().getPromeetsTHeader(Constant.FETCH_MY_WISH_LIST));\n header.put(\"accessToken\", ServiceHeaderGeneratorUtil.getInstance().getAccessToken());\n header.put(\"API_VERSION\", Utility.getVersionCode());\n new GenericServiceHandler(Constant.ServiceType.WISH_LIST, this, PromeetsUtils.buildURL(Constant.FETCH_MY_WISH_LIST, key, value), null, header, IServiceResponseHandler.GET, false, \"Please wait!\", \"Processing..\").execute();\n }\n }", "@Override\n public void HandleAction() {\n update.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n\n try {\n\n if (Name.getText().toString().trim().isEmpty() || Cap.getText().toString().trim().isEmpty() || Becons.getText().toString().trim().isEmpty()) {\n Toast.makeText(getBaseContext(), \"Please fill in all fields\", Toast.LENGTH_LONG).show();\n } else if (Network.isConnected(getBaseContext()) == false) {\n Toast.makeText(getBaseContext(), \"No connection with Internet\", Toast.LENGTH_LONG).show();\n } else {\n\n progressDialog.setMessage(\"Please wait ...\");\n progressDialog.show();\n\n\n // get the beacons ID from Edit text and split it by line.\n String Beacons[] = Becons.getText().toString().split(\"\\\\r?\\\\n\");\n\n // parse the array to json array To send it to server.\n final JSONArray BeaconJSONArray = new JSONArray(Arrays.asList(Beacons));\n\n\n // call server to update classroom\n\n StringRequest request = new StringRequest(Request.Method.POST, Constants.UpdateCR, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n try {\n\n if (!response.isEmpty()) {\n\n JSONObject jsonObject = new JSONObject(response);\n String status = jsonObject.getString(\"state\");\n\n if (status.equals(\"yes\")) {\n\n progressDialog.dismiss();\n Toast.makeText(getBaseContext(), \" Class Room Updated.\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(getBaseContext(), adminHome.class);\n startActivity(intent);\n\n } else {\n progressDialog.dismiss();\n Toast.makeText(getBaseContext(), \"There is problem please try again\", Toast.LENGTH_SHORT).show();\n }\n }\n\n } catch (JSONException e) {\n progressDialog.dismiss();\n Toast.makeText(getBaseContext(), \"There is problem please try again\", Toast.LENGTH_SHORT).show();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n Toast.makeText(getBaseContext(), \"There is an error at connecting to server .\", Toast.LENGTH_SHORT).show();\n }\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n\n // HTTP request parameters\n\n HashMap<String, String> map = new HashMap<>();\n map.put(\"RoomID\", ID.getText().toString());\n map.put(\"RoomName\", Name.getText().toString());\n map.put(\"capacity\", Cap.getText().toString());\n map.put(\"BeaconIDs\", BeaconJSONArray.toString());\n return map;\n }\n };\n\n // Add The volly request to the Singleton Queue.\n Singleton_Queue.getInstance(getBaseContext()).Add(request);\n\n // End of Volly http request\n }\n\n\n } catch (Exception e) {\n Toast.makeText(getBaseContext(), \"There is problem please try again\", Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n //End Update classroom Button Click Event Listener\n\n\n }", "public void btnAvailableBadges (View view) {\n Intent intent = new Intent(this, AvailableBadges.class);\n intent.putExtra(\"status_Array\",stateArray);\n startActivity(intent);\n }" ]
[ "0.50530577", "0.49820718", "0.49668217", "0.49625066", "0.49600205", "0.49354243", "0.4915908", "0.49088413", "0.49032137", "0.48987547", "0.4881174", "0.4841255", "0.4812973", "0.48030174", "0.4801228", "0.48004565", "0.4793993", "0.47933155", "0.47805232", "0.47771603", "0.47751004", "0.47716758", "0.47632048", "0.4761221", "0.4737486", "0.47273865", "0.47209296", "0.46890867", "0.4683186", "0.4655153", "0.4647365", "0.4639891", "0.46382433", "0.46359408", "0.4632707", "0.462684", "0.46099928", "0.4602166", "0.4592968", "0.45926458", "0.4590994", "0.45778382", "0.457292", "0.4570223", "0.4565244", "0.4563171", "0.45593548", "0.4557416", "0.4553812", "0.45425925", "0.454236", "0.4536289", "0.4533136", "0.4529269", "0.45204017", "0.45106724", "0.45085126", "0.44899634", "0.44760582", "0.44739455", "0.4470335", "0.44652635", "0.4464836", "0.44593328", "0.44552296", "0.44524667", "0.44476074", "0.444572", "0.44420248", "0.44415942", "0.4433858", "0.44270507", "0.44260725", "0.4425544", "0.44244075", "0.4421582", "0.44192275", "0.44188306", "0.441469", "0.44132078", "0.44115895", "0.44099182", "0.44083694", "0.44060716", "0.4397829", "0.4392966", "0.43928692", "0.43883687", "0.4388083", "0.4383242", "0.43820122", "0.4380111", "0.43796802", "0.4377541", "0.4377385", "0.43751228", "0.4371462", "0.4370253", "0.43679154", "0.4367391" ]
0.6251974
0
Method is called when return button is pressed. A URI is constructed with URL arguments detailing the UID, password, BID, and the action to return the book. The URI is converted to a String and uses Volley to send the request and parse the response.
public void returnBook(Copy copy){ int BID = copy.BID; //Build URI Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME) .authority(BASE_URL) .appendPath(PATH0) .appendPath(PATH1) .appendPath(PATH2) .appendQueryParameter(PARAM_ACTION, VALUE_ACTION_RETURN) .appendQueryParameter(PARAM_BID, Integer.toString(BID)) .appendQueryParameter(PARAM_UID, Integer.toString(VALUE_UID)) .appendQueryParameter(PARAM_PASSWORD, VALUE_PASSWORD) .build(); String urlString = builder.toString(); restartOnFinished = true; SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); SharedPreferences.Editor prefEditor = sharedPreferences.edit(); prefEditor.remove("ALARM" + BID + "-TO"); prefEditor.remove("ALARM" + BID + "-BODY"); prefEditor.remove("ALARM" + BID + "-TITLE"); prefEditor.remove("ALARM-BID" + BID); prefEditor.remove("ALARM" + BID + "-TYPE"); prefEditor.remove("ALARM" + BID + "-RING-TIME"); prefEditor.apply(); downloadJSON(urlString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 325) {\n if (resultCode == Activity.RESULT_OK) {\n String result = data.getStringExtra(\"RESULT_ISBN\");\n if (result.equals(clickedBook.getISBN())){\n //owner confirm receive returned book\n Toast.makeText(getActivity(), \"You successfully received this book\", Toast.LENGTH_SHORT).show();\n currentBookDocRef.update(\"returnDenoted\",\"false\");\n currentBookDocRef.update(\"status\",\"Available\");\n currentBookDocRef.update(\"borrowerID\", FieldValue.delete());\n currentBookDocRef.update(\"borrowerUname\", FieldValue.delete());\n currentBookDocRef.update(\"lat\", FieldValue.delete());\n currentBookDocRef.update(\"lng\", FieldValue.delete());\n borrowerSideBorrowedBookRef.update(\"returnDenoted\",\"false\");\n\n // for borrower,remove book from BorrowedBook\n borrowerSideBorrowedBookRef.delete();\n\n }\n else {\n Toast.makeText(getActivity(), \"The ISBN you scaned does not match the ISBN of the book\", Toast.LENGTH_SHORT).show();\n\n }\n }\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 0) {\n// Log.e(\"scanned isbn in task\", result);\n\n if (resultCode == Activity.RESULT_OK || resultCode == RESULT_INCOMPLETE) {\n String result = data.getStringExtra(\"isbn\");\n\n if (selectedISBN.equals(result)) {\n Intent intent = new Intent(ReturningTaskActivity.this, SuccessExchangeActivity.class);\n intent.putExtra(\"RETURNER\", result);\n intent.putExtra(\"OTHER_UID\", otherUID);\n startActivity(intent);\n } else {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN did not match selected book!\",\n Toast.LENGTH_SHORT).show();\n }\n } else if (resultCode == RESULT_INVALID) {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN is not valid\",\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void checkoutReturnPressed(View view){\n try {\n if (currentBook.copies != null) {\n if (!checkedOut) {\n DialogFragment bookFragment = SelectBookFragment.newInstance(BookDetailsActivity.this, currentBook.copies, currentBook.availableCopies);\n bookFragment.show(getFragmentManager(), \"Choose Book\");\n } else if (mCopy != null) {\n Log.i(\"LoginActivity\", \"RETURNED\");\n returnBook(mCopy);\n }\n } else {\n Toast.makeText(this, \"Book is still loading.\", Toast.LENGTH_SHORT).show();\n }\n }catch(Exception E){\n E.printStackTrace();\n Toast.makeText(this, \"Book is still loading.\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tpublic void finish() {\n\t\t\n\t\tIntent i=new Intent();\n\t\tBundle b=new Bundle();\n\t\tb.putString(\"Button\", ReturnString);\n\t\ti.putExtras(b);\n\t\t\n\t\tsetResult(RESULT_OK, i);\n\t\tsuper.finish();\n\t}", "@Override\n\tpublic void finish() {\n\t Intent data = new Intent();\n\t\t data.putExtra(\"returnKey1\",id );\n \t setResult(2, data);\n\t\t super.finish();\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n IntentResult scanISBN = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);\n if (scanISBN != null) {\n if (scanISBN.getContents() != null) {\n String ISBN = scanISBN.getContents();\n Book book = BookList.getBook(ISBN);\n if (book== null) {\n Toast.makeText(getActivity(), \"Book Does not Exist\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent book_info_intent = new Intent(getActivity(), book_description_activity.class);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"book\", book);\n if (book.getOwner().equalsIgnoreCase(UserList.getCurrentUser().getUsername())) {\n bundle.putInt(\"VISIBILITY\", 1); // 1 for show Edit button\n }\n else {\n bundle.putInt(\"VISIBILITY\", 2); // 2 for not show Edit button\n }\n book_info_intent.putExtras(bundle);\n startActivity(book_info_intent);\n }\n } else {\n Toast.makeText(getActivity(), \"No Results\", Toast.LENGTH_SHORT).show();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, intent);\n }\n }", "@Click(R.id.ivReturn)\n\tvoid toReturn() {\n\t\tfinish();\n\t}", "protected void returnResult(int resultCode) {\n\n \tIntent intent = new Intent();\n \t\n \t// if successful edit, return edited gas record data to caller \n \tif (resultCode == Activity.RESULT_OK) {\n \t\tintent.putExtra(GasRecordActivity.RECORD, record);\n \t}\n \t\n \tsetResult(resultCode, intent); \n \tfinish(); \n }", "@Override\n public void onClick(View v){\n backIntent.putExtra(\"username\", intent.getStringExtra(\"username\"));\n backIntent.putExtra(\"password\", intent.getStringExtra(\"password\"));\n backIntent.putExtra(\"name\", intent.getStringExtra(\"name\"));\n backIntent.putExtra(\"gender\", intent.getStringExtra(\"gender\"));\n backIntent.putExtra(\"age\", intent.getStringExtra(\"age\"));\n\n startActivity(backIntent);\n finish();\n }", "public void retrieve() {\n //retrieving details EditText input bars\n password_handler = findViewById(R.id.PasswordInput);\n email_handler = findViewById(R.id.EmailInput);\n inputPhone = findViewById(R.id.inputPhone);\n inputFullName = findViewById(R.id.inputFullName);\n\n city = findViewById(R.id.cityNameInput);\n street = findViewById(R.id.streetNameInput);\n floor = findViewById(R.id.floorNumberInput);\n appartment = findViewById(R.id.appartmentNumberInput);\n houseNum = findViewById(R.id.buildingNumberInput);\n\n progressBar2 = findViewById(R.id.progressBar2);\n\n //retrieving the names near the input bars\n pass = findViewById(R.id.Password);\n mail = findViewById(R.id.Email);\n phone = findViewById(R.id.Phone);\n name = findViewById(R.id.fullName);\n\n //confirm button\n confirm = findViewById(R.id.confirm);\n\n //checkboxes of advertiser and adopter\n inputadvertiser = findViewById(R.id.ifadvertiser);\n inputadopter = findViewById(R.id.ifadopter);\n\n }", "@Override\n\tpublic void finish() {\n\t\tIntent data = new Intent();\n\t\t// Activity finished ok, return the data\n\t\t\n\t\t// TODO 2 put the data with the id returnValue\n\t\tdata.putExtra(RATING_OPTION, \"\"+rating.getProgress());\n\t\t\n\t\t// TODO 3 use setResult(RESULT_OK, intent);\n\t\t// to return the Intent to the application\n\t\tsetResult(RESULT_OK, data);\n\n\t\tsuper.finish();\n\t}", "private void returnBook(String string) {\n\t\t\n\t}", "Request back();", "public void buttonClickHandler(View view) {\n EditText et = (EditText) findViewById(R.id.zipField);\n String stringZip = et.getText().toString();\n //Handles empty input\n if(!stringZip.matches(\"\")) {\n int zipCode = Integer.parseInt(stringZip);\n\n Intent data = new Intent();\n data.putExtra(MainActivity.RETURN_MESSAGE, zipCode);\n setResult(RESULT_OK, data);\n finish();\n }\n }", "@Override\n public void starryEyes(String result) {\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\",result);\n setResult(RESULT_OK,returnIntent);\n finish();\n }", "private void returnIndividual(int keyPosition){\n Intent returnData = new Intent();\n returnData.putExtra(\"caller\", caller);\n returnData.putExtra(\"username\", keys.get(keyPosition));\n returnData.putExtra(\"name\", individuals.get(keyPosition));\n setResult(RESULT_OK, returnData);\n finish();\n }", "@Override\n public void onBackPressed() {\n \tsetResult(RESULT_OK, getIntent());\n \tfinish();\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data){\n finish();\n startActivity(getIntent());\n }", "public void onClick(View v) {\n int bookID = MySQLiteHelper.addBook(currentBook);\n ArrayList<String> authors = currentBook.getAllAuthors();\n if (authors.isEmpty()){\n\n }\n else {\n for(String author : authors){\n // Link current book with all authors\n MySQLiteHelper.addAuthor(author);\n int authorID = MySQLiteHelper.getAuthorID(author);\n MySQLiteHelper.linkBookWithAuthor(bookID, authorID);\n }\n }\n // Then go back to book list\n startActivity(new Intent(BookDetailActivity.this, BookListViewActivity.class));\n }", "@Override\n public void onClick(View arg0) {\n\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"merchantNumber\",merchantNamesList.get(position).getMerchantNumber());\n returnIntent.putExtra(\"merchantName\",merchantNamesList.get(position).getMerchantName());\n setResult(RESULT_OK, returnIntent);\n finish();\n }", "void handleBitcoinURI() {\n\n if (!bitcoinURI.isPresent()) {\n return;\n }\n\n BitcoinURI uri = bitcoinURI.get();\n Optional<Address> address = Optional.fromNullable(uri.getAddress());\n Optional<Coin> amount = Optional.fromNullable(uri.getAmount());\n\n if (address.isPresent()) {\n\n final Optional<Recipient> recipient;\n\n // Get the current wallet\n Optional<WalletSummary> currentWalletSummary = WalletManager.INSTANCE.getCurrentWalletSummary();\n\n if (currentWalletSummary.isPresent()) {\n\n // Attempt to locate a contact with the address in the Bitcoin URI to reassure user\n List<Contact> contacts = CoreServices\n .getOrCreateContactService(currentWalletSummary.get().getWalletId())\n .filterContactsByBitcoinAddress(address.get());\n\n if (!contacts.isEmpty()) {\n // Offer the first contact with the matching address (already null checked)\n Address bitcoinAddress = contacts.get(0).getBitcoinAddress().get();\n recipient = Optional.of(new Recipient(bitcoinAddress));\n recipient.get().setContact(contacts.get(0));\n } else {\n // No matching contact so make an anonymous Recipient\n recipient = Optional.of(new Recipient(address.get()));\n }\n\n } else {\n // No current wallet so make an anonymous Recipient\n recipient = Optional.of(new Recipient(address.get()));\n }\n\n // Must have a valid address and therefore recipient to be here\n enterAmountPanelModel\n .getEnterRecipientModel()\n .setValue(recipient.get());\n\n // Add in any amount or treat as zero\n enterAmountPanelModel\n .getEnterAmountModel()\n .setCoinAmount(amount.or(Coin.ZERO));\n }\n }", "private static void returnBook() {\n\t\tnew ReturnBookUI(new returnBookControl()).run();\t// method name change ReturnBookControl() to returnBookControl(),RuN to run()\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(ScannerActivity.this,\"Redirecting...\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerResult.class);\n assignObjValue(laptopCheckOutInfoList, key);\n intent.putExtra(\"laptop_record_info\", laptopCheckOutInfo); //return the object li as a serialized object\n startActivity(intent);\n }", "@Override\n protected void responseAction(){\n global.token = ((first_screen)parent).token;\n global.name = ((first_screen)parent).full_name;\n // intent.putExtra(\"token\", global.tokenList);\n //intent.putExtra(\"userId\", ((first_screen)parent).userId);\n System.out.println(\"firebase:\"+ FirebaseInstanceId.getInstance().getToken());\n //intent.putExtra(\"tokenStr\", ((first_screen)parent).tokenStr);\n System.out.println(\"got response from server: new user entered\");\n System.out.println(\"Refresh ID:\"+FirebaseInstanceId.getInstance().getId());\n int responseCode = this.parent.getCode(jsonResponse);\n System.out.println(\"got response code:\"+this.parent.getCode(jsonResponse));\n if(responseCode<=2) {\n\n //make sure aval is in the stack of pages\n //thus do startActivity twice\n Intent intent = new Intent(this.parent,availability_page.class);\n parent.startActivityForResult(intent, 7);\n }\n\n if(responseCode==2){\n Intent intent = new Intent(this.parent,homepage.class);\n parent.startActivityForResult(intent, 7);\n }\n else if(responseCode<1){\n parent.getPopup(parent.getMsg(jsonResponse));\n }\n // this.parent.finish();\n //this.parent.switchIntentOnResponse(responseCode,parent.getMsg(jsonResponse),intent,true);\n\n }", "private void onPostDownloadListener(String result){\n\n\t\tIntent intent = new Intent();\n\t\tintent.putExtra(\"json_items\", result);\n\t\tthis.setResult(RESULT_OK, intent);\n\t\tfinish();\n\t\t//(\"json_items\", result);\n\t}", "public void returnBook()\n\t{\n\t\tavailableBooks++;\n\t}", "@Override\n public void onBackPressed() {\n Log.d(TAG, \"onBackPressed\");\n\n //set the result along with the intent\n setResult(Activity.RESULT_OK, buildResultIntent());\n super.onBackPressed(); //this will call finish\n }", "public void onClick(DialogInterface dialog, int which) {\n\n Intent nextScreen2 = new Intent(getApplicationContext(), CreateAccount.class);\n System.out.println(\"IN ALRT\");\n System.out.println(login);\n nextScreen2.putExtra(\"login\", login);\n nextScreen2.putExtra(\"password1\", password);\n nextScreen2.putExtra(\"password2\", password2);\n nextScreen2.putExtra(\"email\", email);\n nextScreen2.putExtra(\"birth_date\", dob);\n\n\n startActivityForResult(nextScreen2, 0);\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n// switch (resultCode) { //resultCode为回传的标记,我在第二个Activity中回传的是RESULT_OK\n// case Activity.RESULT_OK:\n// Bundle b=intent.getExtras(); //data为第二个Activity中回传的Intent\n// barCode = b.getString(\"code\");//str即为回传的值\n// mCallbackContext.success(barCode);\n// break;\n// default:\n// break;\n// }\n }", "public void bookResource(View view)\r\n {\n startActivity(new Intent(this, BookResource.class));\r\n // Intent intent_bookResource = new Intent(this, BookResource.class );\r\n // intent_bookResource.putExtra(\"userName\", userName);\r\n // this.startActivity(intent_bookResource);\r\n\r\n\r\n\r\n\r\n }", "private void newVolume(){\n Intent intent = getIntent();\n\n id = intent.getStringExtra(\"Id\");\n\n newUrl = \"https://www.googleapis.com/books/v1/volumes/\"+id;\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, newUrl,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Log.d(\"RESPONSE\", \"onResponse: \" + response);\n\n parseJSONResponse(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"SHIT\", \"onErrorResponse: wrong\");\n }\n });\n queue.add(stringRequest);\n }", "private void saveBook() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String productName = etTitle.getText().toString().trim();\n String author = etAuthor.getText().toString().trim();\n String price = etPrice.getText().toString().trim();\n String quantity = etEditQuantity.getText().toString().trim();\n String supplier = etSupplier.getText().toString().trim();\n String supplierPhoneNumber = etPhoneNumber.getText().toString().trim();\n\n // If this is a new book and all of the fields are blank.\n if (currentBookUri == null &&\n TextUtils.isEmpty(productName) && TextUtils.isEmpty(author) &&\n TextUtils.isEmpty(price) && quantity.equals(getString(R.string.zero)) &&\n TextUtils.isEmpty(supplier) && TextUtils.isEmpty(supplierPhoneNumber)) {\n // Exit the activity without saving a new book.\n finish();\n return;\n }\n\n // Make sure the book title is entered.\n if (TextUtils.isEmpty(productName)) {\n Toast.makeText(this, R.string.enter_title, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the author is entered.\n if (TextUtils.isEmpty(author)) {\n Toast.makeText(this, R.string.enter_author, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the price is entered.\n if (TextUtils.isEmpty(price)) {\n Toast.makeText(this, R.string.enter_price, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the quantity is entered if it is a new book.\n // Can be zero when editing book, in case the book is out of stock and user wants to change\n // other information, but hasn't received any new inventory yet.\n if (currentBookUri == null && (quantity.equals(getString(R.string.zero)) ||\n quantity.equals(\"\"))) {\n Toast.makeText(this, R.string.enter_quantity, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier is entered.\n if (TextUtils.isEmpty(supplier)) {\n Toast.makeText(this, R.string.enter_supplier, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier's phone number is entered.\n if (TextUtils.isEmpty(supplierPhoneNumber)) {\n Toast.makeText(this, R.string.enter_suppliers_phone_number,\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Convert the price to a double.\n double bookPrice = Double.parseDouble(price);\n\n // Convert the quantity to an int, if there is a quantity entered, if not set it to zero.\n int bookQuantity = 0;\n if (!quantity.equals(\"\")) {\n bookQuantity = Integer.parseInt(quantity);\n }\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n values.put(BookEntry.COLUMN_BOOK_AUTHOR, author);\n values.put(BookEntry.COLUMN_BOOK_PRICE, bookPrice);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, bookQuantity);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER, supplier);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhoneNumber);\n\n // Check if this is a new or existing book.\n if (currentBookUri == null) {\n // Insert a new book into the provider, returning the content URI for the new book.\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the row ID is null, then there was an error with insertion.\n Toast.makeText(this, R.string.save_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful, display a toast.\n Toast.makeText(this, R.string.save_successful, Toast.LENGTH_SHORT).show();\n }\n } else {\n // Check to see if any updates were made if not, no need to update the database.\n if (!bookHasChanged) {\n // Exit the activity without updating the book.\n finish();\n } else {\n // Update the book.\n int rowsUpdated = getContentResolver().update(currentBookUri, values, null,\n null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsUpdated == 0) {\n // If no rows were updated, then there was an error with the update.\n Toast.makeText(this, R.string.update_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful, display a toast.\n Toast.makeText(this, R.string.update_successful,\n Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n // Exit the activity, called here so the user can enter all of the required fields.\n finish();\n }", "@Override\n public void onClick(View arg) {\n mUsername = ((EditText) findViewById(R.id.username)).getText().toString();\n mPassword = ((EditText) findViewById(R.id.password)).getText().toString();\n // Validate the username and password for null or empty.\n if (!isValidInput()) {\n Toast.makeText(LoginScreenActivity.this, R.string.invalid_user_credentials, Toast.LENGTH_SHORT).show();\n return;\n }\n performOAuthLogin(arg);\n finish();\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n Log.i(TAG, \"result back from explicit intent activity\");\n // Check that it is OpenExplicitIntent with an ok result\n if(requestCode == EMAIL_ACTIVITY_RESULT_CODE) {\n if(resultCode == RESULT_OK) {\n\n // Get string data from the intent\n String returnContent = data.getStringExtra(\"keyName\");\n\n //input the email content into the textview at bottom of screen\n TextView textView = (TextView) findViewById(R.id.emailContent);\n textView.setText(returnContent);\n Button sendButton = (Button) findViewById(R.id.button);\n sendButton.setEnabled(true);\n }\n }\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent();\n intent.putExtra(\"result\", event);\n setResult(Activity.RESULT_CANCELED, intent);\n finish();\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == FORGET && resultCode == FORGET) {\n\t\t\tsetResult(FORGET);\n\t\t\tfinish();\n\t\t\t\n\t\t}\n\t}", "public void submit(View view) {\n EditText nameBox = (EditText)findViewById(R.id.name);\n String name = \"null\";\n try {\n name = URLEncoder.encode(nameBox.getText().toString(), \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n System.out.println(\"Error Encoding Name\");\n }\n String encodedData = JSONify.encode(name, data);\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = Reference.BASE_URL + \"b/\" + Reference.ean + encodedData;\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(com.android.volley.Request.Method.GET, url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //TODO add an alert here\n System.out.println(\"GET request error\");\n }\n });\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n\n Reference.ean = null;\n Reference.name = null;\n Reference.canEat = -1;\n Reference.data = null;\n switchToHome();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1 && resultCode == RESULT_OK) {\n fade(rlMap);\n Map<String, Object> params = User.getToken(this);\n WebBridge.send(\"webservices.php?task=getStatusMap\", params, \"Cargando\", this, this);\n } else if (requestCode == 1 && resultCode != RESULT_OK) {\n clickBack(null);\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_return);\n name = findViewById(R.id.ReturnNameFilled);\n date = findViewById(R.id.ReturnDateFilled);\n lendDate = findViewById(R.id.ReturnLendDateFilled);\n product = findViewById(R.id.ReturnProductFilled);\n intent = getIntent();\n returnButton = findViewById(R.id.ReturnButton);\n lend = intent.getParcelableExtra(\"item\");\n returnDate = lend.getDay() + \"/\" + lend.getMonth() + \"/\" + lend.getYear();\n millisecond = lend.getTimeOfLend().getTime();\n lendDateString = DateFormat.format(\"dd/MM/yy\", new Date(millisecond)).toString();\n Quantity = lend.getQuantity();\n mRootRef = FirebaseDatabase.getInstance().getReference();\n\n setLend(); // getting the values from the database and setting them in the textviews.\n Button(); // deleting the database entry.\n }", "void returnBook(int bookId) {\n\t\t\n\t\t// check if the book id is not valid \n\t\tif (!this.isBookIdValid(bookId)){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// checks if that book was never taken out\n\t\tif (this.isBookAvailable(bookId))\n\t\t{\n\t\t\treturn; \n\t\t}\n\t\t\t\t\n\t\t// sets the counter on that patron as one less \n\t\tthis.patronBookCount[this.bookShelf[bookId].getCurrentBorrowerId()]--;\n\t\t\n\t\t// sets the current borrower to none\n\t\tthis.bookShelf[bookId].returnBook();\n\t}", "@RequestMapping(value = \"/token\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic String home(@RequestParam(\"signature\") String signature,\n\t\t\t@RequestParam(\"echostr\") String echostr,\n\t\t\t@RequestParam(\"timestamp\") String timestamp,\n\t\t\t@RequestParam(\"nonce\") String nonce, \n\t\t\tHttpServletResponse res,Model model) throws IOException {\n\t String signatureb = signature;\n \t\tString echostrb = echostr;\n \t String timestampb = timestamp;\n \t String nonceb = nonce;\n \t Boolean istrue = false;\n \t istrue = checkSecret.CheckSignatureb(signatureb, timestampb, nonceb);\n \t if(istrue) {\n \t \t return echostrb;\n \t }\n \t \n\t\t return \"home\";\n\t}", "@Override\n public void onClick(View v) {\n\n AsyncDataClass asyncRequestObject = new LoginActivity.AsyncDataClass();\n asyncRequestObject.execute(serverUrlCancel, LoginText);\n\n //Intent returnIntent = new Intent();\n //setResult(Activity.RESULT_OK,returnIntent);\n finish();\n\n }", "@Override\n public void onClick(View v) {\n Intent returnIntent = new Intent();\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tswitch (requestCode) {\n\t\tcase 1:\n\t\t\tif(data != null){\n\t\t\t\tString result = data.getStringExtra(\"result\");\n\t\t\t\tif(result != null)\n\t\t\t\t\t//tv.setText(result);\n\t\t\t\t\tSystem.out.println(result);\n\t\t\t\tUri uri = Uri.parse(result); \n\t\t\t\tIntent it = new Intent(Intent.ACTION_VIEW, uri); \n\t\t\t\tstartActivity(it);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n if (resultCode == RESULT_OK) {\n this.finish();\n }\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(requestCode == 1){\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t}", "private void returnToPriviousActivityWithoutDevice(){\r\n \tIntent finishIntent = new Intent();\r\n finishIntent.putExtra(EXTRA_DEVICE_ADDRESS, \"finish\");\r\n setResult(Activity.RESULT_CANCELED, finishIntent);\r\n BluetoothActivity.this.finish();\r\n }", "public void setReturnUrl(String returnUrl) {\n this.returnUrl = returnUrl;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//httpclient.setRedirectHandler(new DefaultRedirectHandler() { });\n\t\tString[] urls = new String[10];\n\n\t\tString base_url = \"http://ec2-23-20-255-144.compute-1.amazonaws.com/fridge/\";\n\n\t\tString login \t\t\t\t=\tbase_url + \"login/\";\n\t\tString search_fridge_name \t=\tbase_url + \"search/?q=\";\n\t\tString search_fridge_id\t\t=\tbase_url + \"search-id/?q=\";\t//TODO add to django\n\t\tString search_upc \t\t\t=\tbase_url + \"search-upc/?q=\";\n\t\tString post_item \t\t\t=\tbase_url + \"update-item/\";\n\n\t\tIntent intent = this.getIntent();\n\t\tint flags = intent.getFlags();\n\t\tintent.getAction();\n\n\t\tBundle extras = null;\n\t\ttry{\n\t\t\textras = intent.getExtras();\n\t\t} catch (NullPointerException e) {\n\n\t\t}\n\t\tif(extras != null){\n\t\t\tif(extras.containsKey(\"upc\")){\n\t\t\t\tupc_from_intent = (String)extras.get(\"upc\");\n\t\t\t\tsearch_upc += upc_from_intent;\n\t\t\t\turls[nSEARCH_FOR_UPC] = search_upc;\n\t\t\t}else if(extras.containsKey(\"item_to_add\")){\n\t\t\t\tString item_to_add = (String)extras.get(\"item_to_add\");\n\t\t\t\turls[nADD_ITEM_URL] \t\t\t=\tpost_item;\n\t\t\t\turls[nADD_ITEM_HACK] \t\t\t= \titem_to_add;\n\t\t\t}else if(extras.containsKey(\"fridge_name\")){\n\t\t\t\tsearch_fridge_name \t+=\textras.getString(\"fridge_name\");\n\t\t\t\turls[nITEMS_FROM_FRIDGE_NAME] \t= \tsearch_fridge_name;\n\t\t\t}else if(extras.containsKey(\"fridge_id\")){\n\t\t\t\tsearch_fridge_id\t+=\textras.getInt(\"fridge_id\");\n\t\t\t\turls[nITEMS_FROM_FRIDGE_ID]\t\t=\tsearch_fridge_id;\n\t\t\t}else{\n\t\t\t\t//TODO return unknown extra detected\n\t\t\t}\n\t\t}else{\n\t\t\t//TODO return extra required\n\t\t}\n\n\n\t\tnew DownloadJsonItems().execute(urls);\n\t}", "void returnbook(String book){\n\t\tthis.books[no_of_books]=book;\n\t\tno_of_books++;\n\t\tSystem.out.println(book+\" ...return\");\n\n\t}", "@Override\n public void onBackPressed(){\n Intent backToMain = new Intent();\n backToMain.putExtra(\"Customer\", customer);\n setResult(RESULT_OK, backToMain);\n super.onBackPressed();\n }", "@Override\n public void onClick(View v) {\n if(returnResult == 999){ // No buttons has been clicked\n toast = Toast.makeText(MainActivity.this, \"Please press the \\\"ADDRESS\\\" button\", Toast.LENGTH_LONG);\n toast.show();\n }else if(returnResult == RESULT_CANCELED){ // Result from the second activity was empty\n toast = Toast.makeText(MainActivity.this, \"Invalid input, please click \\\"ADDRESS\\\" button\", Toast.LENGTH_LONG);\n toast.show();\n }else if(returnResult == RESULT_OK){ // Result from the second activity was non-empty\n // Start new activity with implicit intent that handles geo scheme for URI\n Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(\"geo:0,0?q=\" + Uri.encode(address)));\n startActivity(i);\n }\n }", "@Override\n public Navigation run() throws Exception {\n Map<String, Object> input = null;\n Key cafeKey=null;\n String returnKey = null;\n \n //投稿ボタンを押した場合\n if(request.getParameter(\"dataPost\") != null){\n \n input = new RequestMap(request);\n \n //店舗名称をセット\n \n \n //エリア系のデータを取得\n String geohash4 = null;\n String geohash5 = null;\n String geohash6 = null;\n String geohash8 = null;\n String geohashAll = null;\n String geohashAround = null;\n String storeFullName = null;\n \n \n if(input.get(\"storeName\") != null && \n !\"\".equals(input.get(\"storeName\")) && \n !\"(null)\".equals(input.get(\"storeName\")) &&\n input.get(\"storeFlag\") != null && \n !\"\".equals(input.get(\"storeFlag\")) && \n !\"(null)\".equals(input.get(\"storeFlag\"))\n ){\n String storeMainName = CafeUtil.createStoreMainName(EscapeUtil.toHtmlStringForObject(input.get(\"storeFlag\")).trim());\n String storeSubName = EscapeUtil.toHtmlStringForObject(input.get(\"storeName\")).trim();\n storeFullName = storeMainName+\" \"+storeSubName;\n input.put(\"storeFullName\", storeFullName);\n }\n \n //住所から緯度経度を取得\n double lat = 0;\n double lng = 0;\n //時間を取得\n String nowTime = DateTimeUtil.getDateTimeString();\n if(request.getParameter(\"storeAddress\") != null && request.getParameter(\"storeAddress\") != \"\"){\n //エリア系データを取得して、DBにいるか問い合わせ\n String[] areaAry = AreaHandle.feedGeoHash(request.getParameter(\"storeAddress\"));\n if(areaAry != null){\n if(areaAry.length == 7){\n geohashAll = areaAry[0];\n geohash4 = areaAry[6];\n geohash5 = areaAry[5];\n geohash6 = areaAry[1];\n geohash8 = areaAry[2];\n lat = Double.valueOf(areaAry[3]);\n lng = Double.valueOf(areaAry[4]);\n }\n }\n //geohashの周りの値を取得\n geohashAround = CafeUtil.geohashAround(geohash6);\n \n input.put(\"lat\", String.valueOf(lat));\n input.put(\"lon\", String.valueOf(lng));\n input.put(\"geohash4\", geohash4);\n input.put(\"geohash5\", geohash5);\n input.put(\"geohash6\", geohash6);\n input.put(\"geohash8\", geohash8);\n input.put(\"geohashAround\", geohashAround);\n input.put(\"geohashAll\", geohashAll);\n input.put(\"deleteFlag\", \"0\");\n input.put(\"updateDateTime\", nowTime);\n }\n \n \n //更新の場合\n if(request.getParameter(\"key\") != null && request.getParameter(\"key\") != \"\"){\n \n //input.put(\"iine\", \"0\");\n input.put(\"key\",request.getParameter(\"key\"));\n //DBを更新\n cafeKey = service.updateData(input);\n }else{\n //フォームのパラメータを取得\n //String StoreName = (String )createStoreName(request.getParameter(\"storeName\"),request.getParameter(\"storeFlag\"));\n //input.put(\"storeName\", StoreName);\n \n //イイネ\n /*\n if(request.getParameter(\"iine\") != null && request.getParameter(\"iine\") != \"\"){\n input.put(\"iine\", 1);\n }\n */\n \n //DBに投入\n cafeKey = service.postData(input);\n \n }\n }\n \n //削除の場合\n if(request.getParameter(\"delete\") != null && request.getParameter(\"delete\") != \"\"){\n input = new RequestMap(request);\n input.put(\"deleteFlag\", \"1\");\n input.put(\"key\",request.getParameter(\"key\"));\n //DBを更新\n cafeKey = service.deleteData(input);\n }\n if(cafeKey != null){\n returnKey = String.valueOf(cafeKey.getId());\n } \n requestScope(\"returnKey\", returnKey);\n //nullがセットされないため対策\n input = notNullinput(input);\n requestScope(\"reqParam\", input);\n return forward(\"index.vm\");\n }", "private void getStudentDetails(final String oid) {\n\n\n // Tag used to cancel the request\n String tag_string_req = \"req_login\";\n\n pDialog.setMessage(\"Searching..\");\n showDialog();\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.URL_ADMIN_STUDENT_PROFILE, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response1) {\n android.util.Log.d(TAG, \"Login Response: \" + response1.toString());\n hideDialog();\n\n try {\n JSONObject jObj = new JSONObject(response1);\n boolean error = jObj. getBoolean(\"error\");\n\n // Check for error node in json\n if (!error) {\n\n // Now store the user in SQLite\n\n JSONObject student = jObj.getJSONObject(\"student\");\n String fname = student.getString(\"fname\");\n String lname = student.getString(\"lname\");\n String admno = student.getString(\"admission_no\");\n String purpose = student.getString(\"purpose\");\n String dob = student.getString(\"dob\");\n String gender = student.getString(\"gender\");\n String mobno = student.getString(\"mobno\");\n String pmobno = student.getString(\"pmobno\");\n String email = student.getString(\"email\");\n String batch = student.getString(\"batch\");\n String stream_name = student.getString(\"stream_name\");\n String branch_name = student.getString(\"branch_name\");\n\n String date_of_leaving = student.getString(\"date_of_leaving\");\n String date_of_return = student.getString(\"date_of_return\");\n String time_of_leaving = student.getString(\"time_of_leaving\");\n String time_of_return = student.getString(\"time_of_return\");\n\n// Toast.makeText(getApplicationContext(),\n// fname+\"/\"+lname+\"/\"+address+\"/\"+dob+\"/\"+gender+\"/\"+mobno+\"/\"+pmobno+\"/\"+email+\"/\"+batch+\"/\"\n// +stream_id+\"/\"+branch_id, Toast.LENGTH_LONG).show();\n t1.setText(admno);\n t2.setText(fname+\" \"+lname);\n t3.setText(time_of_leaving);\n t4.setText(time_of_return);\n t5.setText(purpose);\n t6.setText(date_of_leaving);\n t7.setText(date_of_return);\n\n\n\n } else {\n // Error in login. Get the error message\n String errorMsg1 = jObj.getString(\"error_msg1\");\n Toast.makeText(getApplicationContext(),\n errorMsg1, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Json error: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n android.util.Log.e(TAG, \"Login Error: \" + error.getMessage());\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to login url\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"oid\", oid);\n\n return params;\n }\n\n };\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if(resultCode == Activity.RESULT_OK && requestCode == REQUEST_CODE_ADD){\n if (data!=null){\n// data = getIntent();\n String returnedBookString = data.getStringExtra(\"returnedBook\");\n Book book = new Book(returnedBookString);\n bookArrayList.add(book);\n\n }\n for(Book books:bookArrayList){\n listLayout.removeAllViews();\n buildItemView(books); }\n }\n\n\n }", "public void returnButtonOnClick(View v){\n // Check if there is an internet connection\n // honestly this should be in controller\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n if (isConnected) {\n loadingDialog.show(getSupportFragmentManager(), \"loading\");\n controller.startQuery();\n }\n else{\n timeoutDialog.show(getSupportFragmentManager(), \"timeout\");\n }\n }", "@Override\n public void onClick(View view) {\n StringRequest stringRequest = new StringRequest(Request.Method.POST, url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n// System.out.println(response);\n Context context = getApplicationContext();\n try {\n JSONObject jsonResponse = new JSONObject(response);\n SharedPreferences.Editor editor = context\n .getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE)\n .edit();\n editor.putString(\"token\", jsonResponse.getString(\"token\"));\n editor.commit();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n// Toast toast = Toast.makeText(context, response, Toast.LENGTH_LONG);\n// toast.show();\n\n gotoHomeActivity();\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(error);\n Context context = getApplicationContext();\n Toast toast = Toast.makeText(context, String.valueOf(error), Toast.LENGTH_LONG);\n toast.show();\n }\n }){\n @Override\n protected Map<String, String> getParams()\n {\n Map<String, String> params = new HashMap<String, String>();\n // Get user's input from the TextFields for email and password.\n String email = String.valueOf(textField_registerEmail.getText());\n String password = String.valueOf(textField_registerPassword.getText());\n params.put(\"email\", email);\n params.put(\"password\", password);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n }", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t\tpostParameters[0] = new PostParameter(\"keyword\", searchKeyword);\n\t\t\t\tpostParameters[1] = new PostParameter(\"university\", university);\n\t\t\t\tpostParameters[2] = new PostParameter(\"page\", Integer.toString(requestTime));\n\t\t\t\t\n\t\t\t\tjsonString = HttpUtil.httpRequest(HttpUtil.USER_SEARCHBOOKS, postParameters, HttpUtil.POST);\n\t\t\t\tif (jsonString != null) {\t\t\t\t\t\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.what = what;\n\t\t\t\t\thandler.sendMessage(msg);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\thandler.sendEmptyMessage(-1);\n\t\t\t\t}\n\t\t\t}", "private void viewRecordButtonActionPerformed() {\n String uri = recordURIComboBox.getSelectedItem().toString();\n String recordJSON = \"\";\n\n try {\n if(aspaceClient == null) {\n String host = hostTextField.getText().trim();\n String admin = adminTextField.getText();\n String adminPassword = adminPasswordTextField.getText();\n\n aspaceClient = new ASpaceClient(host, admin, adminPassword);\n aspaceClient.getSession();\n }\n\n recordJSON = aspaceClient.getRecordAsJSON(uri, paramsTextField.getText());\n\n if(recordJSON == null || recordJSON.isEmpty()) {\n recordJSON = aspaceClient.getErrorMessages();\n }\n } catch (Exception e) {\n recordJSON = e.toString();\n }\n\n // see whether to display window with syntax highlighting\n if (mainFrame == null || mainFrame.getAtVersionNumber().contains(\"15\")) {\n CodeViewerDialog codeViewerDialog = new CodeViewerDialog(this, SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, recordJSON, true, true);\n codeViewerDialog.setTitle(\"REST ENDPOINT URI: \" + uri);\n codeViewerDialog.setASpaceClient(aspaceClient);\n codeViewerDialog.pack();\n codeViewerDialog.setVisible(true);\n } else {\n ImportExportLogDialog logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, recordJSON);\n logDialog.setTitle(\"REST ENDPOINT URI: \" + uri);\n logDialog.showDialog();\n }\n }", "@Override\r\n\tprotected Resultful getQRCodeURL() {\n\t\tString result = HttpRequest.post(domainName).body(getParamStr()).execute().body();\r\n\t\tlogger.info(\"【银联下单请求参数:{}】\",getParamStr());\r\n\t\tlogger.info(\"【银联商务下单响应:{}】:\",result);\r\n\t\tif (!StringUtils.isEmpty(result)){\r\n\t\t\tJSONObject ob = JSONObject.parseObject(result);\r\n\t\t\tif (\"SUCCESS\".equals(ob.getString(\"errCode\")))\r\n\t\t\t\treturn Resultful.qrCodeURL(ob.getString(\"billQRCode\"), billNo,String.format(\"%.2f\", Double.valueOf(totalAmount)));\t\r\n\t\t\telse\r\n\t\t\t\treturn Resultful.error(ob.getString(\"errMsg\"));\r\n\t\t}\r\n\t\treturn Resultful.error(\"下单失败\");\r\n\t}", "public void handleBackButton(ActionEvent event) throws IOException {\n showUserAccountPage(event);\n }", "@Override\n public void onClick(View view) {\n Intent dummyInt = new Intent();\n dummyInt.putExtra(CardActivity.CARD, ca);\n setResult(2, dummyInt);\n finish();\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode!= Activity.RESULT_OK){\n return;\n }\n\n }", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n if (requestCode == 0) {\n if (resultCode == RESULT_OK) {\n Intent scanResult = new Intent(getBaseContext(), OutdoorYouHere.class);\n String contents = intent.getStringExtra(\"SCAN_RESULT\");\n //scanResult.putExtra(\"FLOOR_NUMBER\", floorNumber);\n //scanResult.putExtra(\"ROOM_NUMBER\", roomNumber);\n scanResult.putExtra(\"QR_SCAN\", contents);\n startActivity(scanResult);\n\n } else if (resultCode == RESULT_CANCELED) {\n // Handle cancel\n }\n }\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n super.onActivityResult(requestCode, resultCode, intent);\n\n // Check if result comes from the correct activity\n if (requestCode == REQUEST_CODE) {\n AuthenticationResponse response = AuthenticationClient.getResponse(resultCode, intent);\n\n switch (response.getType()) {\n // Successful response, token received\n case TOKEN:\n // Store access token for later use\n editor = getSharedPreferences(\"SPOTIFY\", 0).edit();\n editor.putString(\"token\", response.getAccessToken());\n editor.apply();\n\n // Move to genre list activity if authentication was successful\n Intent genreIntent = new Intent(SpotifyAuthActivity.this, GenreListActivity.class);\n startActivity(genreIntent);\n break;\n\n case ERROR:\n Toast.makeText(SpotifyAuthActivity.this, \"ERROR\", Toast.LENGTH_LONG);\n break;\n\n default:\n Toast.makeText(SpotifyAuthActivity.this, \"CANCELLED\", Toast.LENGTH_LONG);\n }\n }\n }", "@Override\r\n\tpublic void finish() {\n\t\tIntent it = new Intent();\r\n\t\tit.putExtra(\"ROOM_ID\", roomID);\r\n\t\tit.putExtra(\"NAME_DEVICE\", nameDevice);\r\n\t\tit.putExtra(\"TYPE_DEVICE\", typeDevice);\r\n\t\tit.putExtra(\"PORT_DEVICE\", portDevice);\r\n\t\tit.putExtra(\"STATUS_DEVICE\", statusDevice);\r\n\t\tsetResult(RESULT_OK, it);\r\n\t\tsuper.finish();\r\n\t}", "void finish(String result, int resultCode);", "@Override\n public void run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode\", scanNumText);\n setResult(Activity.RESULT_OK, getIntent());\n finish();\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\t// Image captured and saved to mFileUri specified in the Intent\n\t\t\t\tsetImage();\n\t\t\t} else if (resultCode == RESULT_CANCELED) {\n\t\t\t\t// User cancelled the image capture\n\t\t\t\tToast.makeText( this, \"No photo captured!\", Toast.LENGTH_LONG ).show();\n\t\t\t} else {\n\t\t\t\t// Image capture failed, advise user\n\t\t\t\tToast.makeText( this, \"No photo captured!\", Toast.LENGTH_LONG ).show();\n\t\t\t}\n\t\t}\n\t\tif( requestCode == SEARCH_URL_REQUEST_CODE ) {\n\t\t\tif( resultCode == RESULT_OK ) {\n\t\t\t\tmSearchUrl = data.getStringExtra( \"grabUrl\" );\n\t\t\t\tsetUrl();\n\t\t\t\tTextView tv = (TextView)findViewById( R.id.search_text );\n\t\t\t\ttv.setTransformationMethod( null );\n\t\t\t\ttv.setInputType( InputType.TYPE_NULL );\n\t\t\t\tfindViewById( R.id.search_button ).setVisibility( View.GONE );\n\t\t\t} else {\n\t\t\t\tToast.makeText( this, \"Grabbing url failed.\", Toast.LENGTH_LONG ).show();\n\t\t\t}\n\t\t}\n\t}", "void validate(){\n Log.i(TAG,\"hash: \" + hash);\n\n String POST_PARAMS = \"&checknum=\" + checknum.getText().toString()+ \"&banknum=\" + banknum.getText().toString() + \"&branchnum=\" + branchnum.getText().toString() + \"&accountnum=\" + accountnum.getText().toString()+ \"&amount=\" + amount+ \"&date=\" + date+ \"&personid=\" + personid+ \"&uploader=\" + uploader + \"&hash=\" + hash;\n URL obj = null;\n HttpURLConnection con = null;\n try {\n obj = new URL(\"http://majdy.waqet.net/majdy/validate.php\");\n con = (HttpURLConnection) obj.openConnection(); // start a new connection to the server\n con.setRequestMethod(\"POST\");\n\n // For POST only - BEGIN\n con.setDoOutput(true);\n OutputStream os = con.getOutputStream();\n os.write(POST_PARAMS.getBytes());\n os.flush();\n os.close();\n // For POST only - END\n\n int responseCode = con.getResponseCode(); // get the response code from server\n Log.i(TAG, \"POST Response Code :: \" + responseCode);\n\n if (responseCode == HttpURLConnection.HTTP_OK) { //success\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n Log.i(TAG, \" response buffer :\" +response);\n in.close();\n inputLine = response.toString();\n\n\n if (inputLine.contains(\"Successfully Uploaded\")){\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(ImportingOCR.this, \"Successfully Uploaded\", Toast.LENGTH_SHORT).show();\n }\n });\n Intent intent = new Intent(ImportingOCR.this, ValidationResult.class); // move to the next page\n intent.putExtra(\"username\",uploader);\n intent.putExtra(\"personid\", personid);\n intent.putExtra(\"hash\", hash);\n startActivity(intent);\n }else{\n showAlert2();\n\n }\n // print result\n Log.i(TAG, response.toString());\n } else {\n Log.i(TAG, \"POST request did not work.\");\n }\n } catch (IOException e) {\n dialog.dismiss();\n System.out.println(\"Exception : \" + e.getMessage());\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ_SIGNUP && resultCode == RESULT_OK) {\n finishLogin(data);\n } else\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n public void onClick(View v) {\n \tIntent in = new Intent(getApplicationContext(), DownloadFile.class);\n in.putExtra(\"url\", url_get_file);\n startActivityForResult(in, 100);\n }", "@Override\n\t\tpublic void onFinished(HttpResponseResult responseResult) {\n\t\t\tint result = responseResult.getStatusCode();\n\t\t\tdismiss();\n\t\t\tif(result == 200||result==201){\n\t\t\t\tnew AlertDialog.Builder(AccountForgetPSWActivity.this)\n\t\t\t\t\t.setTitle(R.string.alert_title)\n\t\t\t\t\t.setMessage(R.string.get_psw_finish)\n\t\t\t\t\t.setPositiveButton(R.string.ok, \n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tInputMethodManager imm = (InputMethodManager)getSystemService(\n\t\t\t\t\t\t\t\t\t\t\t \t\tContext.INPUT_METHOD_SERVICE); \n\t\t\t\t\t\t\t imm.hideSoftInputFromWindow(((EditText) findViewById(R.id.get_phone_editText))\n\t\t\t\t\t\t\t \t\t \t\t.getWindowToken(),0);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t UserManager.getInstance().getUser().setPassword(\"\");\n\t\t\t\t\t\t\t UserManager.getInstance().getUser().setUserKey(\"\");\n\t\t\t\t\t\t\t Intent intent = new Intent(AccountForgetPSWActivity.this, AccountSettingActivity.class);\n\t\t\t\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t).show();\n\t\t\t\t\n\t\t\t}\n\t\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n\t\tif (requestCode == 1234) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tif (requestCode == 000) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tif (requestCode == 111) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (requestCode == 789) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n String idbook = request.getParameter(\"book\");\r\n request.setAttribute(\"book\", BookManager.getById(Integer.parseInt(idbook)));\r\n RequestDispatcher rd = request.getRequestDispatcher(\"borrow.jsp\");\r\n rd.forward(request, response);\r\n }", "public void returnReply(){\n String title = titleView.getText().toString();\n String sDay = sDayView.getText().toString();\n String eDay = eDayView.getText().toString();\n String sTime = sTimeView.getText().toString();\n String eTime = eTimeView.getText().toString();\n String campus = campusView.getSelectedItem().toString();\n String building = buildingView.getSelectedItem().toString();\n String room = roomView.getText().toString();\n int cat = catView.getSelectedItemPosition();\n String note = noteView.getText().toString();\n\n Calendar idGen = Calendar.getInstance();\n int id;\n id = Long.valueOf(idGen.getTimeInMillis()).intValue(); //generate id based on time\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"data\", new Lecture(title, sDay, eDay, sTime, eTime, campus, building, room, cat, note, id)); //create new entry and send back as result\n setResult(RESULT_OK, returnIntent);\n finish();\n }", "public void setReturnPage(String returnPage) {this.returnPage=returnPage;}", "@Override\r\n\tprotected void onActivityResult(int arg0, int arg1, Intent arg2) {\n\t\tsuper.onActivityResult(arg0, arg1, arg2);\r\n\t\tif(arg0 == REQUEST_CODE_SUCCESS && arg1 == RESULT_OK){\r\n\t\t\tthis.finish();\r\n\t\t}\r\n\t}", "public void backActivityWithResultOk(Bundle bundle) {\n if (bundle != null) {\n Intent intent = new Intent();\n intent.putExtras(bundle);\n setResult(RESULT_OK, intent);\n } else\n setResult(RESULT_OK);\n finish();\n }", "public void run() {\n\t \t\t\t\t\t\tint success;\r\n\t \t\t\t\t\t\tString activity = \"\";\r\n\t \t\t\t\t\t\ttry {\r\n\t \t\t\t\t\t\t\t// Building Parameters\r\n\t \t\t\t\t\t\t\tif (paramInput.getText().toString().isEmpty())\r\n\t \t\t\t\t\t\t\t{\r\n\t \t\t\t\t\t\t\t\t activity = \"open_main_door\";\r\n\t \t\t\t\t\t\t\t}\r\n\t \t\t\t\t\t\t\telse\r\n\t \t\t\t\t\t\t\t{\r\n\t \t\t\t\t\t\t\t\t activity = \"grant_main_door_access_to_\" + paramInput.getText().toString();\r\n\t \t\t\t\t\t\t\t}\r\n\t \t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(Calendar.getInstance().getTime());\r\n\t \t\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\r\n\t \t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_ACT, activity));\r\n\t \t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_DATE, date));\r\n\t \t\t\t\t\t\t\t// getting product details by making HTTP request\r\n\t \t\t\t\t\t\t\t// Note that product details url will use GET request\r\n\t \t\t\t\t\t\t\tJSONObject json = jsonParser.makeHttpRequest(\r\n\t \t\t\t\t\t\t\t\t\turl_update_record, \"GET\", params);\r\n\t \t\t\t\t\t\t\tif (json.getInt(TAG_SUCCESS) == 1 && !paramInput.getText().toString().isEmpty())\r\n\t \t\t\t\t\t\t\t{\t\r\n\t \t\t\t\t\t\t\t\tString gaResult = \"To \" + paramInput.getText().toString() +\"\\n\";\r\n\t \t\t\t\t\t\t\t\twelcome.append(myUI.getStyle(gaResult, 2, 8,\"GREEN\") );\r\n\t \t\t\t\t\t\t\t}\r\n\t \t\t\t\t\t\t// check your log for json response\r\n\t \t\t\t\t\t\t\tLog.d(\"Smart Home\",\"===========record_update=================\");\r\n\t \t\t\t\t\t\t\tLog.d(\"Smart Home\", json.getString(TAG_MSG));\t\t\t\r\n\t \t\t\t\t\t\t} \r\n\t \t\t\t\t\t\tcatch (Exception e) {\r\n\t \t\t\t\t\t\t\te.printStackTrace();\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n intent.putExtra(\"guest_name\", guestName);\n intent.putExtra(\"birth_date\", date);\n setResult(2, intent);\n finish();\n }", "@Override\n public void onBackPressed() {\n if (!bookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }\n };\n\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@Override\r\n public void onBackPressed() {\n setResult(Activity.RESULT_OK);\r\n this.finish();\r\n super.onBackPressed();\r\n }", "public void continueOne(View view){\n EditText firstName= (EditText) findViewById(R.id.firstName);\n String firstNameString = firstName.getText().toString();\n EditText lastName= (EditText) findViewById(R.id.lastName);\n String lastNameString= lastName.getText().toString();\n EditText studentID= (EditText) findViewById(R.id.studentId);\n String studentIDString= studentID.getText().toString();\n\n /**Toasts are the things that are like mini notifications that you'll see at the bottom of the screen.*/\n Context context = getApplicationContext();\n CharSequence text = \"Let's do this, \" + firstNameString + \"!\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n /**The following is an intent to start the next activity (mainCodeOne), and carry the key user data with it. MainActivityOne*/\n Intent intentOne = new Intent(this, AndroidBarcodeActivityOne.class);\n intentOne.putExtra(\"firstNameString\", firstNameString);\n intentOne.putExtra(\"lastNameString\", lastNameString);\n intentOne.putExtra(\"studentIDString\", studentIDString);\n startActivity(intentOne);\n\n\n }", "@Override\n public void onAuthenticationSuccessful() {\n startActivity(new Intent(PinViewActivity.this, AuthenticatedActivity.class));\n finish();\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent();\n intent.putExtra(\"type\", type);\n setResult(RESULT_OK, intent);\n finish();\n }", "public void onBackPressed() {\n C0486WU wu = this.f2780c;\n if (wu != null) {\n wu.mo1418b();\n }\n finish();\n Share_IP.super.onBackPressed();\n setResult(0, new Intent());\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == ACTION_TAKE_A_SELFIE && resultCode == RESULT_OK) {\n\t\t\t// if result of taking picture is good - add the path in the\n\t\t\t// ArrayList\n\t\t\t// and serialize it\n\t\t\tUri uri = Uri.parse(pathToSaveSelfie.toString());\n\t\t\tString path = uri.getPath();\n\t\t\tselfiesURI.add(path);\n\t\t\tserialize();\n\t\t\t// update ListView\n\t\t\tadapter.notifyDataSetChanged();\n\t\t}\n\t}", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(getApplicationContext(), MerchantJobs.class);\n startActivity(intent);\n finish();\n\n return;\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent arg2) {\n\t\tsuper.onActivityResult(requestCode, resultCode, arg2);\n\n\t\tswitch (resultCode) {\n\t\tcase 0:// finish\n\t\t\tCustomApplication.app\n\t\t\t\t\t.finishActivity(LessonFlashCardOpActivity.this);\n\t\t\tbreak;\n\t\tcase 1:// redo\n\t\t\tindex = 0;\n\t\t\tsetText();\n\t\t\tplay();\n\t\t\tgallery.setSelection(index);// 选中当前页面\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t\tstartActivity(new Intent(Receipt.this, MainActivity4.class));\r\n\t\t\t\tfinish();\r\n\r\n\t\t\t}", "@Override\r\n public void onBackPressed() {\n\r\n String enteredText = editText.getText().toString();\r\n Intent intent = new Intent();\r\n intent.putExtra(\"enteredText\", enteredText);\r\n\r\n if(!enteredText.trim().equals(\"\")) {\r\n setResult(RESULT_OK, intent);\r\n } else {\r\n setResult(RESULT_CANCELED);\r\n }\r\n\r\n finish(); //Same as pressing back arrow normally\r\n }", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n Log.d(LOG_TAG, \"onActivityResult\");\n if (resultCode == Activity.RESULT_OK) {\n Log.d(LOG_TAG, \"requestCode: \" + requestCode);\n switch (requestCode) {\n case 300:\n AdobeSelection selection = getSelection(intent);\n\n Intent data = new Intent();\n data.putExtras(intent);\n setResult(Activity.RESULT_OK,data);\n finish();\n\n break;\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n //this.callbackContext.error(\"Asset Browser Canceled\");\n Log.d(LOG_TAG, \"Asset Browser Canceled\");\n finish();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n if (result.getContents() == null) {\n Log.d(\"MainActivity\", \"Cancelled scan\");\n makeToast(this, \"Cancelado\");\n } else {\n Log.d(\"MainActivity\", \"Scanned\");\n makeToast(this, \"Contactando con Salesforce, ISBN: \" + result.getContents());\n scanResult = result.getContents();\n\n if (scanResult != null) {\n try {\n getProducto(scanResult);\n } catch (Exception e) {\n Log.e(\"RequestError\", e.toString());\n makeToast(this, \"Ha ocurrido un error, intente nuevamente...\");\n } finally {\n sfResult = null;\n }\n }\n }\n } else {\n Log.d(\"MainActivity\", \"Weird\");\n // This is important, otherwise the result will not be passed to the fragment\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "java.lang.String getBookingURL();", "@Override\n public void onClick(View v) {\n alertDialog.dismiss();\n\n //Displaying a progressbar\n //pDialog.show();\n\n //Getting the user entered otp from edittext\n final String code = edCode.getText().toString().trim();\n\n // RequestQueue requestQueue = Volley.newRequestQueue(Register.this);\n\n //Creating an string request\n StringRequest stringRequest = new StringRequest(Request.Method.POST,Config.registeracustomer,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //if the server response is success\n if (response.equalsIgnoreCase(\"success\")) {\n //dismissing the progressbar\n //pDialog.dismiss();\n //Starting a new activity\n startActivity(new Intent(SignUpNewActivity.this, LoginActivity.class));\n\n } if (response.equalsIgnoreCase(\"failed\")){\n //Displaying a toast if the otp entered is wrong\n Toast.makeText(SignUpNewActivity.this, \"Wrong Code Please Try Again\", Toast.LENGTH_LONG).show();\n\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n alertDialog.dismiss();\n Toast.makeText(SignUpNewActivity.this, error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n //Adding the parameters otp and username\n params.put(\"code\", code);\n params.put(\"full_name\", name);\n params.put(\"mobile_number\", number);\n params.put(\"password\", password);\n return params;\n\n }\n };\n //Adding the request to the queue\n MySingleton.getInstance(getApplicationContext()).addToRequestQueue(stringRequest);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\ttry {\n\t\t\t\n\t\t\tswitch(requestCode){\n\t\t\tcase(222):{\n\t\t\t\tif(resultCode==Activity.RESULT_OK){\n\t\t\t\t\tString selectedContact=data.getDataString();\n\t\t\t\t\ttvSecondActivity.setText(selectedContact.toString());\n\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(selectedContact));\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\ttvSecondActivity.setText(\"Selection CANCELLED\"+requestCode+\"\"+resultCode);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tToast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tIntent intent=new Intent();\n\t\t\tintent.putExtra(\"back\", \"Back Data\");\n\t\t\tsetResult(RESULT_CODE, intent);\n\t\t\tfinish();\n\t\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tif (cmd == ConstantTool.PAY_SUCCESS) {\r\n\t\t\tIntent intent = new Intent(OrderList.this, Homemenu.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t}\r\n\t}" ]
[ "0.56471634", "0.56184316", "0.5588148", "0.55111456", "0.51991606", "0.5093457", "0.50666744", "0.5056662", "0.4996443", "0.4960464", "0.49573115", "0.49414456", "0.49092138", "0.48929146", "0.48827663", "0.48597547", "0.48480207", "0.4828831", "0.48199248", "0.48184055", "0.48131236", "0.48095867", "0.4790535", "0.47865355", "0.47862825", "0.47805077", "0.47490332", "0.4746133", "0.47440347", "0.472507", "0.47198126", "0.47189465", "0.47157866", "0.4715551", "0.4702773", "0.47005513", "0.46991128", "0.4697945", "0.46707574", "0.46593016", "0.46316463", "0.4626621", "0.46240127", "0.46122783", "0.46106794", "0.46060964", "0.4602124", "0.45934483", "0.4584949", "0.45841047", "0.4583505", "0.45824495", "0.4580987", "0.45698756", "0.4569752", "0.456771", "0.4564219", "0.45631346", "0.4554856", "0.45443374", "0.45439866", "0.4535785", "0.45320696", "0.45305252", "0.45242706", "0.4523451", "0.45220456", "0.4505458", "0.45038012", "0.45035818", "0.45027146", "0.45027125", "0.44956687", "0.4493233", "0.44886258", "0.44826004", "0.44820896", "0.44806162", "0.44799578", "0.44776416", "0.44714418", "0.44689783", "0.4464687", "0.4458736", "0.44502643", "0.44456422", "0.44454762", "0.44442973", "0.44339916", "0.44309992", "0.4430473", "0.4419697", "0.4418644", "0.4415337", "0.44139975", "0.44089133", "0.44046712", "0.44033495", "0.43999302", "0.43959036" ]
0.60028154
0
Expands the current Reviews if possible. The last visible index is retrieved and compared to the last possible index. If the last possible index is greater than the last visible index, then all missing views are inflated.
public void viewAllReviews(View v){ //Check if initialized to prevent null pointer if(currentBook.reviews != null) { int startIndex = mReviews.getChildCount() - 1; //Get index of last visible view int endIndex = currentBook.reviews.size() - 1; //Get index of last possible view //If there exist more views than are shown if(endIndex > startIndex){ reviewAdapter(currentBook.reviews, mReviews, startIndex, endIndex, true); mSeeAll.setVisibility(GONE); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void recycleOffscreenViews() {\n final int oldChildCount = getChildCount();\n final int height = getHeight();\n final int clearAbove = -height - mItemMargin; // XXX increased clearAbove and clearBelow values\n final int clearBelow = height * 2 + mItemMargin; // to reduce recycling.\n for (int i = getChildCount() - 1; i >= 0; i--) {\n final View child = getChildAt(i);\n if (child.getTop() <= clearBelow) {\n // There may be other offscreen views, but we need to maintain\n // the invariant documented above.\n break;\n }\n\n if (mInLayout) {\n removeViewsInLayout(i, 1);\n } else {\n removeViewAt(i);\n }\n\n mRecycler.addScrap(child);\n }\n\n while (getChildCount() > 0) {\n final View child = getChildAt(0);\n if (child.getBottom() >= clearAbove) {\n // There may be other offscreen views, but we need to maintain\n // the invariant documented above.\n break;\n }\n\n if (mInLayout) {\n removeViewsInLayout(0, 1);\n } else {\n removeViewAt(0);\n }\n\n mRecycler.addScrap(child);\n mFirstPosition++;\n }\n\n final int childCount = getChildCount();\n if (childCount > 0 && childCount != oldChildCount) {\n // Repair the top and bottom column boundaries from the views we still have\n Arrays.fill(mItemTops, Integer.MAX_VALUE);\n Arrays.fill(mItemBottoms, Integer.MIN_VALUE);\n\n for (int i = 0; i < childCount; i++) {\n final View child = getChildAt(i);\n final LayoutParams lp = (LayoutParams) child.getLayoutParams();\n final int top = child.getTop() - mItemMargin;\n final int bottom = child.getBottom();\n final int span = Math.min(mColCount, lp.span);\n final LayoutRecord rec = mLayoutRecords.get(mFirstPosition + i);\n\n final int colEnd = lp.column + span;\n for (int col = lp.column; col < colEnd; col++) {\n final int colTop = top - rec.getMarginAbove(col - lp.column);\n final int colBottom = bottom + rec.getMarginBelow(col - lp.column);\n if (colTop < mItemTops[col]) {\n mItemTops[col] = colTop;\n }\n if (colBottom > mItemBottoms[col]) {\n mItemBottoms[col] = colBottom;\n }\n }\n }\n\n for (int col = 0; col < mColCount; col++) {\n if (mItemTops[col] == Integer.MAX_VALUE) {\n // If one was untouched, both were.\n mItemTops[col] = 0;\n mItemBottoms[col] = 0;\n }\n }\n }\n }", "private final void m139911a(RecyclerView.Recycler recycler) {\n View view;\n View view2;\n Iterator it = C32598n.m150608b(0, getItemCount()).iterator();\n while (it.hasNext()) {\n int nextInt = ((IntIterator) it).nextInt();\n View viewForPosition = recycler.getViewForPosition(nextInt);\n C32569u.m150513a((Object) viewForPosition, C6969H.m41409d(\"G7B86D603BC3CAE3BA809955CC4ECC6C04F8CC72AB023A23DEF019E00E2EAD0DE7D8ADA14F6\"));\n addView(viewForPosition);\n measureChildWithMargins(viewForPosition, 0, 0);\n int decoratedMeasuredWidth = getDecoratedMeasuredWidth(viewForPosition);\n int decoratedMeasuredHeight = getDecoratedMeasuredHeight(viewForPosition);\n if (this.f101761k) {\n removeAndRecycleView(viewForPosition, recycler);\n } else if (this.f101753c < this.f101754d) {\n if (this.f101762l && (view2 = this.f101763m) != null) {\n this.f101762l = false;\n if (view2 == null) {\n C32569u.m150511a();\n }\n m139910a(view2, this.f101764n, this.f101765o);\n this.f101763m = null;\n }\n if (this.f101753c == this.f101754d - 1 && this.f101756f + decoratedMeasuredWidth + this.f101759i > getWidth()) {\n this.f101761k = true;\n removeAndRecycleView(viewForPosition, recycler);\n } else if (nextInt == getItemCount() - 1 || nextInt == getItemCount() - 2) {\n if (this.f101756f + decoratedMeasuredWidth + this.f101759i < getWidth()) {\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n } else if (this.f101756f + decoratedMeasuredWidth + this.f101759i > getWidth() && this.f101756f + decoratedMeasuredWidth < getWidth()) {\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n m139909a(decoratedMeasuredHeight);\n this.f101757g = this.f101755e + this.f101758h;\n } else if (this.f101756f + decoratedMeasuredWidth > getWidth()) {\n m139909a(decoratedMeasuredHeight);\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n }\n } else if (this.f101756f + decoratedMeasuredWidth <= getWidth()) {\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n } else if (this.f101753c != this.f101754d - 1) {\n m139909a(decoratedMeasuredHeight);\n this.f101762l = true;\n this.f101763m = viewForPosition;\n this.f101764n = decoratedMeasuredWidth;\n this.f101765o = decoratedMeasuredHeight;\n }\n } else if (this.f101762l && (view = this.f101763m) != null) {\n if (view == null) {\n C32569u.m150511a();\n }\n removeAndRecycleView(view, recycler);\n this.f101762l = false;\n this.f101763m = null;\n }\n }\n }", "private void recycleTopInvisibleViews(RecyclerView.Recycler recycler){\r\n final int childCount = getChildCount();\r\n for(int i = 0; i <= childCount; i++){\r\n View child = getChildAt(i);\r\n // Recycle views from here.\r\n if(getDecoratedEnd(child) > topBorder){\r\n recycleChildren(recycler, 0, i - 1);\r\n firstAttachedItemPosition += i;\r\n updateSpanTopParameters();\r\n return;\r\n }\r\n // Update spanTop.\r\n int heightNum = itemLayoutHeightCache.get(firstAttachedItemPosition + i);\r\n for(int j = 0; j < itemLayoutWidthCache.get(firstAttachedItemPosition + i); j++){\r\n int spanIndex = itemOccupiedStartSpan.get(firstAttachedItemPosition + i) + j;\r\n spanTop[spanIndex] += heightNum * sizePerSpan;\r\n }\r\n }\r\n }", "public void expand() {\n if (getVisibility() == View.VISIBLE) {\n return;\n }\n setVisibility(View.VISIBLE);\n mAnimatorExpand.setDuration(mDuration);\n mAnimatorExpand.start();\n }", "@Override\n public void onFailure(Call<MovieList> call, Throwable t) {\n recyclerView.setVisibility(View.VISIBLE);\n\n }", "@Override\n public void onFailure(Call<MovieList> call, Throwable t) {\n recyclerView.setVisibility(View.VISIBLE);\n\n }", "private void recycleBottomInvisibleViews(RecyclerView.Recycler recycler){\r\n final int childCount = getChildCount();\r\n for(int i = childCount - 1; i >= 0; i--){\r\n View child = getChildAt(i);\r\n // Recycle views from here.\r\n if(getDecoratedStart(child) < bottomBorder){\r\n recycleChildren(recycler, i + 1, childCount - 1);\r\n lastAttachedItemPosition -= (childCount - 1 - i);\r\n updateSpanBottomParameters();\r\n return;\r\n }\r\n // Update spanBottom.\r\n int position = lastAttachedItemPosition - (childCount - 1 - i);\r\n int heightNum = itemLayoutHeightCache.get(position);\r\n for(int j = 0; j < itemLayoutWidthCache.get(position); j++){\r\n int spanIndex = itemOccupiedStartSpan.get(position) + j;\r\n spanBottom[spanIndex] -= heightNum * sizePerSpan;\r\n }\r\n }\r\n }", "public void updateRecyclerView () {\n\n if (recyclerViewDebetableGoalsNow != null) {\n recyclerViewDebetableGoalsNow.destroyDrawingCache();\n recyclerViewDebetableGoalsNow.setVisibility(ListView.INVISIBLE);\n recyclerViewDebetableGoalsNow.setVisibility(ListView.VISIBLE);\n\n displayDebetableGoalsSet ();\n }\n }", "public void refresh() {\n\t\tif (render != null) render.cancel();\n\n\t\tif (preview != null) {\n\t\t\tneedsPreview = true;\n\n\t\t} else {\n\t\t\tpreview = new Iterator(transformations, plotter.get(), 100000, RESET_INTERVAL);\n\t\t\tneedsPreview = false;\n\n\t\t\tpreview.setOnSucceeded(event -> {\n\t\t\t\tshowImg(preview.getValue());\n\t\t\t\tpreview = null;\n\n\t\t\t\tif (needsPreview) {\n\t\t\t\t\trefresh(); // generate the next preview\n\t\t\t\t} else {\n\t\t\t\t\trender(1);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpreview.threadRun();\n\t\t}\n\n\n\t}", "private void clearViews()\n {\n prepareNumbers();\n }", "private void setDataVisibility() {\n boolean loaded = mRecipeList != null && mRecipeList.size() > 0;\n Logger.d(\"loaded: \" + loaded);\n mRefreshLayout.setRefreshing(false);\n\n mRecipesRecyclerView.setVisibility(loaded ? View.VISIBLE : View.GONE);\n mNoDataContainer.setVisibility(loaded ? View.GONE : View.VISIBLE);\n\n cookBookApplication.setIdleState(true);\n\n }", "private void diler() {\n int igrok_ochered = recyclerViewItem_ArrayList.size() % 4;\n //if (igrok_ochered==0 )\n//Log.d(\"aaa\", \"\"+igrok_ochered);\n switch (igrok_ochered) {\n case 3:\n igrok1_D.setVisibility(View.VISIBLE);\n igrok2_D.setVisibility(View.INVISIBLE);\n igrok3_D.setVisibility(View.INVISIBLE);\n igrok4_D.setVisibility(View.INVISIBLE);\n break;\n case 2:\n igrok3_D.setVisibility(View.VISIBLE);\n igrok1_D.setVisibility(View.INVISIBLE);\n igrok2_D.setVisibility(View.INVISIBLE);\n igrok4_D.setVisibility(View.INVISIBLE);\n break;\n case 1:\n igrok2_D.setVisibility(View.VISIBLE);\n igrok1_D.setVisibility(View.INVISIBLE);\n igrok3_D.setVisibility(View.INVISIBLE);\n igrok4_D.setVisibility(View.INVISIBLE);\n break;\n case 0:\n igrok4_D.setVisibility(View.VISIBLE);\n igrok1_D.setVisibility(View.INVISIBLE);\n igrok2_D.setVisibility(View.INVISIBLE);\n igrok3_D.setVisibility(View.INVISIBLE);\n break;\n }\n\n\n }", "private void expandNode(final Node previewNode) {\n\t\tif (this.debugOut)\n\t\t\tSystem.out.println(\"@expandNode (\" + previewNode.getTile().getPosVector() + \"): \");\n\t\tDirection dir[];\n\t\tdir = Direction.values();\n\t\tfor (int i = 3; i >= 0; i--) {\n\n\t\t\tVector2 newPos = calcNewPos(previewNode.getTile().getPosVector(), dir[i]);\n\t\t\tif (this.debugOut)\n\t\t\t\tSystem.out.print(\"Pos \" + newPos + \" got: \");\n\n\t\t\tif (newPos.getX() >= this.state.getCurrViewSizeLimit().getX()\n\t\t\t\t\t|| newPos.getY() >= this.state.getCurrViewSizeLimit().getY() || newPos.getX() < 0\n\t\t\t\t\t|| newPos.getY() < 0) {\n\t\t\t\tif (this.debugOut) {\n\t\t\t\t\tSystem.out.println(\"OUT (out of level/array limits)\");\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Ignore walls and pits\n\t\t\t// preview node cant be a wall or something\n\t\t\t// make no sense @see PacmanSuche\n\n\t\t\tNode successor = new Node(state.getTile(newPos), previewNode);\n\t\t\tTileType sucType = successor.getTile().getTileType();\n\n\t\t\tif (sucType == TileType.WALL || sucType == TileType.PIT) {\n\t\t\t\tthis.closedList.add(successor);\n\t\t\t\tif (this.debugOut)\n\t\t\t\t\tSystem.out.println(\"OUT (wall/pit)\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (this.closedList.contains(successor)) {\n\t\t\t\tif (this.debugOut)\n\t\t\t\t\tSystem.out.println(\"OUT (is already in closedList)\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tevaluateNode(successor);\n\t\t\tif (this.debugOut)\n\t\t\t\tSystem.out.print(\"[\" + successor.getValue() + \"]\");\n\t\t\taddNode(successor);\n\t\t}\n\t}", "public void expandNoAnim() {\n if (getVisibility() == View.VISIBLE) {\n return;\n }\n setVisibility(View.VISIBLE);\n mAnimatorExpand.setDuration(0);\n mAnimatorExpand.start();\n }", "MateriliazedView getViews(int index);", "public final void updateRecyclerUI() {\n Collection collection = this.setList;\n if (collection == null || collection.isEmpty()) {\n Collection collection2 = this.notSetList;\n if (collection2 == null || collection2.isEmpty()) {\n LinearLayout linearLayout = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout, \"llSet\");\n linearLayout.setVisibility(8);\n LinearLayout linearLayout2 = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llNotSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout2, \"llNotSet\");\n linearLayout2.setVisibility(8);\n return;\n }\n }\n if (this.setList.size() != 0) {\n LinearLayout linearLayout3 = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout3, \"llSet\");\n linearLayout3.setVisibility(0);\n Collection collection3 = this.notSetList;\n if (collection3 == null || collection3.isEmpty()) {\n View _$_findCachedViewById = _$_findCachedViewById(C2723R.C2726id.separatorSet);\n Intrinsics.checkExpressionValueIsNotNull(_$_findCachedViewById, \"separatorSet\");\n _$_findCachedViewById.setVisibility(8);\n } else {\n View _$_findCachedViewById2 = _$_findCachedViewById(C2723R.C2726id.separatorSet);\n Intrinsics.checkExpressionValueIsNotNull(_$_findCachedViewById2, \"separatorSet\");\n _$_findCachedViewById2.setVisibility(0);\n }\n SetSaleDocAdapter setSaleDocAdapter2 = this.setSaleDocAdapter;\n if (setSaleDocAdapter2 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"setSaleDocAdapter\");\n }\n setSaleDocAdapter2.setData(createSetSaleDocData(true));\n SetSaleDocAdapter setSaleDocAdapter3 = this.setSaleDocAdapter;\n if (setSaleDocAdapter3 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"setSaleDocAdapter\");\n }\n setSaleDocAdapter3.notifyDataSetChanged();\n }\n if (this.notSetList.size() != 0) {\n LinearLayout linearLayout4 = (LinearLayout) _$_findCachedViewById(C2723R.C2726id.llNotSet);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout4, \"llNotSet\");\n linearLayout4.setVisibility(0);\n NotSetSaleDocAdapter notSetSaleDocAdapter2 = this.notSetSaleDocAdapter;\n if (notSetSaleDocAdapter2 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"notSetSaleDocAdapter\");\n }\n notSetSaleDocAdapter2.setData(createSetSaleDocData(false));\n NotSetSaleDocAdapter notSetSaleDocAdapter3 = this.notSetSaleDocAdapter;\n if (notSetSaleDocAdapter3 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"notSetSaleDocAdapter\");\n }\n notSetSaleDocAdapter3.notifyDataSetChanged();\n Button button = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button, \"btnReviewPayment\");\n button.setAlpha(0.5f);\n Button button2 = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button2, \"btnReviewPayment\");\n button2.setClickable(false);\n return;\n }\n Button button3 = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button3, \"btnReviewPayment\");\n button3.setAlpha(1.0f);\n Button button4 = (Button) _$_findCachedViewById(C2723R.C2726id.btnReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(button4, \"btnReviewPayment\");\n button4.setClickable(true);\n }", "public void recycleCheck(){\n getScreenRect();\n\n //ok...seriously, I have no idea why I need to wrap it in post()\n //but if I don't, it won't be able to setHtml() again (the second time)\n //TODO investigate what the fuck is going on\n post(new Runnable() {\n @Override\n public void run() {\n for (int i = 0, l = overlay.getChildCount(); i < l; i++) {\n //TODO check whether it is visible inside the view bound instead of inside the screen bound\n View v = overlay.getChildAt(i);\n v.getLocationOnScreen(coordinate);\n\n viewRect.set(coordinate[0], coordinate[1], coordinate[0] + v.getMeasuredWidth(), coordinate[1] + v.getMeasuredHeight());\n\n boolean isVisible = viewRect.intersect(screenRect);\n Integer index = (Integer) v.getTag(R.id.htmltextview_viewholder_index);\n Integer type = (Integer) v.getTag(R.id.htmltextview_viewholder_type);\n if (index == null || type == null){\n //WTF?\n continue;\n }\n\n Container container = null;\n switch (type){\n case VIEWHOLDER_TYPE_IMG:\n default:\n container = imgContainerMap.get(index);\n break;\n }\n if (isVisible){\n if (container.visible){\n //fine\n }else{\n //was invisible, make it visible\n container.attachChild();\n container.visible = true;\n }\n }else{\n if (container.visible){\n //was visible, recycle it\n container.detachChild();\n container.visible = false;\n }else{\n //fine\n }\n }\n }\n }\n });\n }", "private void emptyViewForFilter(){\n if(adapter.getItemCount() <= 0){\n v.setVisibility(View.GONE);\n filempty.setVisibility(View.VISIBLE);\n } else {\n v.setVisibility(View.VISIBLE);\n filempty.setVisibility(View.GONE);\n }\n }", "public void expandedItem(int index) {\n if (index < 0 || index >= getChildCount() || hasItemExpanded()) {\n return;\n }\n final View releasedChild = getChildAt(index);\n final LayoutParams lp = (LayoutParams) releasedChild.getLayoutParams();\n lp.isOpen = true;\n mDragHelper.smoothSlideViewTo(releasedChild, releasedChild.getLeft(), lp.expandTop);\n int length = getChildCount();\n for (int i = 0; i < length; i++) {\n if (i != index) {\n View child = getChildAt(i);\n playShrinkItemAnimation(child);\n }\n }\n invalidate();\n }", "public void expand(){\n\t\texpanded = true;\n\t\tstartRow = 0;\n\t\tslider.setLimits(0, 0, optGroup.size() - maxRows);\n\t\ttakeFocus();\n\t}", "private void populateReviews(Bundle savedInstanceState) {\n LinearLayoutManager layoutManager =\n new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\n mBinding.movieReviews.reviewsList.setLayoutManager(layoutManager);\n mBinding.movieReviews.reviewsList.setHasFixedSize(true);\n mBinding.movieReviews.reviewsList.setNestedScrollingEnabled(false);\n\n RecyclerView.ItemDecoration itemDecoration = new HorizontalItemDecoration(this);\n mBinding.movieReviews.reviewsList.addItemDecoration(itemDecoration);\n\n mReviewAdapter = new ReviewAdapter(this);\n mBinding.movieReviews.reviewsList.setAdapter(mReviewAdapter);\n\n if (savedInstanceState != null && savedInstanceState.containsKey(BUNDLE_REVIEWS)) {\n mReviewAdapter.addReviewsList(savedInstanceState.\n <Review>getParcelableArrayList(BUNDLE_REVIEWS));\n if (mReviewAdapter.getItemCount() == 0) {\n mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE);\n }\n } else {\n Call<ApiResponse<Review>> call = mApiClient.getReviews(movie.movieId);\n\n call.enqueue(new Callback<ApiResponse<Review>>() {\n @Override\n public void onResponse(Call<ApiResponse<Review>> call,\n Response<ApiResponse<Review>> response) {\n List<Review> result = response.body().results;\n mReviewAdapter.addReviewsList(result);\n if (result.size() == 0) {\n mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE);\n }\n }\n\n @Override\n public void onFailure(Call<ApiResponse<Review>> call, Throwable t) {\n Toast.makeText(DetailActivity.this,\n getString(R.string.connection_error), Toast.LENGTH_LONG).show();\n }\n });\n }\n }", "protected void refillInternal(final int lastItemPos,final int firstItemPos){\n\t if (mAdapter == null) {\n\t return;\n\t }\n\t if(mAdapter.getCount() == 0){\n\t \treturn;\n\t }\n\t \t\t\n\t\tif(getChildCount() == 0){\n\t\t\tfillFirstTime(lastItemPos, firstItemPos);\n\t\t}\n\t\telse{\n\t\t\trelayout();\n\t\t\tremoveNonVisibleViews();\n\t\t\trefillRight();\n\t\t\trefillLeft();\n\t\t}\n\t}", "private void renewPreview() {\r\n\t\tint start = 0;\r\n\t\tsurface.clear();\r\n\t\tfor (start = 0; start < myHistoryManager.historys.size(); start++) {\r\n\t\t\tAbstractHistory history = myHistoryManager.historys.get(start);\r\n\t\t\tif (history.getType() == \"AddHistory\") {\r\n\t\t\t\tPoint endPos = ((AddHistory) history).endPos;\r\n\t\t\t\tMyColor pathColor = ((AddHistory) history).pathColor;\r\n\t\t\t\tstrokeSize = ((AddHistory) history).strokeSize;\r\n\t\t\t\tdouble x = endPos.getVector2().getX();\r\n\t\t\t\tdouble y = endPos.getVector2().getY();\r\n\r\n\t\t\t\tif (strokePointCount == 1) {\r\n\t\t\t\t\t/* set stroke color, size, and shadow */\r\n\t\t\t\t\tcanvas_context.setStrokeStyle(pathColor.getColorCode());\r\n\t\t\t\t\tcanvas_context.setFillStyle(pathColor.getColorCode());\r\n\t\t\t\t\tcanvas_context.setLineWidth(strokeSize);\r\n\t\t\t\t\tcanvas_context.setLineCap(LineCap.ROUND);\r\n\t\t\t\t\tcanvas_context.setLineJoin(LineJoin.ROUND);\r\n\t\t\t\t\tcanvas_context.stroke();\r\n\t\t\t\t\tcanvas_context.beginPath();\r\n\t\t\t\t\tcanvas_context.moveTo(x, y);\r\n\t\t\t\t}\r\n\t\t\t\tcanvas_context.lineTo(x, y);\r\n\t\t\t\tstrokePointCount++;\r\n\t\t\t\t\r\n\t\t\t} else if (history.getType() == \"PathHeadHistory\") {\r\n\t\t\t\tstrokePointCount = 0; \r\n\t\t\t\tstrokePointCount++;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcanvas_context.stroke();\r\n\t\t\r\n\t}", "private void refreshView() {\n if (!wasInvalidatedBefore) {\n wasInvalidatedBefore = true;\n invalidate();\n }\n }", "public void reconstructViews() {\n for (int i = 0; i < getChildCount(); i++) {\n VerificationCustomItem item = (VerificationCustomItem) getChildAt(i);\n item.reconstructView();\n }\n }", "private static ArrayDeque<View> m36213i(View view) {\n ArrayDeque<View> arrayDeque = new ArrayDeque<>();\n int i = 0;\n View view2 = view;\n while (true) {\n if (view2.getParent() == null && view2 != view.getRootView()) {\n break;\n }\n i++;\n if (i <= 50) {\n arrayDeque.add(view2);\n if (!(view2.getParent() instanceof View)) {\n break;\n }\n view2 = (View) view2.getParent();\n } else {\n C10969p.m36113a(3, \"VisibilityInfo\", (Object) null, \"Short-circuiting chain retrieval, reached max\");\n break;\n }\n }\n return arrayDeque;\n }", "public void recycle() {\n Drawable drawable = this.view.getDrawable();\n if (drawable != null && (drawable instanceof BitmapDrawable)) {\n ((BitmapDrawable) drawable).getBitmap().recycle();\n }\n }", "private void updateCollectedView() {\n mCollectedCoins = Data.getCollectedCoins();\n mRecyclerViewRec.setVisibility(View.INVISIBLE);\n mRecyclerViewCol.setVisibility(View.VISIBLE);\n mCollectedAdapter.notifyDataSetChanged();\n }", "public void clearOffScreenResources() {\n int firstPosition = 0;\n int lastPosition = getItemCount();\n int offScreenKeepInCacheCount = mSpanCount;\n RecyclerView recyclerView = getRecyclerView();\n if (recyclerView != null && recyclerView.getLayoutManager() instanceof LinearLayoutManager) {\n LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();\n firstPosition = layoutManager.findFirstVisibleItemPosition();\n lastPosition = layoutManager.findLastVisibleItemPosition();\n }\n if (firstPosition == RecyclerView.NO_POSITION || lastPosition == RecyclerView.NO_POSITION) {\n return;\n }\n\n if (sDebug)\n Log.d(TAG, \"clearOffScreenResources:first:\" + firstPosition + \";last:\" + lastPosition);\n\n Iterator<Integer> it = mCachedPageList.iterator();\n while (it.hasNext()) {\n int page = it.next();\n int position = page - 1;\n\n if (position < (firstPosition - offScreenKeepInCacheCount) || position > (lastPosition + offScreenKeepInCacheCount)) {\n // not in range: clear BitmapDrawable cache, recycle Bitmap\n try {\n Map<String, Object> source = getItem(position);\n if (source != null) {\n // clear the cache\n mDataLock.lock();\n source.put(THUMB_IMAGE, null);\n mDataLock.unlock();\n if (sDebug)\n Log.d(TAG, \"remove image cache for page: \" + page + \"; position: \" + position);\n // this page is no longer cached\n it.remove();\n }\n } catch (Exception ignored) {\n }\n } // else in range: do nothing\n }\n // cancel all off screen tasks as well\n for (int i = 0; i < mTaskList.size(); i++) {\n int page = mTaskList.keyAt(i);\n int position = page - 1;\n if (position < (firstPosition - offScreenKeepInCacheCount) || position > (lastPosition + offScreenKeepInCacheCount)) {\n LoadThumbnailTask task = mTaskList.valueAt(i);\n if (null != task) {\n task.cancel(true);\n }\n } // else in range: do nothing\n }\n }", "public boolean fullyExpandedClearAllVisible() {\n return this.mNotificationStackScroller.isFooterViewNotGone() && this.mNotificationStackScroller.isScrolledToBottom() && !this.mQsExpandImmediate;\n }", "public abstract boolean prependVisibleItems(int i, boolean z);", "public void resetIsVisible();", "public void onFinishInflate() {\n super.onFinishInflate();\n getContentView().setOnFocusChangeListener(new OnFocusChangeListener() {\n public void onFocusChange(View view, boolean z) {\n if (z) {\n AllAppsContainerView.this.mAppsRecyclerView.requestFocus();\n }\n }\n });\n this.mAppsRecyclerView = (AllAppsRecyclerView) findViewById(C0622R.C0625id.apps_list_view);\n this.mAppsRecyclerView.setApps(this.mApps);\n this.mAppsRecyclerView.setLayoutManager(this.mLayoutManager);\n this.mAppsRecyclerView.setAdapter(this.mAdapter);\n this.mAppsRecyclerView.setHasFixedSize(true);\n this.mAppsRecyclerView.setItemAnimator(null);\n this.mAppsRecyclerView.setSpringAnimationHandler(this.mSpringAnimationHandler);\n this.mSearchContainer = findViewById(C0622R.C0625id.search_container_all_apps);\n this.mSearchUiManager = (SearchUiManager) this.mSearchContainer;\n this.mSearchUiManager.initialize(this.mApps, this.mAppsRecyclerView);\n FocusedItemDecorator focusedItemDecorator = new FocusedItemDecorator(this.mAppsRecyclerView);\n this.mAppsRecyclerView.addItemDecoration(focusedItemDecorator);\n this.mAppsRecyclerView.preMeasureViews(this.mAdapter);\n this.mAdapter.setIconFocusListener(focusedItemDecorator.getFocusListener());\n getRevealView().setVisibility(0);\n getContentView().setVisibility(0);\n getContentView().setBackground(null);\n }", "private void refreshData(){\n filempty.setVisibility(View.GONE);\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, data);\n v.setAdapter(adapter);\n emptyView();\n }", "private boolean updatePositions() {\n /*\n r14 = this;\n int r0 = r14.getFirstVisiblePosition()\n int r1 = r14.mFirstExpPos\n int r2 = r1 - r0\n android.view.View r2 = r14.getChildAt(r2)\n if (r2 != 0) goto L_0x001b\n int r1 = r14.getChildCount()\n int r1 = r1 / 2\n int r1 = r1 + r0\n int r0 = r1 - r0\n android.view.View r2 = r14.getChildAt(r0)\n L_0x001b:\n int r0 = r2.getTop()\n int r2 = r2.getHeight()\n int r3 = r14.getShuffleEdge(r1, r0)\n int r4 = r14.getDividerHeight()\n int r5 = r14.mFloatViewMid\n if (r5 >= r3) goto L_0x004c\n L_0x002f:\n if (r1 < 0) goto L_0x004a\n int r1 = r1 + -1\n int r2 = r14.getItemHeight(r1)\n if (r1 != 0) goto L_0x003c\n int r0 = r0 - r4\n int r0 = r0 - r2\n goto L_0x006e\n L_0x003c:\n int r2 = r2 + r4\n int r0 = r0 - r2\n int r2 = r14.getShuffleEdge(r1, r0)\n int r5 = r14.mFloatViewMid\n if (r5 >= r2) goto L_0x0048\n r3 = r2\n goto L_0x002f\n L_0x0048:\n r0 = r2\n goto L_0x006e\n L_0x004a:\n r0 = r3\n goto L_0x006e\n L_0x004c:\n int r5 = r14.getCount()\n L_0x0050:\n if (r1 >= r5) goto L_0x004a\n int r6 = r5 + -1\n if (r1 != r6) goto L_0x0059\n int r0 = r0 + r4\n int r0 = r0 + r2\n goto L_0x006e\n L_0x0059:\n int r2 = r2 + r4\n int r0 = r0 + r2\n int r2 = r1 + 1\n int r6 = r14.getItemHeight(r2)\n int r7 = r14.getShuffleEdge(r2, r0)\n int r8 = r14.mFloatViewMid\n if (r8 < r7) goto L_0x006d\n r1 = r2\n r2 = r6\n r3 = r7\n goto L_0x0050\n L_0x006d:\n r0 = r7\n L_0x006e:\n int r2 = r14.getHeaderViewsCount()\n int r4 = r14.getFooterViewsCount()\n r5 = 0\n int r6 = r14.mFirstExpPos\n int r7 = r14.mSecondExpPos\n float r8 = r14.mSlideFrac\n boolean r9 = r14.mAnimate\n if (r9 == 0) goto L_0x00c7\n int r9 = r0 - r3\n int r9 = java.lang.Math.abs(r9)\n int r10 = r14.mFloatViewMid\n if (r10 >= r0) goto L_0x008e\n r13 = r3\n r3 = r0\n r0 = r13\n L_0x008e:\n float r10 = r14.mSlideRegionFrac\n r11 = 1056964608(0x3f000000, float:0.5)\n float r10 = r10 * r11\n float r9 = (float) r9\n float r10 = r10 * r9\n int r9 = (int) r10\n float r10 = (float) r9\n int r0 = r0 + r9\n int r9 = r3 - r9\n int r12 = r14.mFloatViewMid\n if (r12 >= r0) goto L_0x00b0\n int r3 = r1 + -1\n r14.mFirstExpPos = r3\n r14.mSecondExpPos = r1\n int r3 = r14.mFloatViewMid\n int r0 = r0 - r3\n float r0 = (float) r0\n float r0 = r0 * r11\n float r0 = r0 / r10\n r14.mSlideFrac = r0\n goto L_0x00cb\n L_0x00b0:\n int r0 = r14.mFloatViewMid\n if (r0 < r9) goto L_0x00c7\n r14.mFirstExpPos = r1\n int r0 = r1 + 1\n r14.mSecondExpPos = r0\n r0 = 1065353216(0x3f800000, float:1.0)\n int r9 = r14.mFloatViewMid\n int r3 = r3 - r9\n float r3 = (float) r3\n float r3 = r3 / r10\n float r3 = r3 + r0\n float r3 = r3 * r11\n r14.mSlideFrac = r3\n goto L_0x00cb\n L_0x00c7:\n r14.mFirstExpPos = r1\n r14.mSecondExpPos = r1\n L_0x00cb:\n int r0 = r14.mFirstExpPos\n r3 = 1\n if (r0 >= r2) goto L_0x00d6\n r14.mFirstExpPos = r2\n r14.mSecondExpPos = r2\n r1 = r2\n goto L_0x00ea\n L_0x00d6:\n int r0 = r14.mSecondExpPos\n int r9 = r14.getCount()\n int r9 = r9 - r4\n if (r0 < r9) goto L_0x00ea\n int r0 = r14.getCount()\n int r0 = r0 - r4\n int r1 = r0 + -1\n r14.mFirstExpPos = r1\n r14.mSecondExpPos = r1\n L_0x00ea:\n int r0 = r14.mFirstExpPos\n if (r0 != r6) goto L_0x00f8\n int r0 = r14.mSecondExpPos\n if (r0 != r7) goto L_0x00f8\n float r0 = r14.mSlideFrac\n int r0 = (r0 > r8 ? 1 : (r0 == r8 ? 0 : -1))\n if (r0 == 0) goto L_0x00f9\n L_0x00f8:\n r5 = 1\n L_0x00f9:\n int r0 = r14.mFloatPos\n if (r1 == r0) goto L_0x010e\n com.autonavi.minimap.widget.draglistview.DragSortListView$DragListener r0 = r14.mDragListener\n if (r0 == 0) goto L_0x010b\n com.autonavi.minimap.widget.draglistview.DragSortListView$DragListener r0 = r14.mDragListener\n int r4 = r14.mFloatPos\n int r4 = r4 - r2\n int r2 = r1 - r2\n r0.drag(r4, r2)\n L_0x010b:\n r14.mFloatPos = r1\n goto L_0x010f\n L_0x010e:\n r3 = r5\n L_0x010f:\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.minimap.widget.draglistview.DragSortListView.updatePositions():boolean\");\n }", "private void recycleChildren(RecyclerView.Recycler recycler, int startIndex, int endIndex){\r\n if(startIndex > endIndex){\r\n return;\r\n }\r\n for(int i = endIndex; i >= startIndex; i--){\r\n removeAndRecycleViewAt(i, recycler);\r\n }\r\n }", "private void setAllGone() {\n ivOne.setVisibility(View.GONE);\n ivTwo.setVisibility(View.GONE);\n ivThree.setVisibility(View.GONE);\n ivFour.setVisibility(View.GONE);\n ivFive.setVisibility(View.GONE);\n ivSix.setVisibility(View.GONE);\n ivSeven.setVisibility(View.GONE);\n ivEight.setVisibility(View.GONE);\n ivNine.setVisibility(View.GONE);\n }", "private boolean isLastView(int viewIndex){\r\n\t\treturn viewIndex == this.getChildCount() - 1;\r\n\t}", "public void clearWeeklyView(){\n\t\tthis.weeklyView=false;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}", "private void layoutDisappearingViews(RecyclerView.Recycler recycler, RecyclerView.State state){\r\n Iterator<Integer> iterator = disappearingViewCache.keySet().iterator();\r\n while(iterator.hasNext()){\r\n int position = iterator.next();\r\n View view = recycler.getViewForPosition(position);\r\n DisappearingViewParams params = disappearingViewCache.get(position);\r\n addDisappearingView(view, 0);\r\n view.measure(params.widthSpec, params.heightSpec);\r\n layoutDecorated(view, params.left, params.top, params.right, params.bottom);\r\n }\r\n }", "public Builder clearMoreResults() {\n \n moreResults_ = false;\n onChanged();\n return this;\n }", "private void emptyView(){\n if(adapter.getItemCount() <= 0){\n v.setVisibility(View.GONE);\n empty.setVisibility(View.VISIBLE);\n } else {\n v.setVisibility(View.VISIBLE);\n empty.setVisibility(View.GONE);\n }\n }", "public void explore(View v) {\n\t\tfindViewById(R.id.linear1).setVisibility(View.INVISIBLE);\n\t\tfindViewById(R.id.linear2).setVisibility(View.VISIBLE);\n\t\tfindViewById(R.id.linear3).setVisibility(View.INVISIBLE);\n\t\tmethod = \"ExplorePosts\";\n\t\treload();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t\treviewsRef.orderByValue().addValueEventListener(new ValueEventListener() {\n\t\t\t@Override\n\t\t\tpublic void onDataChange(DataSnapshot dataSnapshot) {\n\t\t\t\tint childs = (int) dataSnapshot.getChildrenCount();\n\t\t\t\tReviewsList.clear();\n\t\t\t\tfor (int i = 0; i < childs; i++) {\n\t\t\t\t\tReviews rev = dataSnapshot.child(String.valueOf(i)).getValue(Reviews.class); //get each child starting at \"0\" to \"n-1\"\n\t\t\t\t\tReviewsList.add(rev); //add to the list\n\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\tif(ReviewsList.size() > 0){\n\t\t\t\t\t\tmNoReview.setVisibility(View.INVISIBLE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(DatabaseError databaseError) {\n\n\t\t\t}\n\t\t});\n\n\t}", "public void recomputeHeight() {\n setVisibility(View.GONE);\n setupAnimators();\n }", "boolean isFeedExpanded();", "@Override\n public void onRefresh() {\n Log.d(\"DEBUG\", \"swipe refresh called\");\n populateTimeline(1L,Long.MAX_VALUE - 1);\n }", "private void refreshFilterData(){\n empty.setVisibility(View.GONE);\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, filteredData);\n v.setAdapter(adapter);\n emptyViewForFilter();\n }", "@Override\n public void refreshFeed(boolean invalidateData) {\n retrySubredditLoad(Constants.TAG_FRAG_SUBREDDIT_VIEWER, invalidateData);\n // Pop the current subreddit paginator since we're about to create a new one by refreshing\n if(!App.getStackRedditPaginator().isEmpty()){\n App.getStackRedditPaginator().pop();\n }\n }", "protected void stopAndViewToPast()\n {\n if(!widgg.common.bFreeze){ \n widgg.common.bFreeze = true;\n //now ixDataShow remain unchanged.\n } else {\n int ixdDataSpread = ixDataShowRight - ixDataShown[pixelOrg.xPixelCurve * 5/10];\n //int ixDataShowRight1 = ixDataShown[nrofValuesShow * 7/8];\n //int ixdDataSpread = ixDataShowRight - ixDataShowRight1;\n ixDataShowRight -= ixdDataSpread;\n if((ixDataShowRight - widgg.ixDataWr) < 0 && (widgg.ixDataWr - ixDataShowRight) < ixdDataSpread) {\n //left end reached.\n ixDataShowRight = widgg.ixDataWr + ixdDataSpread;\n }\n }\n widgg.redraw(100, 200);\n //System.out.println(\"left-bottom\");\n \n }", "public static void m125931a(RecyclerView recyclerView, View view, int i, String str) {\n int findFirstVisibleItemPosition = ((LinearLayoutManager) recyclerView.getLayoutManager()).findFirstVisibleItemPosition();\n if (!f90276b && findFirstVisibleItemPosition == 0 && view.getVisibility() != 8) {\n f90276b = true;\n view.setVisibility(8);\n f90276b = false;\n } else if (!f90276b && findFirstVisibleItemPosition != 0 && view.getVisibility() != 0 && i != 0) {\n f90276b = true;\n view.setVisibility(0);\n f90276b = false;\n }\n }", "private void reDoFragments() {\n pageAdapter.notifyChangeInPosition(pageAdapter.getCount());\n\n fragments.clear();\n\n int i = 1;\n for (Article a : articles) {\n String count = String.format(\"%d of %d\", i++, articles.size());\n fragments.add(NewsFragment.newInstance(a.getTitle(), a.getAuthor(), a.getDescription(), a.getUrlToImage(), a.getTime(), count, a.getUrl()));\n }\n\n pageAdapter.notifyDataSetChanged();\n pager.setCurrentItem(0);\n }", "public void shrinkItem(int index) {\n if (index < 0 || index >= getChildCount()) {\n return;\n }\n final View releasedChild = getChildAt(index);\n final LayoutParams lp = (LayoutParams) releasedChild.getLayoutParams();\n lp.isOpen = false;\n mDragHelper.smoothSlideViewTo(releasedChild, releasedChild.getLeft(), lp.shrinkTop);\n\n int length = getChildCount();\n for (int i = 0; i < length; i++) {\n if (i != index) {\n View child = getChildAt(i);\n playExpandItemAnimation(child);\n }\n }\n invalidate();\n }", "private void checkIfEmpty() {\n\n if (emptyView != null && recyclerView.getAdapter() != null) {\n\n boolean emptyViewVisible = recyclerView.getAdapter().getItemCount() == 0;\n Log.d(Utility.LOG_TAG, \" Enabling empty view for list : No data found \" );\n emptyView.setVisibility(emptyViewVisible ? View.VISIBLE : View.GONE);\n recyclerView.setVisibility(emptyViewVisible ? View.GONE : View.VISIBLE);\n }\n }", "@Override\r\n\tpublic void increaseViewcnt(int r_idx) {\n\r\n\t}", "private void layoutAttachedAndAppearingViews(RecyclerView.Recycler recycler,\r\n RecyclerView.State state){\r\n\r\n // There are no removed items out of the top border.\r\n // So we just layout from the firstAttachedItemPosition.\r\n // We do the pre layout and calculate the layout params for the real layout.\r\n if(firstChangedPosition >= firstAttachedItemPosition){\r\n // Store the layout parameters.\r\n int firstAttachedItemPositionTemp = firstAttachedItemPosition;\r\n int lastAttachedItemPositionTemp = lastAttachedItemPosition;\r\n int[] spanTopTemp = Arrays.copyOf(spanTop, mSpanCount);\r\n int[] spanBottomTemp = Arrays.copyOf(spanBottom, mSpanCount);\r\n\r\n topBorder = getPaddingTop();\r\n bottomBorder = getHeight() - getPaddingBottom();\r\n spanBottom = Arrays.copyOf(spanTop, mSpanCount);\r\n updateSpanBottomParameters();\r\n\r\n detachAndScrapAttachedViews(recycler);\r\n\r\n mCurrentPosition = firstAttachedItemPosition;\r\n lastAttachedItemPosition = firstAttachedItemPosition;\r\n\r\n // Set the fake params.\r\n fakeSpanBottomMin = spanBottomMin;\r\n fakeSpanBottomMax = spanBottomMax;\r\n fakeCurrentPosition = mCurrentPosition;\r\n fakeFirstAttachedItemPosition = firstAttachedItemPosition;\r\n fakeFirstOneEmptyBottomSpanIndex = firstOneEmptyBottomSpanIndex;\r\n fakeFirstTwoEmptyBottomSpanIndex = firstTwoEmptyBottomSpanIndex;\r\n fakeSpanTop = Arrays.copyOf(spanTop, mSpanCount);\r\n fakeSpanBottom = Arrays.copyOf(spanBottom, mSpanCount);\r\n\r\n // Lay out current attached views and appearing views.\r\n fillGridForPreLayout(recycler, state);\r\n\r\n // Restore the layout parameters.\r\n firstAttachedItemPosition = firstAttachedItemPositionTemp;\r\n lastAttachedItemPosition = lastAttachedItemPositionTemp;\r\n spanTop = Arrays.copyOf(spanTopTemp, mSpanCount);\r\n spanBottom = Arrays.copyOf(spanBottomTemp, mSpanCount);\r\n updateSpanTopParameters();\r\n updateSpanBottomParameters();\r\n }else{ // There are removed items out of the top border.\r\n\r\n // Calculate the spanTop begin with the firstChangedPosition\r\n // and update layout parameters.\r\n topBorder = getPaddingTop() - scrollOffset;\r\n Arrays.fill(spanTop, topBorder);\r\n for (int i = 0; i < firstChangedPosition; i++) {\r\n for (int j = 0; j < itemLayoutWidthCache.get(i); j++) {\r\n int spanIndex = itemOccupiedStartSpan.get(i) + j;\r\n spanTop[spanIndex] += itemLayoutHeightCache.get(i) * sizePerSpan;\r\n }\r\n }\r\n updateSpanTopParameters();\r\n bottomBorder = getHeight() - getPaddingBottom();\r\n spanBottom = Arrays.copyOf(spanTop, mSpanCount);\r\n updateSpanBottomParameters();\r\n mCurrentPosition = firstChangedPosition;\r\n // Fill from the spanTop until bottomBorder.\r\n // Note that we just lay out attached views and appearing views.\r\n // The firstAttachedItemPosition may change,\r\n // set it as -1 and update it during the layout\r\n firstAttachedItemPosition = -1;\r\n lastAttachedItemPosition = -1;\r\n\r\n detachAndScrapAttachedViews(recycler);\r\n\r\n // Set the fake params.\r\n fakeSpanBottomMin = spanBottomMin;\r\n fakeSpanBottomMax = spanBottomMax;\r\n fakeCurrentPosition = mCurrentPosition;\r\n fakeFirstAttachedItemPosition = firstAttachedItemPosition;\r\n fakeFirstOneEmptyBottomSpanIndex = firstOneEmptyBottomSpanIndex;\r\n fakeFirstTwoEmptyBottomSpanIndex = firstTwoEmptyBottomSpanIndex;\r\n fakeSpanTop = Arrays.copyOf(spanTop, mSpanCount);\r\n fakeSpanBottom = Arrays.copyOf(spanBottom, mSpanCount);\r\n\r\n // Lay out current attached views and appearing views.\r\n fillGridForPreLayout(recycler, state);\r\n\r\n // Restore the layout parameters.\r\n firstAttachedItemPosition = fakeFirstAttachedItemPosition;\r\n spanTop = Arrays.copyOf(fakeSpanTop, mSpanCount);\r\n spanBottom = Arrays.copyOf(fakeSpanBottom, mSpanCount);\r\n updateSpanTopParameters();\r\n updateSpanBottomParameters();\r\n }\r\n\r\n }", "public Builder clearViewportIndex() {\n \n viewportIndex_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "private void showMovies(){\n errorTextView.setVisibility(View.INVISIBLE);\n errorButton.setVisibility(View.INVISIBLE);\n errorButton.setEnabled(true);\n recyclerView.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.INVISIBLE);\n }", "public void resetStack() {\n\t\tmCurrentViewIndex = 0;\n\t\tremoveAllViewsInLayout();\n\t\trequestLayout();\n\t}", "public void removeAnswers(){\n for(int i=0;i<gridView.getChildCount();i++){\n final View child = gridView.getChildAt(i);\n if(Build.VERSION.SDK_INT>15){\n child.animate().alpha(0).setDuration(300).withEndAction(new Runnable() {\n @Override\n public void run() {\n child.setVisibility(View.GONE);\n }\n });}else{ child.setAlpha(0);\n child.setVisibility(View.GONE);}\n }\n\n }", "public void refreshNet(View view) {\n ll.setVisibility(View.GONE);\n getMovies();\n }", "public void updateViews() {\n updateViews(null);\n }", "public void expand() {\n if(!contentLayout.isVisible()) {\n toggle(false);\n }\n }", "public Builder clearExpose() {\n\n expose_ = 0;\n onChanged();\n return this;\n }", "protected void mergeVisible ()\n {\n List<Integer> visible = getVisibleLayers();\n // remove the first layer and call that the \"mergeTo\" layer\n int mergeTo = visible.remove(0); // remove first value, not value 0!\n\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n Object key = entry.getKey();\n if (visible.contains(_scene.getLayer(key))) {\n _scene.setLayer(key, mergeTo);\n }\n }\n\n // kill the layers, highest to lowest\n for (Integer layer : Lists.reverse(visible)) {\n _tableModel.removeLayer(layer);\n }\n fireStateChanged();\n }", "private void makeRippleViewsInVisible() {\n int childCount = this.getChildCount();\n for (int i = 0; i < childCount; i++) {\n View childView = this.getChildAt(i);\n if (childView instanceof RippleView) {\n childView.setVisibility(INVISIBLE);\n }\n }\n }", "protected void expandAll() {\n Activity a = getCurrentActivity();\n if (a instanceof SessionsExpandableListActivity) {\n SessionsExpandableListActivity sela = (SessionsExpandableListActivity) a;\n \n sela.expandAll();\n Log.i(\"expandAll()\", \"expanded!\");\n }\n \n \n // View view = mTabHost.getCurrentTabView();\n // Log.i(\"INFO: \", view.getClass().getName());\n \n \n }", "private void peek() {\n\t\tfor (int card = 0; card < CARDS_SUM; card++) {\n\t\t\t// cheat by finding card face without turning card over\n\t\t\tPlayingCard thisCard = ((PlayingCard) getActivity().findViewById(solo.getImage(card).getId()));\n\t\t\tif (!thisCard.isLocked() && ! thisCard.getVisible()) {\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void rebuild(int index, int count) {\n if (count != 0) {\n int startOffset = (index == 0) ? -1 : getView(index - 1).getEndOffset();\n int viewCount = getViewCount();\n int endIndex = Math.min(index + count, viewCount);\n int endOffset = (endIndex == viewCount) ? -1 : getView(endIndex).getStartOffset();\n boolean loggable = LOG.isLoggable(Level.FINE);\n long tm = 0;\n if (loggable) {\n tm = System.currentTimeMillis();\n }\n reloadChildren(index, count, startOffset, endOffset);\n if (loggable) {\n LOG.fine(\"GapBoxView.rebuild(): \" + (System.currentTimeMillis() - tm) + // NOI18N\n \"ms; index=\" + index + // NOI18N\n \", count=\" + count + // NOI18N\n \", <\" + startOffset + \", \" + endOffset + \">\\n\" // NOI18N\n );\n }\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n vi = inflater.inflate(R.layout.fragment_saved, container, false);\n\n dbWishes = new ArrayList<>();\n refreshData();\n savedAdapter = new SavedAdapter(getContext(), dbWishes);\n\n RecyclerView recyclerViewtop = (RecyclerView) vi.findViewById(R.id.recycler_view);\n StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(NUM_COLUMNS, LinearLayoutManager.VERTICAL);\n recyclerViewtop.setAdapter(savedAdapter);\n recyclerViewtop.setLayoutManager(staggeredGridLayoutManager);\n recyclerViewtop.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n if (newState == AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {\n isScroll = true;\n //fetchData();\n }\n }\n\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n currentItem = new LinearLayoutManager(getActivity()).getChildCount();\n totalItem = new LinearLayoutManager(getActivity()).getItemCount();\n scrollItem = new LinearLayoutManager(getActivity()).findFirstVisibleItemPosition();\n\n if (isScroll && (currentItem + scrollItem == totalItem)) {\n isScroll = false;\n }\n }\n });\n return vi;\n }", "private void updateExpenseListView() {\n expenseListView.getItems().clear();\n int count = 1;\n for (Expense expense : duke.expenseList.getExternalList()) {\n expenseListView.getItems().add(count + \". \" + expense.toString());\n count++;\n }\n }", "public abstract boolean appendVisibleItems(int i, boolean z);", "private void letExplode(View clickedView) {\n final Rect viewRect = new Rect();\n clickedView.getGlobalVisibleRect(viewRect);\n\n TransitionSet set = new TransitionSet()\n .addTransition(new Explode().setEpicenterCallback(new Transition.EpicenterCallback() {\n @Override\n public Rect onGetEpicenter(Transition transition) {\n return viewRect;\n }\n }).excludeTarget(clickedView, true))\n .addTransition(new Fade().addTarget(clickedView))\n .addListener(new Transition.TransitionListenerAdapter() {\n @Override\n public void onTransitionEnd(Transition transition) {\n transition.removeListener(this);\n getActivity().onBackPressed();\n }\n });\n TransitionManager.beginDelayedTransition(mRecyclerView, set);\n\n // remove all views from Recycler View\n mRecyclerView.setAdapter(null);\n }", "public void refreshAdapter() {\n int count = 0;\n removeAllViews();\n for (TypeViewInfo info : this.mTypeToView.values()) {\n info.currentUsedPosition = 0;\n }\n if (this.mListAdapter != null) {\n count = this.mListAdapter.getCount();\n }\n for (int i = 0; i < count; i++) {\n Integer type = Integer.valueOf(this.mListAdapter.getItemViewType(i));\n if (!this.mTypeToView.containsKey(type)) {\n this.mTypeToView.put(type, new TypeViewInfo(type));\n }\n TypeViewInfo info2 = this.mTypeToView.get(type);\n View canvasView = info2.currentUsedPosition < info2.holdViews.size() ? info2.holdViews.get(info2.currentUsedPosition) : null;\n View current = this.mListAdapter.getView(i, canvasView, this);\n if (current == null) {\n throw new RuntimeException(\"Adapter.getView(postion , convasView, viewParent) cannot be null \");\n }\n if (canvasView != current) {\n if (canvasView == null) {\n info2.holdViews.add(current);\n } else {\n info2.holdViews.remove(canvasView);\n info2.holdViews.add(info2.currentUsedPosition, current);\n }\n }\n info2.currentUsedPosition++;\n addView(current);\n }\n this.mSelectIndex = Math.min(this.mSelectIndex, (float) (count - 1));\n this.mSelectIndex = Math.max(0.0f, this.mSelectIndex);\n calculationRect(true);\n }", "private void checkRecycledViewPool(int viewType) {\n try {\n if (mViewTypes.size() > MAX_VIEWTYPE_ALLOW_CACHE)\n mAllowCacheViewHolder = false;\n\n if (mDownForBidCacheViewHolder)\n if (getHostView() != null && getHostView().getInnerView() != null)\n getHostView().getInnerView().getRecycledViewPool().setMaxRecycledViews(viewType, 0);\n\n if (!mDownForBidCacheViewHolder) {\n if (!mAllowCacheViewHolder) {\n if (getHostView() != null && getHostView().getInnerView() != null) {\n for (int i = 0; i < mViewTypes.size(); i++) {\n getHostView().getInnerView().getRecycledViewPool().setMaxRecycledViews(mViewTypes.keyAt(i), 0);\n }\n mDownForBidCacheViewHolder = true;\n }\n }\n }\n } catch (Exception e) {\n WXLogUtils.e(TAG, \"Clear recycledViewPool error!\");\n }\n }", "public void reset() {\n next = 0;\n renderList.clear();\n viewList.clear();\n }", "@Override\n public void refreshRecipeList() {\n favouritePageRecyclerViewAdapter.notifyDataSetChanged();\n\n }", "public Builder clearIndex() {\n \n index_ = 0;\n onChanged();\n return this;\n }", "public void populate(int i) {\n int i2;\n boolean z;\n boolean z2;\n boolean z3;\n boolean z4;\n boolean z5;\n String str;\n if (this.mCurItem != i) {\n i2 = this.mCurItem < i ? 66 : 17;\n this.mLastItem = this.mCurItem;\n this.mCurItem = i;\n } else {\n i2 = 2;\n }\n if (this.mAdapter == null) {\n sortChildDrawingOrder();\n } else if (this.mPopulatePending) {\n sortChildDrawingOrder();\n } else if (getWindowToken() != null) {\n this.mAdapter.startUpdate((ViewGroup) this);\n int count = this.mAdapter.getCount();\n if (count != this.mExpectedAdapterCount) {\n try {\n str = getResources().getResourceName(getId());\n } catch (NotFoundException unused) {\n str = Integer.toHexString(getId());\n }\n StringBuilder sb = new StringBuilder(\"The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: \");\n sb.append(this.mExpectedAdapterCount);\n sb.append(\", found: \");\n sb.append(count);\n sb.append(\" Pager id: \");\n sb.append(str);\n sb.append(\" Pager class: \");\n sb.append(getClass());\n sb.append(\" Problematic adapter: \");\n sb.append(this.mAdapter.getClass());\n throw new IllegalStateException(sb.toString());\n }\n int i3 = 0;\n boolean z6 = true;\n while (i3 < this.mItems.size()) {\n ItemInfo itemInfo = this.mItems.get(i3);\n int i4 = this.mCurItem - 2;\n while (true) {\n if (i4 > this.mCurItem + 2) {\n z5 = true;\n break;\n }\n if (itemInfo.position == getRealPosition(i4)) {\n z5 = false;\n break;\n }\n i4++;\n }\n if (z5) {\n this.mAdapter.destroyItem((ViewGroup) this, itemInfo.position, itemInfo.object);\n if (this.mUseRecycler) {\n recycleView((View) itemInfo.object);\n }\n this.mItems.remove(itemInfo);\n i3--;\n z6 = false;\n }\n i3++;\n }\n for (int i5 = this.mCurItem - 1; i5 >= this.mCurItem - 2; i5--) {\n if (i5 >= 0 || needRecycle()) {\n int realPosition = getRealPosition(i5);\n Iterator<ItemInfo> it = this.mItems.iterator();\n while (true) {\n if (!it.hasNext()) {\n z3 = z6;\n z4 = false;\n break;\n }\n ItemInfo next = it.next();\n if (next.position == realPosition) {\n if (this.mChangeData) {\n refreshView(next);\n z4 = true;\n z3 = false;\n } else {\n z3 = z6;\n z4 = true;\n }\n }\n }\n if (!z4) {\n addNewItem(realPosition, 0);\n z6 = false;\n } else {\n z6 = z3;\n }\n }\n }\n for (int i6 = this.mCurItem; i6 <= this.mCurItem + 2; i6++) {\n int realPosition2 = getRealPosition(i6);\n Iterator<ItemInfo> it2 = this.mItems.iterator();\n while (true) {\n if (!it2.hasNext()) {\n z = z6;\n z2 = false;\n break;\n }\n ItemInfo next2 = it2.next();\n if (next2.position == realPosition2) {\n if (this.mChangeData) {\n refreshView(next2);\n z2 = true;\n z = false;\n } else {\n z = z6;\n z2 = true;\n }\n }\n }\n if (!z2) {\n addNewItem(realPosition2, -1);\n z6 = false;\n } else {\n z6 = z;\n }\n }\n this.mChangeData = false;\n ArrayList arrayList = new ArrayList();\n for (int i7 = this.mCurItem - 2; i7 <= this.mCurItem + 2; i7++) {\n if (i7 >= 0 || needRecycle()) {\n int realPosition3 = getRealPosition(i7);\n Iterator<ItemInfo> it3 = this.mItems.iterator();\n while (true) {\n if (!it3.hasNext()) {\n break;\n }\n ItemInfo next3 = it3.next();\n if (next3.position == realPosition3) {\n arrayList.add(next3);\n break;\n }\n }\n }\n }\n this.mItems.clear();\n this.mItems.addAll(arrayList);\n ItemInfo itemInfo2 = null;\n calculatePageOffsets(null, 0, null);\n this.mAdapter.setPrimaryItem((ViewGroup) this, this.mCurItem, (Object) null);\n if (!(!z6 || this.mAdapter == null || this.mAdapter.getRealCount() != 5 || getRight() == 0 || getBottom() == 0)) {\n requestLayout();\n }\n this.mAdapter.finishUpdate((ViewGroup) this);\n int childCount = getChildCount();\n for (int i8 = 0; i8 < childCount; i8++) {\n View childAt = getChildAt(i8);\n LayoutParams layoutParams = (LayoutParams) childAt.getLayoutParams();\n layoutParams.childIndex = i8;\n if ((!layoutParams.isDecor && layoutParams.widthFactor == 0.0f) || childCount == 1) {\n ItemInfo infoForChild = infoForChild(childAt);\n if (infoForChild != null) {\n layoutParams.widthFactor = infoForChild.widthFactor;\n layoutParams.position = infoForChild.position;\n }\n }\n }\n sortChildDrawingOrder();\n if (hasFocus()) {\n View findFocus = findFocus();\n if (findFocus != null) {\n itemInfo2 = infoForAnyChild(findFocus);\n }\n if (itemInfo2 == null || itemInfo2.position != this.mCurItem) {\n for (int i9 = 0; i9 < getChildCount(); i9++) {\n View childAt2 = getChildAt(i9);\n ItemInfo infoForChild2 = infoForChild(childAt2);\n if (infoForChild2 != null && infoForChild2.position == this.mCurItem && childAt2.requestFocus(i2)) {\n break;\n }\n }\n }\n }\n scrollTo(getRate(), 0);\n }\n }", "public void recycle() {\n \tif (mPreviousBitmap != null) {\n\t \tmPreviousBitmap.recycle(); \n\t \tmPreviousBitmap = null;\n \t}\n \tif (mCurrentBitmap != null) {\n\t \tmCurrentBitmap.recycle();\n\t mCurrentBitmap = null;\n \t}\n }", "public void showNextAd() {\n if (reInitializeCampaign) clearExternalAds();\n int extViewIndicator = getChildCount() - (1 + numInternalChildren);\n AppyAdService.getInstance().debugOut(TAG,\"External view indicator is \"+extViewIndicator+\". Indexes: current=\"+curAd+\", next=\"+nextAd+\", base=\"+baseAd);\n if ((extViewIndicator < nextAd) && (nextAd > (numInternalChildren-1))) {\n addAdView(tozAdCampaign.get(nextAd));\n }\n if (reInitializeCampaign && (nextAd == 0) && (numInternalChildren > 0) && (getDisplayedChild() == 0)) {\n AppyAdService.getInstance().debugOut(TAG,\"Leaving root internal ad (index=0) displayed (first pass with new ad campaign)\");\n }\n else {\n AppyAdService.getInstance().debugOut(TAG,\"Current ad bumped to next index\");\n if (nextAd != getDisplayedChild()) {\n setInAnimation(AppyAdService.getInstance().setAnimation(\"in\", tozAdCampaign.get(nextAd)));\n setOutAnimation(AppyAdService.getInstance().setAnimation(\"out\", tozAdCampaign.get(curAd)));\n setDisplayedChild(nextAd);\n }\n curAd = nextAd;\n }\n if (reInitializeCampaign) initializeCounters();\n }", "public void refresh() {\n\t\tthis.viewer.refresh();\n\t}", "public boolean isExpanded();", "private void makeRippleViewsVisible() {\n int childCount = this.getChildCount();\n for (int i = 0; i < childCount; i++) {\n View childView = this.getChildAt(i);\n if (childView instanceof RippleView) {\n childView.setVisibility(VISIBLE);\n }\n }\n }", "public void dataSetChanged() {\n int count = this.mAdapter.getCount();\n this.mExpectedAdapterCount = count;\n boolean z = this.mItems.size() < (this.mOffscreenPageLimit * 2) + 1 && this.mItems.size() < count;\n int i = this.mCurItem;\n this.mChangeData = true;\n boolean z2 = z;\n int i2 = i;\n int i3 = 0;\n boolean z3 = false;\n while (i3 < this.mItems.size()) {\n ItemInfo itemInfo = this.mItems.get(i3);\n int itemPosition = this.mAdapter.getItemPosition(itemInfo.object);\n if (itemPosition != -1) {\n if (itemPosition == -2) {\n this.mItems.remove(i3);\n i3--;\n if (!z3) {\n this.mAdapter.startUpdate((ViewGroup) this);\n z3 = true;\n }\n this.mAdapter.destroyItem((ViewGroup) this, itemInfo.position, itemInfo.object);\n if (this.mCurItem == itemInfo.position) {\n i2 = Math.max(0, Math.min(this.mCurItem, count - 1));\n }\n } else if (itemInfo.position != itemPosition) {\n if (itemInfo.position == this.mCurItem) {\n i2 = itemPosition;\n }\n itemInfo.position = itemPosition;\n }\n z2 = true;\n }\n i3++;\n }\n if (z3) {\n this.mAdapter.finishUpdate((ViewGroup) this);\n }\n if (z2) {\n int childCount = getChildCount();\n for (int i4 = 0; i4 < childCount; i4++) {\n LayoutParams layoutParams = (LayoutParams) getChildAt(i4).getLayoutParams();\n if (!layoutParams.isDecor) {\n layoutParams.widthFactor = 0.0f;\n }\n }\n setCurrentItemInternal(i2, false, true);\n requestLayout();\n }\n }", "private void expandAll()\r\n\t{\r\n\t\tint count = listAdapter.getGroupCount();\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tmyList.expandGroup(i);\r\n\t\t}\r\n\t}", "@Override\n public boolean onPreDraw() {\n if (mRecyclerView.getChildCount() > 0) {\n mRecyclerView.getViewTreeObserver().removeOnPreDrawListener(this);\n int itemPosition = mMoviesAdapter.getSelectedItemPosition();\n if (RecyclerView.NO_POSITION == itemPosition) itemPosition = 0;\n RecyclerView.ViewHolder vh = mRecyclerView.findViewHolderForAdapterPosition(itemPosition);\n if (null != vh && mAutoSelectView) {\n mMoviesAdapter.selectView(vh);\n }\n return true;\n }\n return false;\n }", "public void refreshView(){\n\t\tView v = getView();\n\t\tif(v != null){\n\t\t\tv.invalidate();\n\t\t}\n\t}", "public void expand() {\n openItems();\n }", "private void removeNonVisibleViews(final int offset) {\n // We need to keep close track of the child count in this function. We\n // should never remove all the views, because if we do, we loose track\n // of were we are.\n int childCount = getChildCount();\n\n // if we are not at the bottom of the list and have more than one child\n if (mLastItemPosition != mAdapter.getCount() - 1 && childCount > 1) {\n // check if we should remove any views in the top\n View firstChild = getChildAt(0);\n while (firstChild != null && getChildBottom(firstChild) + offset < 0) {\n // remove the top view\n removeViewInLayout(firstChild);\n childCount--;\n mCachedItemViews.addLast(firstChild);\n mFirstItemPosition++;\n\n // update the list offset (since we've removed the top child)\n mListTopOffset += getChildHeight(firstChild);\n\n // Continue to check the next child only if we have more than\n // one child left\n if (childCount > 1) {\n firstChild = getChildAt(0);\n } else {\n firstChild = null;\n }\n }\n }\n\n // if we are not at the top of the list and have more than one child\n if (mFirstItemPosition != 0 && childCount > 1) {\n // check if we should remove any views in the bottom\n View lastChild = getChildAt(childCount - 1);\n while (lastChild != null && getChildTop(lastChild) + offset > getHeight()) {\n // remove the bottom view\n removeViewInLayout(lastChild);\n childCount--;\n mCachedItemViews.addLast(lastChild);\n mLastItemPosition--;\n\n // Continue to check the next child only if we have more than\n // one child left\n if (childCount > 1) {\n lastChild = getChildAt(childCount - 1);\n } else {\n lastChild = null;\n }\n }\n }\n }", "public void showNextImageSet(View view) { // when \"Next\" button is clicked, shows new set of images\n displayingCarMakes.clear();\n displayingImageIndexes.clear();\n\n // resetting the car image for picking an image again\n userPickedCarImage = false;\n\n // if next is touched repeatedly, this will prevent the countdown timer messing up\n if (toggleCountdown) {\n if (roundCountDownTimer != null) {\n roundCountDownTimer.cancel();\n }\n runTimer(20000);\n }\n showImageSet();\n }", "public void expensesRefresh() {\n expensesListData.clear();\n DBList.expenses(key1OfActiveChallenge, expensesListAdapter, expensesListData);\n }", "public Builder clearIndex() {\n \n index_ = 0;\n onChanged();\n return this;\n }", "public void diminueVies() {\n\n nbVies_restantes.set(nbVies_restantes.get()-1);\n\n }", "@Override\n public boolean isExpanded() {\n return isExpanded;\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, final int position) {\n\n\n if (this.mDataset.get(position).simpleValues.get(\"imdbID\") != holder.imdbID) {\n\n /*\n if (holder.imdbID != null) {\n this.bitmaps.get(holder.imdbID).recycle();\n this.bitmaps.remove(holder.imdbID);\n }*/\n\n File cover = new File(this.application.coverFolderMoviesHigh + mDataset.get(position).simpleValues.get(\"imdbID\") + \".jpg\");\n\n //Bearbeite Bild des Layouts\n if (cover.exists()) {\n BitmapFactory.Options options = new BitmapFactory.Options();\n /*\n if (this.activity.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n options.inSampleSize = 2;\n } else {\n options.inSampleSize = 3;\n }*/\n Bitmap coverBitmap = BitmapFactory.decodeFile(cover.getAbsolutePath(), options);\n //this.bitmaps.put(this.mDataset.get(position).simpleValues.get(\"imdbID\"), coverBitmap);\n holder.mImageView.setImageBitmap(coverBitmap);\n }\n\n // setze onClickListener\n holder.mImageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FragmentManager fragmentManager = activity.getSupportFragmentManager();\n // schließe alle offenen Fragmente\n for (int i=fragmentManager.getBackStackEntryCount(); i>0; i--) {\n fragmentManager.popBackStack();\n }\n // erstelle detailedMovieFragment\n MovieDetailedFragment movieDetailedFragment = new MovieDetailedFragment();\n movieDetailedFragment.setImdbID(mDataset.get(position).simpleValues.get(\"imdbID\"));\n if (mDataset.get(position).simpleValues.get(\"3d\").length() == 0) {\n movieDetailedFragment.setDimensions(0);\n } else {\n movieDetailedFragment.setDimensions(1);\n }\n fragmentManager.beginTransaction().replace(R.id.mainContent, movieDetailedFragment, \"movieDetailedFragment\").addToBackStack(\"movieDetailedFragment\").commit();\n }\n });\n holder.imdbID = this.mDataset.get(position).simpleValues.get(\"imdbID\");\n\n }\n\n }", "@Override\n public void unDraw() {\n index--;\n }" ]
[ "0.591007", "0.530726", "0.53055775", "0.52003694", "0.51741856", "0.51741856", "0.5153091", "0.5148311", "0.50956845", "0.5062094", "0.5043235", "0.5025626", "0.5009547", "0.49849468", "0.49460635", "0.49247324", "0.49212053", "0.49017346", "0.48811993", "0.48781604", "0.48632538", "0.48589423", "0.48587736", "0.48582724", "0.48466223", "0.48354757", "0.4815047", "0.48144597", "0.47960305", "0.47796318", "0.4778202", "0.47682998", "0.47482955", "0.4747136", "0.47466266", "0.4743519", "0.4740923", "0.4732258", "0.47296715", "0.47284847", "0.47266823", "0.47223252", "0.4716166", "0.47158635", "0.47004724", "0.46994564", "0.46971318", "0.46831378", "0.46826497", "0.46684322", "0.46558422", "0.46487558", "0.46447173", "0.4638613", "0.46373907", "0.46261472", "0.46259227", "0.46250725", "0.46250725", "0.46250725", "0.46246156", "0.4622737", "0.4622122", "0.46169037", "0.46153527", "0.4611446", "0.46110517", "0.46108115", "0.46105263", "0.46076053", "0.46033508", "0.4602777", "0.4597704", "0.45975548", "0.45955175", "0.4585928", "0.4585187", "0.45732692", "0.4558648", "0.45558512", "0.45556536", "0.4554925", "0.45445776", "0.45430583", "0.45371154", "0.4535162", "0.45347306", "0.45314243", "0.45287618", "0.45273322", "0.4525842", "0.45223194", "0.45204952", "0.45183593", "0.45179307", "0.45161518", "0.45099625", "0.45071673", "0.44978294", "0.44918856" ]
0.5236938
3
This method uses the default sharing intent within the Android framework to allow the user to share books on various social media platforms.
public void share(View view){ Toast.makeText(this, "Loading share options ...", Toast.LENGTH_SHORT).show(); //Create an intent to share Intent sharingIntent = new Intent(Intent.ACTION_SEND); sharingIntent.setType("text/plain"); String shareBody = "You should check out " + getString(R.string.app_name) + ", an app where you can easily find books at the school library!"; if(currentBook.title != null) shareBody = "Check out \"" + currentBook.title + "\", a book that I found with the app, " + getString(R.string.app_name); sharingIntent.putExtra(Intent.EXTRA_SUBJECT, "" + getString(R.string.app_name)); sharingIntent.putExtra(Intent.EXTRA_TEXT, shareBody); startActivity(Intent.createChooser(sharingIntent, "Share via")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void shareIt() {\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\r\n\t\tsharingIntent.setType(\"text/plain\");\r\n\t\tString shareBody = content.getText().toString();\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sharing\");\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\r\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\r\n\t}", "@Override\n public void onClick(View v) {\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = caption + \" - \" + description;\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sobers Stories\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share With Friends\"));\n\n }", "protected void addShare() {\n \t\t((InputMethodManager) this.getContext().getSystemService(\n \t\t\t\tContext.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(\n \t\t\t\tthis.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n \t\tIntent intent = new Intent(Intent.ACTION_SEND);\n \t\tArrayList<String> images = this.mNoteItemModel.getImages();\n \t\tLog.i(TAG, images.toString());\n \t\tif (images.isEmpty())\n \t\t\tintent.setType(\"text/plain\");\n \t\telse if (images.size() == 1) {\n \t\t\tintent.setType(\"image/*\");\n \t\t} else if (images.size() > 1) {\n \t\t\tintent.setAction(Intent.ACTION_SEND_MULTIPLE);\n \t\t\tintent.setType(\"images/*\");\n \t\t}\n \t\tintent.putExtra(Intent.EXTRA_TITLE, \"Share my note...\");\n \t\tintent.putExtra(Intent.EXTRA_TEXT, this.mNoteItemModel.getContent());\n \t\tif (images.size() == 1) {\n \t\t\tUri uri = this.mNoteItemModel.getImageUri(images.get(0));\n \t\t\tintent.putExtra(Intent.EXTRA_STREAM, uri);\n \t\t} else if (images.size() > 1) {\n \t\t\tArrayList<Uri> uris = new ArrayList<Uri>();\n \t\t\tfor (String image : images) {\n \t\t\t\turis.add(this.mNoteItemModel.getImageUri(image));\n \t\t\t}\n \t\t\tintent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);\n \t\t}\n \t\tthis.getContext().startActivity(Intent.createChooser(intent, \"Share\"));\n \t}", "public void shareApp() {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/*\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n shareIntent.putExtra(Intent.EXTRA_TEXT, \"Try this \" + getResources().getString(R.string.app_name) + \" App: https://play.google.com/store/apps/details?id=\" + getApplicationContext().getPackageName());\n startActivity(Intent.createChooser(shareIntent, \"Share Using\"));\n }", "@Override\n public void onClick(View v) {\n String shareBody =item.title.toString()+\"\\n\\n\"+getResources().getString(R.string.item_show)+\"\\n\"+ Config.APP_IMAGES_URL.replace(\"uploads/\",\"share/\")+item.id;\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.app_name)));\n }", "@Override\n public void onClick(View view) {\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_TITLE,title );\n sharingIntent.putExtra(Intent.EXTRA_TEXT,description);\n startActivity(Intent.createChooser(sharingIntent,\"Share using\"));\n\n }", "private void shareRecipe(){\n Intent shareRecipeIntent = new Intent();\n shareRecipeIntent.setAction(Intent.ACTION_SEND);\n shareRecipeIntent.putExtra(Intent.EXTRA_TITLE, \"Check out this recipe that I found on My Recipes Book\");\n shareRecipeIntent.putExtra(Intent.EXTRA_TEXT, setTextForSharing());\n shareRecipeIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(shareRecipeIntent, getResources().getString(R.string.share_intent_text)));\n }", "private void setUpShareAppListener() {\n shareAppButton.setOnClickListener(v -> {\n try {\n Intent i = new Intent(Intent.ACTION_SEND);\n i.setType(\"text/plain\");\n i.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string.app_name));\n String aux = \"Download the app\\n\";\n aux = aux + \"https://drive.google.com/file/d/11oh5KY-V3GAdRjmZECbD5cOD1T8syDJs/view?usp=sharing\" + getBaseContext().getPackageName();\n i.putExtra(Intent.EXTRA_TEXT, aux);\n startActivity(i);\n } catch (Exception e) {\n }\n });\n }", "private void shareToFacebook(Context context, CallbackManager callbackManager, Uri uri) {\n Toast.makeText(context, \"start sharing to facebook, \" + uri.getPath(), Toast.LENGTH_SHORT).show();\n //com.facebook.orca\n //com.facebook.katana\n //com.example.facebook\n //com.facebook.android\n String facebookPackage = \"com.facebook.katana\";\n if (AppUtil.getInstance().isAppInstalled(context, facebookPackage)) {\n //using default intent\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"image/*\");\n// intent.putExtra(Intent.EXTRA_STREAM, uri);\n// intent.putExtra(Intent.EXTRA_TEXT, \"this is a simple extra text\");\n// intent.setPackage(facebookPackage);\n//// startActivity(Intent.createChooser(intent, \"pick an app to ...\"));\n// startActivity(intent);\n\n //using sdk but native facebook app has been installed\n sharePhotoToFacebook(context, callbackManager, uri);\n\n } else {\n loginAndShareToFacebook(context, callbackManager, uri);\n }\n\n\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_share:\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n String link;\n //Test if its from google or b-ok\n if(book.getVolumeInfo().getWebLink().contains(\"books.google.com\")) {\n link = book.getVolumeInfo().getWebLink();\n }\n else {\n link = \"https://1lib.eu\" + book.getVolumeInfo().getWebLink();\n }\n intent.putExtra(Intent.EXTRA_TEXT, link);\n startActivity(Intent.createChooser(intent, \"Share with\"));\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "private void share(String title, String text)\n {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, text);\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, title));\n }", "private void _tweetShare(Activity act, String title, String description)\n {\n try {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.setPackage(\"com.twitter.android\");\n shareIntent.putExtra(Intent.EXTRA_TITLE, title);\n shareIntent.putExtra(Intent.EXTRA_TEXT, description);\n act.startActivity(shareIntent);\n } catch (ActivityNotFoundException ex) {\n String tweetUrl = StringUtils.join(\" \",\"https://twitter.com/intent/tweet?text=\", title, description);\n Uri uri = Uri.parse(tweetUrl);\n act.startActivity(new Intent(Intent.ACTION_VIEW, uri));\n }\n }", "private Intent getDefaultShareIntent(){\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n intent.putExtra(Intent.EXTRA_SUBJECT, \"SUBJECT\");\n intent.putExtra(Intent.EXTRA_TEXT,\"Extra Text\");\n return intent;\n }", "public void shareApp(String link) {\n\n\n String shareBody = link + \"\\n\" + \"https://play.google.com/store/apps/details?id=\" + getApplicationContext().getPackageName();\n\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getResources().getString(R.string.app_name) + \" -Download App from playstore\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody + \"\\n\" + \"Promo code-\" + new SessionManager(this).getREFERAL_CODE());\n\n Intent i = new Intent(Intent.createChooser(sharingIntent, \"Share via\"));\n startActivity(i);\n\n\n }", "private void createShareIntent() {\n String body2 = TEXT_TO_SHARE2;\n\n //Step 2: Create the shareIntent with action 'Intent.ACTION_SEND'\n Intent sendIntent = new Intent(Intent.ACTION_SEND);\n\n //Step 3: Specify the intent type\n //E.g. shareIntent.setType(\"text/plain\");\n sendIntent.setType(\"text/plain\");\n\n //Step 4: Add the text to share as an extra data (Intent.EXTRA_TEXT)\n sendIntent.putExtra(Intent.EXTRA_TEXT, body2);\n\n Intent shareIntent = Intent.createChooser(sendIntent, null);\n\n //Step 5: Start shareIntent\n startActivity(shareIntent);\n\n }", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.SINA)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "private void shareFlipzu() {\n\t\t\n\t\t//create the intent \n\t\tIntent shareIntent = \n\t\t new Intent(android.content.Intent.ACTION_SEND); \n\t\t \n\t\t//set the type \n\t\tshareIntent.setType(\"text/plain\"); \n\t\t \n\t\t//add a subject \n\t\tshareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \n\t\t \"Check out this cool App\");\t\t\n\t\t \n\t\t//build the body of the message to be shared \n\t\tString shareMessage = \"Flipzu, live audio broadcast from your Android phone: https://market.android.com/details?id=\" + APP_PNAME; \n\t\t \n\t\t//add the message \n\t\tshareIntent.putExtra(android.content.Intent.EXTRA_TEXT, \n\t\t shareMessage); \n\t\t \n\t\t//start the chooser for sharing \n\t\tstartActivity(Intent.createChooser(shareIntent, \n\t\t getText(R.string.share_app))); \n\n\t}", "private void launchShareIntent() {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, gif.getFullGif().getUrl());\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, getString(R.string.share_dialog_title)));\n }", "private void shareLink(View v) {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // If you want to share a png image only, you can do:\n // setType(\"image/png\"); OR for jpeg: setType(\"image/jpeg\");\n share.setType(\"image/*\");\n\n // Make sure you put example png image named myImage.png in your\n // directory\n\n\n Log.d(\"\", \"PATH:\" + path);\n\n File imageFileToShare = new File(path);\n Uri uri = Uri.fromFile(imageFileToShare);\n share.putExtra(Intent.EXTRA_TEXT, \"https://play.google.com/store/apps/details?id=btech.natural.wallpaper\");\n share.putExtra(Intent.EXTRA_STREAM, uri);\n\n startActivity(Intent.createChooser(share, \"Share Image!\"));\n }", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.WEIXIN)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "public void shareToFacebook(View view) {\n Uri path = imageWithThumbnail.getImageUri();\n\n // create email intent first to remove bluetooth + others options\n Intent emailIntent = new Intent();\n emailIntent.setAction(Intent.ACTION_SEND);\n // Native email client doesn't currently support HTML, but it doesn't hurt to try in case they fix it\n emailIntent.putExtra(Intent.EXTRA_TEXT, \"#Selfie@NYPSIT\");\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"#Selfie@NYPSIT\");\n emailIntent.putExtra(Intent.EXTRA_STREAM, path);\n emailIntent.setType(\"image/jpeg\");\n // Create the chooser based on the email intent\n Intent openInChooser = Intent.createChooser(emailIntent, \"Share to\");\n\n // Check for other packages that open our mime type\n Intent sendIntent = new Intent(Intent.ACTION_SEND);\n sendIntent.setType(\"image/jpeg\");\n\n PackageManager pm = getContext().getPackageManager();\n List<ResolveInfo> resInfo = pm.queryIntentActivities(sendIntent, 0);\n List<LabeledIntent> intentList = new ArrayList<LabeledIntent>();\n for (int i = 0; i < resInfo.size(); i++) {\n // Extract the label, append it, and repackage it in a LabeledIntent\n ResolveInfo ri = resInfo.get(i);\n String packageName = ri.activityInfo.packageName;\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n emailIntent.setPackage(packageName);\n }\n intentList.add(new LabeledIntent(emailIntent, packageName, ri.loadLabel(pm), ri.icon));\n }\n // Get our custom intent put here as we only want your app to get it not others\n Intent customIntent = new Intent(\"facebooktestingimageandtext.intent.action.SEND\");\n customIntent.setType(\"image/jpeg\");\n customIntent.setAction(\"facebooktestingimageandtext.intent.action.SEND\");\n\n resInfo = pm.queryIntentActivities(customIntent, 0);\n for (int i = 0; i < resInfo.size(); i++) {\n // Extract the label, append it, and repackage it in a LabeledIntent\n ResolveInfo ri = resInfo.get(i);\n String packageName = ri.activityInfo.packageName;\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n Intent intent = new Intent();\n intent.setComponent(new ComponentName(packageName, ri.activityInfo.name));\n intent.setAction(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_STREAM, path);\n intent.setType(\"image/jpeg\");\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n // My custom facebook intent to do something very simple!\n intent.putExtra(Intent.EXTRA_TEXT, \"caption #testhashtag\");\n }\n intentList.add(new LabeledIntent(intent, packageName, ri.loadLabel(pm), ri.icon));\n }\n }\n // convert the list of intents(intentList) to array and add as extra intents\n LabeledIntent[] extraIntents = intentList.toArray(new LabeledIntent[intentList.size()]);\n openInChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);\n\n mContext.startActivity(openInChooser);\n }", "@Override\n\tpublic void share(Integer points){\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n\t\tsharingIntent.setType(\"text/plain\");\n\t\tString shareBody = \"I got \"+ points.toString()+\" points in the game \" + getResources().getString(R.string.app_name)+\". Are you able to beat me? https://play.google.com/store/apps/details?id=\"+getPackageName();\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v)\r\n\t\t\t{\n\t\t\t\tshareViaFacebook();\r\n\t\t\t}", "@Override\n protected void sendChooserIntent(WindowAndroid windowAndroid, Intent sharingIntent) {\n super.sendChooserIntent(windowAndroid, sharingIntent);\n }", "public static void onClickShareButton(Context context) {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, context.getResources().getString(R.string.share_msg));\n sendIntent.setType(\"*/*\");\n context.startActivity(sendIntent);\n }", "private Intent Shareintent(){\n Intent Shareintent = new Intent(Intent.ACTION_SEND);\n Shareintent.setType(\"text/html\");\n Shareintent.putExtra(Intent.EXTRA_SUBJECT, \"SUBJECT\");\n Shareintent.putExtra(Intent.EXTRA_TEXT, \"http://www.habeshastudent.com/m/video.html\");\n return Shareintent;\n\n\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n Intent share=new Intent(android.content.Intent.ACTION_SEND);\n\n share.setType(\"text/plain\");\n share.putExtra(android.content.Intent.EXTRA_SUBJECT,news.getTitle());\n share.putExtra(android.content.Intent.EXTRA_TEXT,\"Follow the link : \"+MainActivity.base_url+news.getAbsolute_url()+\" to read more\");\n startActivity(Intent.createChooser(share,\"Share via\"));\n\t\t\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()){\n case R.id.share: // share with friends through social media\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, \"\");\n sharingIntent.putExtra(Intent.EXTRA_TEXT, \"\");\n try {\n startActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n break;\n } catch(ActivityNotFoundException e){Toast.makeText(MainActivity.this, \"There are no social media apps installed.\", Toast.LENGTH_SHORT).show();\n }\n\n case R.id.rate: // rate the app\n Uri uri = Uri.parse(\"market://details?id=\" + getPackageName());\n Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);\n // To count with Play market backstack, After pressing back button,\n // to taken back to our application, we need to add following flags to intent.\n goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY |\n Intent.FLAG_ACTIVITY_NEW_DOCUMENT |\n Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\n try {\n startActivity(goToMarket);\n break;\n } catch (ActivityNotFoundException e) {\n startActivity(new Intent(Intent.ACTION_VIEW,\n Uri.parse(\"http://play.google.com/store/apps/details?id=\" + getPackageName())));\n }\n\n case R.id.about:\n Intent newIntent = new Intent(MainActivity.this, about.class );\n startActivity(newIntent);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.WEIXIN_CIRCLE)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "private void shareToTwitter(Context context, Uri uri) {\n Toast.makeText(context, \"start sharing to twitter \" + uri.getPath(), Toast.LENGTH_SHORT).show();\n String twitterPackage = \"com.twitter.android\";\n if (AppUtil.getInstance().isAppInstalled(context, twitterPackage)) {\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_STREAM, uri);\n intent.putExtra(Intent.EXTRA_TEXT, \"the simple text\");\n intent.setType(\"image/*\");\n intent.setPackage(twitterPackage);\n context.startActivity(intent);\n\n //using Twitter Tweet Composer\n //The Twitter Android Application allows apps to start the exported Tweet composer via an Intent.\n //The Twitter Android compose is feature-rich, familiar to users, and has options for attaching images and videos.\n //If the Twitter app is not installed, the intent will launch twitter.com in a browser, but the specified image will be ignored.\n// TweetComposer.Builder builder = new TweetComposer.Builder(this)\n// .text(\"just setting up my Fabric.\")\n// .image(uri);\n// builder.show();\n\n } else {\n //The TwitterKit Tweet Composer (Beta) is a lightweight composer which lets users compose Tweets with App Cards from within your application.\n // It does not depend on the Twitter for Android app being installed.\n\n// Card card = new Card.AppCardBuilder(MainActivity.this)\n// .imageUri(uri)\n// .iPhoneId(\"123456\")\n// .iPadId(\"654321\")\n// .build();\n//\n// TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();\n// Intent intent = new ComposerActivity.Builder(MainActivity.this).session(session).card(card).createIntent();\n// startActivity(intent);\n Toast.makeText(context, \"to use this feature, you must have an Twitter application is installed\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (AppConstants.ENABLE_FACEBOOK_SHARE) {\n\t\t\tFacebookManager.getInstance().onActivityResult(requestCode,\n\t\t\t\t\tresultCode, data, this);\n\t\t}\n\n\t}", "protected void showShare() {\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\tAppDataItemText textItem;\n \t\t\t\ttry {\n \t\t\t\t\ttextItem = (AppDataItemText)item;\n \t\t\t\t\t\n \t\t\t\t\tIntent sharingIntent = new Intent(Intent.ACTION_SEND);\n \t\t\t\t\tsharingIntent.setType(\"text/plain\");\n \t\t\t\t\t//sharingIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { \"contacto@neurowork.net\" });\n \t\t\t\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, textItem.getItemText());\n \t\t\t\t\tstartActivity(Intent.createChooser(sharingIntent,\"Compartir contenido\"));\n \n \t\t\t\t}catch (ClassCastException e) {\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "@Override\n\tpublic void onShareButton() {\n\t\tDialogs.getShareEditDialog(this, false).show();\n\t}", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tDialog dialog=new Dialog(Glory.this);\n\t\t\t\tdialog.setContentView(R.layout.share_dialog_layout);\n\t\t\t\tdialog.setTitle(\"Share Via\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfbIcon=(TextView)dialog.findViewById(R.id.fb_icon);\n\t\t\t\ttwitterIcon=(TextView)dialog.findViewById(R.id.twitter_icon);\n\t\t\t\tgPlusIcon=(TextView)dialog.findViewById(R.id.gplus_icon);\n\t\t\t\t\n\t\t\t\tfbIcon.setTypeface(font);\n\t\t\t\ttwitterIcon.setTypeface(font);\n\t\t\t\tgPlusIcon.setTypeface(font);\n\t\t\t\n\t\t\t\t\n\t\t\t\tfbIcon.setOnClickListener(new OnClickListener() \n\t\t\t\t{\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tString url = \"https://www.facebook.com/dialog/feed?app_id=1507764116109075&\" +\n\t\t\t\t\t\t\t\t \t \"link=https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal&\" +\n\t\t\t\t\t\t\t\t \t \"caption=GuessIn&\" +\n\t\t\t\t\t\t\t\t \t \"description=\"+Uri.parse(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")+\n\t\t\t\t\t\t\t\t \t \"&redirect_uri=https://www.facebook.com/connect/login_success.html\"+\n\t\t\t\t\t\t\t\t \t \"&picture=http://nfnlabs.in/wp-content/uploads/2014/06/Share%20Image.png\";\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tintent.setData(Uri.parse(url));\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\ttwitterIcon.setOnClickListener(new OnClickListener() \n\t\t\t\t{\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tString url = \"https://twitter.com/intent/tweet?text=My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out Guessin by @nfnlabs:&url=\"+Uri.parse(\"http://goo.gl/CGmGEx\");\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tUri uri=Uri.parse(url);\n\t\t\t\t\t\tintent.setData(uri);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tgPlusIcon.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tIntent intent= new PlusShare.Builder(Glory.this)\n\t\t\t\t\t\t\t.setText(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")\n\t\t\t\t\t\t\t.setType(\"text/plain\")\n\t\t\t\t\t\t\t.setContentUrl(Uri.parse(\"https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal\"))\n\t\t\t\t\t\t\t.getIntent();\n\t\t\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tdialog.show();\n\t\t\t}", "private void shareOnFacebook() {\n // Take a screen shot\n takeScreenShot(imgSharedFacebook);\n final File screenShotfile = new File(SCREENSHOTS_LOCATIONS, mQuestionScreenShotName);\n final Uri screenShotUri = Uri.fromFile(screenShotfile);\n final String shareSubject = \"Congratulation!\";\n String shareBody = \"http://p2a.asia\";\n if (mSession != null) {\n shareBody = \"You won P2A ASEAN Game with \" + mSession.get_session_total_score() +\n \" score. Visit our site here: http://www.p2a.asia\";\n }\n final Intent sharingTotalScoreIntent = new Intent(Intent.ACTION_SEND);\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_SUBJECT, shareSubject);\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_TEXT, shareBody);\n sharingTotalScoreIntent.setType(\"image/*\");\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_STREAM, screenShotUri);\n sharingTotalScoreIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivity(Intent.createChooser(sharingTotalScoreIntent, \"Share your score via\"));\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); \n\t\tsharingIntent.setType(\"text/plain\");\n\t\tString shareBody = \"I scored \"+score+\" points!How much can you score?Install the game Space Prowler from the Play Store now!\";\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\t\t\n\t}", "public void share(View view) {\n if (urlImage != \"\") {\n try {\n new ShareOnFacebook(bitmapArray, this).share();\n } catch (Exception e) {\n e.printStackTrace();\n Intent mIntentFacebookBrowser = new Intent(Intent.ACTION_SEND);\n String mStringURL = \"https://www.facebook.com/sharer/sharer.php?u=\" + urlImage;\n mIntentFacebookBrowser = new Intent(Intent.ACTION_VIEW, Uri.parse(mStringURL));\n startActivity(mIntentFacebookBrowser);\n }\n }\n }", "public void shareToFacebook(View view) {\n // more config: https://developers.facebook.com/docs/sharing/android\n\n String quoteMessage = \"Check out this fantastic film: \" + movieTitle\n + \" (\" + movieReleaseDate + \") -- MyMovieMemoir App\";\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\n .setQuote(quoteMessage)\n .setContentUrl(Uri.parse(imageURL))\n .build();\n shareDialog.show(linkContent);\n }\n }", "public void Share(String url) {\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, url);\n Intent createChooser = Intent.createChooser(sharingIntent, \"Share via\");\n createChooser.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(createChooser);\n }", "public void shareViaWhatsappNativeOption() {\n nativeWhatsappShareButton.click();\n }", "@Override\r\n\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n\r\n switch (item.getItemId()) {\r\n\r\n case R.id.mShare:\r\n\r\n Intent i = new Intent(\r\n\r\n android.content.Intent.ACTION_SEND);\r\n\r\n i.setType(\"text/plain\");\r\n\r\n i.putExtra(\r\n\r\n android.content.Intent.EXTRA_TEXT, \"This is my grocery list\");\r\n\r\n startActivity(Intent.createChooser(\r\n\r\n i,\r\n\r\n \"Share using\"));\r\n\r\n break;\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n\r\n }", "private Intent getDefaultShareIntent(){\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n // Log.d(\"data\", data + \" Intent\");\n intent.putExtra(Intent.EXTRA_SUBJECT, \"Send Default Massage\");\n intent.putExtra(Intent.EXTRA_TEXT,data);\n return intent;\n }", "private void setShareIntent(String text) {\n\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, text);\n sendIntent.setType(\"text/plain\");\n\n if (shareActionProvider != null) {\n shareActionProvider.setShareIntent(sendIntent);\n }\n }", "private static void shareToInstagram(Context context, Uri uri) {//content://media/external/images/media/451\n // /storage/emulated/0/メリーズ スマイルDays/20151106_032146.jpg\n // /storage/emulated/0/メリーズ スマイルDays/20151106_020312.jpg\n\n Toast.makeText(context, \"start sharing to instagram \" + uri.getPath(), Toast.LENGTH_SHORT).show();\n String instagramPackage = \"com.instagram.android\";\n if (AppUtil.getInstance().isAppInstalled(context, instagramPackage)) {\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"image/*\");\n intent.putExtra(Intent.EXTRA_STREAM, uri);\n intent.setPackage(instagramPackage);\n// startActivity(Intent.createChooser(intent, \"Share to\"));\n context.startActivity(intent);\n } else {\n Toast.makeText(context, \"to use this feature, you must have an Instagram application is installed\", Toast.LENGTH_SHORT).show();\n }\n\n }", "private void genSharedPostOnFacebook () {\n shareLinkContent = new ShareLinkContent.Builder()\n .setContentTitle(\"Your Title\")\n .setContentDescription(\"Your Description\")\n .setContentUrl(Uri.parse(\"URL[will open website or app]\"))\n .setImageUrl(Uri.parse(\"image or logo [if playstore or app store url then no need of this image url]\"))\n .build();\n\n }", "private void shareImage() {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // If you want to share a png image only, you can do:\n // setType(\"image/png\"); OR for jpeg: setType(\"image/jpeg\");\n share.setType(\"image/*\");\n\n // Make sure you put example png image named myImage.png in your\n // directory\n\n\n Log.d(\"PATH\", \"PATH:\" + path);\n\n File imageFileToShare = new File(path);\n Uri uri = Uri.fromFile(imageFileToShare);\n //share.putExtra(Intent.EXTRA_TEXT, \"https://play.google.com/store/apps/details?id=kailash.natural.wallpaper\");\n share.putExtra(Intent.EXTRA_STREAM, uri);\n\n startActivity(Intent.createChooser(share, \"Share Image!\"));\n }", "public void sharePage(){\n Intent shareIntent = new Intent(Intent.ACTION_VIEW);\n shareIntent.setData(Uri.parse(\"http://192.168.43.105:5000\"));//edit url\n startActivity(shareIntent);\n }", "private void addShareAction() {\n\t\t// TODO Auto-generated method stub\n\t\tWindow window = getWindow();\n\t\tint width = getWindowManager().getDefaultDisplay().getWidth();\n\t\tint height = getWindowManager().getDefaultDisplay().getHeight();\n\t\tString shareContent = \"\" + 100 * mRightResultCount/mImagesID.size();\n\t\tString mShareFileName = File.separator + \"/color_blindness_result.png\";\n\t\t\n\t\tIntent shareIntent = new Intent(Intent.ACTION_SEND);\n\t\tFile file = ScreenShotForShare.GetScreenShotFile(window, width, height, mShareFileName); \n\t\tif (file != null)\n\t\t\tshareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));\n\t\tshareIntent.setType(\"text/image/png\"); \n\t\tshareIntent.putExtra(Intent.EXTRA_SUBJECT, \"\");\n\t\tshareIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.shareResult, shareContent) + \"%\");\n \tstartActivity(Intent.createChooser(shareIntent, getString(R.string.share))); \n\t}", "public void onPressShareWithSMS() {\r\n if (!requireSMSPermissions()) {\r\n return;\r\n }\r\n\r\n shareSMS();\r\n }", "public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n\t\t\t\t\tsharingIntent.setType(\"text/plain\");\n\t\t\t\t\tString URL = \"http://market.android.com/details?id=com.appsmarttech.ultitrack92\";\n\t\t\t\t\tString shareBody = \"I just completed \" + dayID + \" of the P90X, and I tracked it using UltiTrack! get it here \" + URL;\n\t\t\t\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"I am Awesome!!!\");\n\t\t\t\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n\t\t\t\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}", "private void _fbAppShare(Activity act, UiLifecycleHelper uiHelper, String link, String description)\n {\n try {\n FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(act)\n .setLink(link != null && !link.equals(\"\") ? link : \"\")\n .setDescription(description != null && !description.equals(\"\") ? description : \"\")\n .build();\n uiHelper.trackPendingDialogCall(shareDialog.present());\n } catch (FacebookException ex) {\n String urlParameters = String.format(Constants.FB_SHARE_URL,\n act.getString(R.string.app_url), act.getString(R.string.app_name));\n Utilities.getInstance().openURL(act, urlParameters);\n }\n }", "public boolean onOptionsItemSelected(MenuItem item) \n\t{\n\t\tswitch (item.getItemId())\n\t\t{\n\tcase R.id.share:\n \n\t\tIntent sendIntent = new Intent(Intent.ACTION_SEND);\n\t\t//sendIntent.setAction(Intent.ACTION_SEND);\n\t\tsendIntent.putExtra(Intent.EXTRA_TEXT,\"Download the App 'Nyimbo Za Kristo' with midi and categorized hymns. Click on this link https://play.google.com/store/apps/details?id=com.chalo.nzk\");\n\t\tsendIntent.setType(\"text/plain\");\n\t\tstartActivity(sendIntent);\n return true;\n \n \n default:\n \n\t\treturn super.onOptionsItemSelected(item);\n\t}\n\t}", "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tNoteEditView.this.addShare();\n \t\t\t}", "public void dialogShare()\n\t {\n\t \tAlertDialog.Builder builder = new AlertDialog.Builder(this); \n\t \tbuilder\n\t \t.setMessage(\"Congratulations! you just finished the \" + dayName + \" workout!! Do you want to tell your friends?\")\n\t \t.setTitle(\"Share with your Friends?\")\n\t .setCancelable(false)\n\t .setNegativeButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t \t//since they said yes, we are going to show them the share dialog\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n\t\t\t\t\tsharingIntent.setType(\"text/plain\");\n\t\t\t\t\tString URL = \"http://market.android.com/details?id=com.appsmarttech.ultitrack92\";\n\t\t\t\t\tString shareBody = \"I just completed \" + dayID + \" of the P90X, and I tracked it using UltiTrack! get it here \" + URL;\n\t\t\t\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"I am Awesome!!!\");\n\t\t\t\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n\t\t\t\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}\n\t })\n\n\t .setPositiveButton(\"No\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t//since they said no, we take them to the launch activity\n\t \t\n\t\t\t\tstartActivity(intent);\n\t\t\t\t}\n\t });\n\t \t\n\t \tAlertDialog alert = builder.create();\n\t \t\n\t \talert.show();\n\t }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detail, menu);\n MenuItem mi = menu.findItem(R.id.shareid);\n\n sap = (ShareActionProvider) MenuItemCompat.getActionProvider(mi);\n Intent iu = new Intent(Intent.ACTION_SEND);\n TextView tv = (TextView) findViewById(R.id.my_weat);\n data = tv.getText().toString();\n iu.setType(\"text/plain\");\n Log.e(\"hello\", data);\n iu.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);\n iu.putExtra(Intent.EXTRA_TEXT, data + \" #Sunshineapp\");\n if(sap!=null) {\n Log.e(\"uclicked\", \"share button\");\n sap.setShareIntent(iu);\n //startActivity(iu);\n }\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\n\t\t\t\ti.setType(\"text/plain\");\n\t\t\t\ti.putExtra(Intent.EXTRA_SUBJECT, \"Sharing URL\");\n\t\t\t\ti.putExtra(Intent.EXTRA_TEXT, prodUrl);\n\t\t\t\tstartActivity(Intent.createChooser(i, \"Share URL\"));\n\t\t\t}", "public void shareDrawing(ShareActionProvider shareActionProvider) {\n File savedFile = saveDrawing();\n\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n intent.putExtra(Intent.EXTRA_STREAM, savedFile.toURI());\n\n shareActionProvider.setShareIntent(intent);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n\n getMenuInflater().inflate(R.menu.menu_aboutus, menu);\n\n// Inflate the menu; this adds items to the action bar if it is present.\n\n MenuItem shareItem = menu.findItem(R.id.menu_share);\n myShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);\n myShareActionProvider.setShareHistoryFileName(\n ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);\n myShareActionProvider.setShareIntent(Shareintent());\n\n return super.onCreateOptionsMenu(menu);\n\n\n }", "private void setShareIntent(Intent shareIntent) {\n if(shareIntent.resolveActivity(getActivity().getPackageManager())!=null) {\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(shareIntent);\n }\n } else {\n Toast.makeText(getActivity(), R.string.no_application_found,Toast.LENGTH_LONG).show();\n }\n }", "public final Intent mo49194a(Context context) {\n Intent intent = new Intent(\"android.intent.action.SEND\");\n intent.setDataAndType(Uri.parse(C1642a.m8034a(\"snapchat://%s?link=%s\", new Object[]{this.f50510a.getDeeplinkUrlPath(), this.f50511b})), this.f50510a.getIntentType());\n Uri fileProviderUri = SnapUtils.getFileProviderUri(context, this.f50510a.getMediaFile());\n SnapSticker snapSticker = this.f50510a.getSnapSticker();\n if (snapSticker != null) {\n Uri fileProviderUri2 = SnapUtils.getFileProviderUri(context, snapSticker.getStickerFile());\n intent.putExtra(\"sticker\", snapSticker.getJsonForm(fileProviderUri2).toString());\n ArrayList arrayList = new ArrayList();\n if (fileProviderUri != null) {\n arrayList.add(fileProviderUri);\n }\n arrayList.add(fileProviderUri2);\n if (arrayList.size() > 1) {\n intent.putParcelableArrayListExtra(\"android.intent.extra.STREAM\", arrayList);\n intent.setAction(\"android.intent.action.SEND_MULTIPLE\");\n } else if (!arrayList.isEmpty()) {\n intent.putExtra(\"android.intent.extra.STREAM\", (Parcelable) arrayList.get(0));\n }\n } else if (fileProviderUri != null) {\n intent.putExtra(\"android.intent.extra.STREAM\", fileProviderUri);\n }\n String attachmentUrl = this.f50510a.getAttachmentUrl();\n if (!TextUtils.isEmpty(attachmentUrl)) {\n intent.putExtra(\"attachmentUrl\", attachmentUrl);\n }\n String captionText = this.f50510a.getCaptionText();\n if (!TextUtils.isEmpty(captionText)) {\n intent.putExtra(\"captionText\", captionText);\n }\n return intent;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id==R.id.action_share){\n Intent shareintent = Share.share(content);\n startActivity(Intent.createChooser(shareintent, getResources().getString(R.string.app_name)));\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\t\tMainActivity.nowcontext);\n\t\n\t\t\t\t// set title\n\t\t\t alertDialogBuilder.setTitle(\"Share on FaceBook\");\n\t\n\t\t\t\t// set dialog message\n\t\t\t\t\n\t\t\t\talertDialogBuilder\n\t\t\t\t\t.setMessage(\"You will share it on FaceBook!\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\"Yes\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t// if this button is clicked, close\n\t\t\t\t\t\t\t// current activity\n\t\t\t\t\t\t\t fbsharecode();\n\t\t\t\t\t\t}\n\t\t\t\t\t })\n\t\t\t\t\t.setNegativeButton(\"No\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t// if this button is clicked, just close\n\t\t\t\t\t\t\t// the dialog box and do nothing\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\n\t\t\t\t\t// create alert dialog\n\t\t\t\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\n\t\t\t\t\t// show it\n\t\t\t\t\talertDialog.show();\n\t\t\t\t\tmsharePopupWindow.dismiss(); \n\t\t\t\t\tisup=false;\n\t\t\t\n\t\t\t\t}", "private void shareSound() {\n\t\tIntent intent = new Intent(\"com.soundcloud.android.SHARE\")\n\t\t\t\t.putExtra(Intent.EXTRA_STREAM, MEDIA_PATH + audioName)\n\t\t\t\t// here you can set metadata for the track to be uploaded\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.title\",\n\t\t\t\t\t\t\"SoundCloud Android Intent Demo upload\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.where\", \"Somewhere\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.description\",\n\t\t\t\t\t\t\"This is a demo track.\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.public\", true)\n\t\t\t\t.putExtra(\n\t\t\t\t\t\t\"com.soundcloud.android.extra.tags\",\n\t\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\t\t\"demo\",\n\t\t\t\t\t\t\t\t\"post lolcat bluez\",\n\t\t\t\t\t\t\t\t\"soundcloud:created-with-client-id=\"\n\t\t\t\t\t\t\t\t\t\t+ CLIENT_ID })\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.genre\",\n\t\t\t\t\t\t\"Easy Listening\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.location\",\n\t\t\t\t\t\tgetLocation());\n\n\t\ttry {\n\t\t\tstartActivityForResult(intent, SHARE_SOUND);\n\t\t} catch (ActivityNotFoundException notFound) {\n\t\t\t// use doesn't have SoundCloud app installed, show a dialog box\n\t\t\tshowDialog(DIALOG_NOT_INSTALLED);\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\t\tMainActivity.nowcontext);\n\t\n\t\t\t\t// set title\n\t\t\t alertDialogBuilder.setTitle(\"Share on FaceBook\");\n\t\n\t\t\t\t// set dialog message\n\t\t\t\t\n\t\t\t\talertDialogBuilder\n\t\t\t\t\t.setMessage(\"You will share it on FaceBook!\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\"Yes\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t// if this button is clicked, close\n\t\t\t\t\t\t\t// current activity\n\t\t\t\t\t\t\t fbsharecode();\n\t\t\t\t\t\t}\n\t\t\t\t\t })\n\t\t\t\t\t.setNegativeButton(\"No\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t// if this button is clicked, just close\n\t\t\t\t\t\t\t// the dialog box and do nothing\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\n\t\t\t\t\t// create alert dialog\n\t\t\t\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\n\t\t\t\t\t// show it\n\t\t\t\t\talertDialog.show();\n\t\t\t\t\tmsharePopupsmallWindow.dismiss(); \n\t\t\t\t\tisup=false;\n\t\t\t\n\t\t\t\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif(share!=null){\n\t\t\t\tif(v.getId()==R.id.QQShare){\n\t\t\t\t\tshare.QQShare();\n\t\t\t\t}else if(v.getId()==R.id.SinaShare){\n\t\t\t\t\tshare.SinaShare();\n\t\t\t\t}else if(v.getId()==R.id.WxShare){\n\t\t\t\t\tshare.WxShare();\n\t\t\t\t}else if(v.getId()==R.id.QQKJShare){\n\t\t\t\t\tshare.QQKJShare();\n\t\t\t\t}else if(v.getId()==R.id.SmsShare){\n\t\t\t\t\tshare.SMSShare();\n\t\t\t\t}\n\t\t\t}\n\t\t\tpw.dismiss();\n\t\t\t\n\t\t}", "public void shareSocial(Activity act,UiLifecycleHelper uiHelper, SocialType socialToShare,\n String title, String text, String shareUrl, String[] recipients, boolean fromGmail)\n {\n switch (socialToShare) {\n case FACEBOOK:\n this._fbAppShare(act, uiHelper, shareUrl, text);\n break;\n case TWITTER:\n this._tweetShare(act, title, text);\n break;\n case EMAIL:\n this._emailShare(act, title, text, recipients, fromGmail);\n break;\n }\n }", "public void gppShare_openBasicShareDialog () {\n\t\tGPPShare.sharedInstance().shareDialog().open();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_share, container, false);\n\n try {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, \"RannaGhar\");\n String shareMessage= \"\\nLet me recommend you this application\\n\\n\";\n shareMessage = shareMessage + \"https://play.google.com/store/apps/details?id=\" + BuildConfig.APPLICATION_ID +\"\\n\\n\";\n shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);\n startActivity(Intent.createChooser(shareIntent, \"choose one\"));\n } catch(Exception e) {\n //e.toString();\n }\n\n return view;\n }", "public abstract void share(String content, Uri imageOrVideo);", "private void sharePlan(){\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, \"My Planit Plan\");\n shareIntent.putExtra(Intent.EXTRA_TEXT,\n \"Hi All! This is my plan made using Planit! www.planit.com/10293987\");\n startActivity(Intent.createChooser(shareIntent, \"Share with\"));\n }", "private void sharePic(Uri uri)\n \t {\n\t\t Intent whatsappIntent = new Intent(Intent.ACTION_SEND);\n\t whatsappIntent.setType(\"image/*\");\n\t\n\t whatsappIntent.putExtra(Intent.EXTRA_TEXT, \"Your text here\");\n\t whatsappIntent.putExtra(Intent.EXTRA_STREAM, uri); \n\t whatsappIntent.setPackage(\"com.whatsapp\"); \n\t \n\t \n\t PackageManager pm = getApplicationContext().getPackageManager();\n \t final List<ResolveInfo> matches = pm.queryIntentActivities(whatsappIntent, 0);\n \t boolean temWhatsApp = false;\n \t for (final ResolveInfo info : matches)\n \t {\n \t \t if (info.activityInfo.packageName.startsWith(\"com.whatsapp\")) \n \t \t {\n\t \t final ComponentName name = new ComponentName(info.activityInfo.applicationInfo.packageName, info.activityInfo.name);\n\t \t temWhatsApp = true;\n\t \t break;\n \t \t }\n \t } \n \t if(temWhatsApp) \n \t {\n \t //abre whatsapp\n \t \t startActivity(Intent.createChooser(whatsappIntent, \"Your Awesome Text and Pic...\"));\n \t } else {\n \t //alerta - vocÍ deve ter o whatsapp instalado\n \t Toast.makeText(this, \"Error\", Toast.LENGTH_SHORT).show();\n \t }\n\t }", "public void postToFB(View view) {\n\n// Toast.makeText(getBaseContext(), \"Posted Story on Timeline\", Toast.LENGTH_SHORT).show();\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = null;\n try {\n linkContent = new ShareLinkContent.Builder()\n .setContentTitle(basic.getString(\"title\"))\n .setContentUrl(Uri.parse(basic.getString(\"viewItemURL\")))\n .setContentDescription(\n ((TextView) findViewById(R.id.price)).getText().toString() + \"\\n\" +\n ((TextView) findViewById(R.id.shippingInfo)).getText().toString()\n )\n .setImageUrl(Uri.parse(basic.getString(\"galleryURL\")))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n// if(linkContent != null)\n shareDialog.show(linkContent);\n\n// ShareLinkContent content = new ShareLinkContent.Builder()\n// .setContentUrl(Uri.parse(\"https://developers.facebook.com\"))\n// .build();\n//\n// shareDialog.show(content);\n\n\n }\n }", "@Override\r\n\tpublic void ShowShare(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"ShowShare\");\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_SEND);\n\n\t\t\t\tFile f = new File(imagePath);\n\t\t\t\tif (f != null && f.exists() && f.isFile()) {\n\t\t\t\t\tintent.setType(\"image/jpg\");\n\t\t\t\t\tUri u = Uri.fromFile(f);\n\t\t\t\t\tintent.putExtra(Intent.EXTRA_STREAM, u);\n\t\t\t\t}\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\tstartActivity(Intent.createChooser(intent, \"分享图片\"));\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) \n\t\t\t\t\t{\n\t\t\t\t\t\tString url = \"https://www.facebook.com/dialog/feed?app_id=1507764116109075&\" +\n\t\t\t\t\t\t\t\t \t \"link=https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal&\" +\n\t\t\t\t\t\t\t\t \t \"caption=GuessIn&\" +\n\t\t\t\t\t\t\t\t \t \"description=\"+Uri.parse(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")+\n\t\t\t\t\t\t\t\t \t \"&redirect_uri=https://www.facebook.com/connect/login_success.html\"+\n\t\t\t\t\t\t\t\t \t \"&picture=http://nfnlabs.in/wp-content/uploads/2014/06/Share%20Image.png\";\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tintent.setData(Uri.parse(url));\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.share) {\n Intent sendInt = new Intent(Intent.ACTION_SEND);\n sendInt.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n sendInt.putExtra(Intent.EXTRA_TEXT, \"Kuy, Download Kesegaran Telyu Di Android Kamu! dijamin gakbakalan nyesel deh!\\n\\n\\\"\"+getString(R.string.app_name)+\"\\\" \\nhttps://play.google.com/store/apps/details?id=id.luckytruedev.shitposting\");\n sendInt.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendInt, \"Bagikan Ke Teman\"));\n return true;\n }\n if (id == R.id.rating) {\n Intent ps = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://play.google.com/store/apps/details?id=id.luckytruedev.shitposting\"));\n startActivity(ps);\n return true;\n }\n if (id == R.id.moreapps) {\n Intent luckytrue = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://play.google.com/store/apps/developer?id=LuckyTrue+Development\"));\n startActivity(luckytrue);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\r\n\t\tcase R.id.img_btn_share:\r\n\t\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); \r\n\t\t sharingIntent.setType(\"text/plain\");\r\n\t\t String shareBody =getIntent().getStringExtra(\"web\");\r\n\t\t sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");\r\n\t\t sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\r\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\r\n\t\t\tbreak;\r\n\t\tcase R.id.img_btn_web:\r\n\t\t\tString web=getIntent().getStringExtra(\"web\");\r\n\t\t\tif(web.equals(\"\")==false){\r\n\t\t\tIntent webintent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(getIntent().getStringExtra(\"web\")));\r\n\t\t\tstartActivity(webintent);\r\n\t\t\t}else{\r\n\t\t\t\tif(current.getLanguage().equals((\"el\")))\r\n\t\t\t\tToast.makeText(this, \" Η ιστοσελίδα δεν είναι διαθέσιμη\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\telse\r\n\t\t\t\t\tToast.makeText(this, \"Webpage is not available\", Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t\tbreak;\t\r\n\t\tcase R.id.img_btn_email:\r\n\t\t\tif(getIntent().getStringExtra(\"email\").equals(\"\")==false){\r\n\t\t\t\r\n\t\t\tIntent intent = new Intent(Intent.ACTION_SENDTO); // it's not ACTION_SEND\r\n\t\t\tintent.setType(\"text/plain\");\t\t\r\n\t\t\t\r\n\t\t\tintent.setData(Uri.parse(\"mailto:\"+getIntent().getStringExtra(\"email\"))); // or just \"mailto:\" for blank\r\n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this will make such that when user returns to your app, your app is displayed, instead of the email app.\r\n\t\t\tstartActivity(intent);}\r\n\t\t\r\n\t\telse{\r\n\t\t\tif(current.getLanguage().equals((\"el\")))\r\n\t\t\tToast.makeText(this, \" Το email δεν είναι διαθέσιμο\", Toast.LENGTH_SHORT).show();\r\n\t\t\telse\r\n\t\t\t\tToast.makeText(this, \"email is not available\", Toast.LENGTH_SHORT).show();\r\n\t\t}\r\n\t\t\tbreak;\r\n\t\tcase R.id.img_btn_map:\r\n\t\t\tIntent mymap=new Intent(SingleRecord.this,Map.class);\r\n\t\t\tmymap.putExtra(\"lat\", getIntent().getStringExtra(\"mylat\"));\r\n\t\t\tmymap.putExtra(\"lng\", getIntent().getStringExtra(\"mylng\"));\r\n\t\t\tmymap.putExtra(\"name\", getIntent().getStringExtra(\"name\"));\r\n\t\t\tstartActivity(mymap);\r\n\t\tbreak;\r\n\t\tcase R.id.img_btn_direction:\r\n\t\t\t\r\n\t\t\tIntent i = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(\"http://maps.google.com/maps?saddr=\"+current_lat+\",\"+current_lng+\"&daddr=\"+mylat+\",\"+mylng));\r\n\t\t\tstartActivity(i);\r\n\t\t\tbreak;\r\n\t\tcase R.id.tv_tel1:\r\n\t\t\tSystem.out.println(tel1);\r\n\t\t\tIntent callIntent1 = new Intent(Intent.ACTION_CALL);\r\n\t\t\tcallIntent1.setData(Uri.parse(\"tel:\"+getNumber(tel1)));\r\n\t\t\tstartActivity(callIntent1);\r\n\t\t\tbreak;\r\n\t\tcase R.id.tv_tel2:\r\n\t\t\tIntent callIntent2 = new Intent(Intent.ACTION_CALL);\r\n\t\t\tcallIntent2.setData(Uri.parse(\"tel:\"+getNumber(tel2)));\r\n\t\t\tstartActivity(callIntent2);\r\n\t\t\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase R.id.tv_tel3:\r\n\t\t\tIntent callIntent3 = new Intent(Intent.ACTION_CALL);\r\n\t\t\tcallIntent3.setData(Uri.parse(\"tel:\"+getNumber(tel3)));\r\n\t\t\tstartActivity(callIntent3);\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase R.id.btn_menu:\r\n\t\t\tSystem.out.println(url_attach);\r\n\t\t\tdownloadfile task=new downloadfile();\r\n\t\t\t\r\n\t\t\ttask.execute(url_attach);\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n public void onClick(View v) {\r\n\r\n PackageManager pm = getPackageManager();\r\n try {\r\n\r\n Intent waIntent = new Intent(Intent.ACTION_SEND);\r\n waIntent.setType(\"image/jpeg\");\r\n String text = \"YOUR TEXT HERE\";\r\n\r\n PackageInfo info = pm.getPackageInfo(\"com.whatsapp\", PackageManager.GET_META_DATA);\r\n //Check if package exists or not. If not then code\r\n //in catch block will be called\r\n waIntent.setPackage(\"com.whatsapp\");\r\n\r\n //waIntent.putExtra(Intent.EXTRA_TEXT, text);\r\n waIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(\"file:///sdcard/path-to-your-image.jpg\"));\r\n context.startActivity(Intent.createChooser(waIntent, \"Share with\"));\r\n\r\n } catch (PackageManager.NameNotFoundException e) {\r\n Toast.makeText(context, \"WhatsApp not Installed\", Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n }", "public Intent mo34965a(Context context) {\n Intent intent = new Intent(\"android.intent.action.SEND\");\n intent.setDataAndType(Uri.parse(String.format(\"snapchat://%s?link=%s\", new Object[]{this.f30606a.getDeeplinkUrlPath(), this.f30607b})), this.f30606a.getIntentType());\n Uri fileProviderUri = SnapUtils.getFileProviderUri(context, this.f30606a.getMediaFile());\n SnapSticker snapSticker = this.f30606a.getSnapSticker();\n String str = \"android.intent.extra.STREAM\";\n if (snapSticker != null) {\n Uri fileProviderUri2 = SnapUtils.getFileProviderUri(context, snapSticker.getStickerFile());\n intent.putExtra(\"sticker\", snapSticker.getJsonForm(fileProviderUri2).toString());\n ArrayList arrayList = new ArrayList();\n if (fileProviderUri != null) {\n arrayList.add(fileProviderUri);\n }\n arrayList.add(fileProviderUri2);\n if (arrayList.size() > 1) {\n intent.putParcelableArrayListExtra(str, arrayList);\n intent.setAction(\"android.intent.action.SEND_MULTIPLE\");\n } else if (!arrayList.isEmpty()) {\n intent.putExtra(str, (Parcelable) arrayList.get(0));\n }\n } else if (fileProviderUri != null) {\n intent.putExtra(str, fileProviderUri);\n }\n String attachmentUrl = this.f30606a.getAttachmentUrl();\n if (!TextUtils.isEmpty(attachmentUrl)) {\n intent.putExtra(\"attachmentUrl\", attachmentUrl);\n }\n String captionText = this.f30606a.getCaptionText();\n if (!TextUtils.isEmpty(captionText)) {\n intent.putExtra(\"captionText\", captionText);\n }\n return intent;\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent marketIntent = new Intent(Intent.ACTION_VIEW);\n marketIntent.setData(Uri.parse(\"market://details?id=com.adobe.reader\"));\n// marketIntent.setData(Uri.parse(\"market://details?id=com.infraware.office.link\"));\n startActivity(marketIntent);\n\n }", "@Override\n public void onClick(View v) {\n Intent shareIntent = new PlusShare.Builder(getBaseContext())\n .setType(\"text/plain\")\n .setText(\"Welcome to the Google+ platform.\")\n .setContentUrl(Uri.parse(\"https://developers.google.com/+/\"))\n .getIntent();\n\n startActivityForResult(shareIntent, 0);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n MenuItem item = menu.findItem(R.id.menu_item_share);\r\n ShareActionProvider myShareActionProvider = (ShareActionProvider)MenuItemCompat.getActionProvider(item);\r\n myShareActionProvider.setShareHistoryFileName(\"test\");\r\n \r\n Intent myIntent = new Intent();\r\n myIntent.setAction(Intent.ACTION_SEND);\r\n myIntent.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.sms_body));\r\n myIntent.setType(\"text/plain\");\r\n\r\n myShareActionProvider.setShareIntent(myIntent);\r\n\r\n\t\treturn true;\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_shareddocument);\n\t\tsharedListView = (ListView) findViewById(R.id.shared_list_view);\n\t\tnoSharedView = (LinearLayout) findViewById(R.id.no_shared_view);\n\t\tsharedListView.setEmptyView(noSharedView);\n\t\tParseUser currentUser = ParseUser.getCurrentUser();\n\t\tauthor = currentUser.getString(\"username\");\n\t\tdbh = new DBhelper(this);\n\t\tSQLiteDatabase db = dbh.getReadableDatabase();\n\t\tCursor c1 = db.rawQuery(\"SELECT _id, title, subtitle, content, author, otheruser FROM todos WHERE otheruser = '\" + author + \"'\", null);\n\t\tadapter = new SimpleCursorAdapter(this, R.layout.activity_items, c1, from, to, 0);\n\t\tadapter.notifyDataSetChanged();\n\t\t\n\t\tsharedListView.setAdapter(adapter);\n\t\t\n\t\tsharedListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tTextView title3 = (TextView) arg1.findViewById(R.id.title4);\n\t\t\t\tTextView subtitle3 = (TextView) arg1.findViewById(R.id.subtitle4);\n\t\t\t\tTextView content3 = (TextView) arg1.findViewById(R.id.content4);\n\t\t\t\tTextView id = (TextView) arg1.findViewById(R.id.id1);\n\t\t\t\tTextView author = (TextView) arg1.findViewById(R.id.otheruser1);\n\t\t\t\tString title = title3.getText().toString();\n\t\t\t\tString subtitle = subtitle3.getText().toString();\n\t\t\t\tString content = content3.getText().toString();\n\t\t\t\tString author1 = author.getText().toString();\n\t\t\t\tString id1 = id.getText().toString();\n\t\t\t\tIntent i = new Intent(getApplicationContext(), NewDocument.class);\n\t\t\t\ti.putExtra(\"title\", title);\n\t\t\t\ti.putExtra(\"subtitle\", subtitle);\n\t\t\t\ti.putExtra(\"content\", content);\n\t\t\t\ti.putExtra(\"id\", id1);\n\t\t\t\ti.putExtra(\"author\", author1);\n\t\t\t\tstartActivityForResult(i,EDIT_ACTIVITY_CODE);\n\t\t\t}\n\t\t});\n\t\t\n\t}", "@Override\r\n\tpublic void ShowShare(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e(\"ShowShare\");\r\n\t}", "protected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.bookdisplay);\n\t\tpreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tprice = (EditText)findViewById(R.id.price);\n\t\tBundle extras = getIntent().getExtras();\n\t\tbookTitle = extras.getString(\"bookTitle\");\n\t\tbookAuthor = extras.getString(\"bookAuthor\");\n\t\tbookPublisher = extras.getString(\"bookPublisher\");\n\t\tbookISBN = extras.getString(\"bookISBN\");\n\t\tbookDescription = extras.getString(\"bookDescription\");\n\t\tLog.d(\"title\", bookTitle);\n\t\tLog.d(\"bokAuthor\", bookAuthor);\n\t\tLog.d(\"title\", bookPublisher);\n\t\tLog.d(\"title\", bookISBN);\n\t\ttitle = (TextView)findViewById(R.id.title);\n\t\tauthor = (TextView)findViewById(R.id.author);\n\t\tdescription = (TextView)findViewById(R.id.description);\n\t\tratings = (TextView)findViewById(R.id.rating);\n\t\tbookcover = (ImageView)findViewById(R.id.bookcover);\n\t\tpublisher = (TextView)findViewById(R.id.publisher);\n\t\tpages = (TextView)findViewById(R.id.pages);\n\t\tcategory = (TextView)findViewById(R.id.categories);\n\t\tisbncode = (TextView)findViewById(R.id.isbncode);\n\t\tonShare = (Button)findViewById(R.id.onShare);\n\t\t\n\t\tonShare.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tgoToCheck();\n\t\t\t}\n\t\t});\n\t\t\n\t\ttitle.setText(bookTitle);\n\t\tauthor.setText(bookAuthor);\n\t\tpublisher.setText(bookPublisher);\n\t\tisbncode.setText(bookISBN);\n\t\tdescription.setText(bookDescription);\n\t\tratings.setText(bookRatings);\n\t\tcategory.setText(bookCategory);\n\t\tpages.setText(bookPages);\n\t\tbookcover.setImageResource(R.drawable.thumbnail);\n\t\t\n\t\tprogressDialog = new ProgressDialog(this);\n\t progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\t progressDialog.setCancelable(false);\n\t\t\n\t mDbHelper = new SharedBooksDbAdapter(this);\n\t\tmDbHelper.open();\n\t\t\n\t}", "public static void attachShareIntent(Context context, ImageButton button, String url) {\n String subject = context.getResources().getString(R.string.intent_subject);\n String title = context.getResources().getString(R.string.intent_title);\n button.setOnClickListener(view -> {\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n sharingIntent.putExtra(Intent.EXTRA_TEXT, url);\n context.startActivity(Intent.createChooser(sharingIntent, title));\n });\n }", "@JavascriptInterface\n public void shareUrl(String title, String url) {\n Intent share = new Intent(android.content.Intent.ACTION_SEND);\n share.setType(\"text/plain\");\n\n // Add data to the intent, the receiving app will decide\n // what to do with it.\n share.putExtra(Intent.EXTRA_SUBJECT, title);\n share.putExtra(Intent.EXTRA_TEXT, url);\n\n mContext.startActivity(Intent.createChooser(share, \"Share blog post!\"));\n }", "public void changeShareIntent(ShareActionProvider mShareActionProvider, Intent shareIntent) {\n mShareActionProvider.setShareIntent(shareIntent);\n }", "public void onClick(View v) {\n\t\t\t\taddShareAction();\n\t\t\t\t//>2014/01/24-33383-RubyJiang\n\t\t\t\t\n\t\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.details, menu);\n\n // Set up ShareActionProvider's default share intent\n mShareActionProvider = (ShareActionProvider) menu.findItem(R.id.action_share).getActionProvider();\n mShareActionProvider.setShareIntent(getDefaultIntent());\n\n return true;\n }", "public static Intent createShareIntent(String title) {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(Intent.EXTRA_TEXT, title);\n return shareIntent;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n\n Intent intent = new Intent(getApplicationContext(), AddTripActivity.class);\n\n intent.putExtra(\"TripID\", tripItem.getID());\n\n startActivityForResult(intent, EDIT_TRIP_CODE);\n\n return true;\n } else if (id == R.id.action_view_map) {\n Intent intent = new Intent(getApplicationContext(), MapActivity.class);\n\n intent.putExtra(\"TRIP\", tripID);\n\n startActivity(intent);\n\n return true;\n } else if(id == R.id.menu_item_share) {\n\n String text = \"Have a look at Joshes Place, \" + tripItem.getTitle();\n\n Intent sharingIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);\n sharingIntent.setType(\"*/*\");\n\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, \"Joshes Trip, \" + tripItem.getTitle());\n\n ArrayList<Uri> imageUris = new ArrayList<Uri>();\n\n\n if((tripItem.getPic() != null) && (tripItem.getPic().getID() > 0)) {\n String pathofBmp = MediaStore.Images.Media.insertImage(getContentResolver(), tripItem.getPic().getImage(), tripItem.getPic().getTitle(), null);\n Uri bmpUri = Uri.parse(pathofBmp);\n\n imageUris.add(bmpUri);\n }\n\n\n\n List<Note> notes = tripItem.getNotes();\n\n\n\n if(notes.size() > 0) {\n\n text += \"\\nNotes:\\n\";\n\n for (Note n : notes) {\n text += n.getTitle() + \", \\n\" + n.getNote() + \"\\n\";\n\n\n }\n\n }\n\n List<String> companions = tripItem.getCompanions();\n\n if(companions.size() > 0) {\n\n text += \"\\nCompanions:\\n\";\n\n for (String s : companions) {\n text += s + \"\\n\";\n\n\n }\n\n }\n\n List<PlaceItem> places = tripItem.getPlaces();\n\n if(places.size() > 0) {\n\n text += \"\\nPlaces Visited: \\n\";\n\n for(PlaceItem p : places) {\n text += p.getTitle() + \" (\" + p.getDate() + \")\\n\";\n }\n }\n\n text +=\"\\nHere on: \" + tripItem.getStartDate() + \" to \" + tripItem.getEndDate();\n\n\n\n ArrayList<ImageItem> images = tripItem.getImages();\n\n\n if(images.size() > 0) {\n\n sharingIntent.putExtra(Intent.EXTRA_TEXT, \"\\nImages:\\n\");\n\n\n\n for (ImageItem i : images) {\n String pathofBmp = MediaStore.Images.Media.insertImage(getContentResolver(), i.getImage(), i.getTitle(), null);\n Uri bmpUri = Uri.parse(pathofBmp);\n\n imageUris.add(bmpUri);\n\n\n\n }\n\n sharingIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUris);\n\n }\n\n sharingIntent.putExtra(Intent.EXTRA_TEXT, text);\n\n\n\n\n\n\n startActivity(Intent.createChooser(sharingIntent, \"Share trip using\"));\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "private void createInstagramIntent(String type, String mediaPath) {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // Set the MIME type\n share.setType(type);\n share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n share.setPackage(\"com.instagram.android\");\n\n // Create the URI from the media\n File media = new File(mediaPath);\n Uri uri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + \".Utils.GenericFileProvider\", media);\n\n // Add the URI to the Intent.\n share.putExtra(Intent.EXTRA_STREAM, uri);\n share.putExtra(Intent.EXTRA_TEXT, \"YOUR TEXT HERE\");\n\n // Broadcast the Intent.\n startActivity(Intent.createChooser(share, \"Share to\"));\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.action_settings) {\n\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = \"https://play.google.com/store/apps/details?id=lohitprojects.bitcointrack&hl=en\";\n String shareContent1=\"\\n✦ Bitcoin Track\\n\";\n String shareContent2=\"✦ Everything you need to know about Bitcoin \\n✦ Live bitcoin rate Tracking in any Currency | Wallets | Mining | Historical Records\";\n String shareContent3 = \"\\n✦ \";\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareContent1+shareContent2+shareContent3+shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View v) {\n\n dialog = new Dialog(context);\n dialog.setContentView(R.layout.custom_dialog_layout);\n dialog.show();\n\n TextView mytxt=dialog.findViewById(R.id.custom_dialog_txtview);\n mytxt.setText(holder.txtTitle.getText().toString());\n copy=dialog.findViewById(R.id.copy);\n share=dialog.findViewById(R.id.share);\n whatsapp=dialog.findViewById(R.id.whatsAppshare);\n\n adView1=dialog.findViewById(R.id.bannerAd_dialog1);\n adView2=dialog.findViewById(R.id.bannerAd_dialog2);\n\n //request ad to admob server\n AdRequest adRequest1 = new AdRequest.Builder().build();\n\n //add ad to Adview object\n adView1.loadAd(adRequest1);\n\n\n //request ad to admob server\n AdRequest adRequest2 = new AdRequest.Builder().build();\n\n //add ad to Adview object\n adView2.loadAd(adRequest2);\n\n\n // for direct whatsapp share\n whatsapp.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n// Intent intent=context.getPackageManager().getLaunchIntentForPackage(\"com.whatsapp\");\n// context.startActivity(intent);\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n intent.setPackage(\"com.whatsapp\");\n intent.putExtra(Intent.EXTRA_TEXT, \"\"+holder.txtTitle.getText());\n try{\n context.startActivity(intent);\n } catch (ActivityNotFoundException ex) {\n AlertDialog.Builder ab=new AlertDialog.Builder(context);\n ab.setTitle(\"Sorry!!\");\n ab.setMessage(\"WhatsApp is not installed in your device\");\n ab.setNegativeButton(\"Close\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n ab.show();\n\n }\n }\n });\n //simple share code\n share.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ClipboardManager myClipboard;\n myClipboard= (ClipboardManager) context.getSystemService(CLIPBOARD_SERVICE);\n\n ClipData myclip;\n\n String text=holder.txtTitle.getText().toString();\n myclip=ClipData.newPlainText(\"text\",text);\n myClipboard.setPrimaryClip(myclip);\n\n Intent sharingIntent=new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody=text;\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT,\"Subject here\");\n sharingIntent.putExtra(Intent.EXTRA_TEXT,shareBody);\n context.startActivity(Intent.createChooser(sharingIntent,\"Share via\"));\n\n }\n });\n copy.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ClipboardManager myClipboard;\n myClipboard= (ClipboardManager) context.getSystemService(CLIPBOARD_SERVICE);\n\n ClipData myclip;\n\n String text=holder.txtTitle.getText().toString();\n myclip=ClipData.newPlainText(\"text\",text);\n myClipboard.setPrimaryClip(myclip);\n Toast.makeText(context, \"कॉपी हो गया \", Toast.LENGTH_SHORT).show();\n\n }\n });\n }", "public static Intent getAndroidShareIntent(CharSequence chooseTitle, CharSequence subject, CharSequence content) {\n Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);\n shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, content);\n return Intent.createChooser(shareIntent, chooseTitle);\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent intent= new PlusShare.Builder(Glory.this)\n\t\t\t\t\t\t\t.setText(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")\n\t\t\t\t\t\t\t.setType(\"text/plain\")\n\t\t\t\t\t\t\t.setContentUrl(Uri.parse(\"https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal\"))\n\t\t\t\t\t\t\t.getIntent();\n\t\t\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\t\t\t\n\t\t\t\t\t}", "private void share() {\n try {\n File imagesFolder = new File(getCacheDir(), \"images\");\n if (!imagesFolder.exists()) {\n if (!imagesFolder.mkdirs()) {\n Log.e(\"Pixelart\", \"Could not create directory\");\n }\n }\n File cacheFile = new File(imagesFolder, \"shared_image.png\");\n FileOutputStream fos = new FileOutputStream(cacheFile);\n sprite.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n Uri uri = FileProvider.getUriForFile(this,\n \"com.funguscow.fileprovider\",\n cacheFile);\n Intent shareIntent = new Intent();\n shareIntent.setAction(Intent.ACTION_SEND);\n shareIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n shareIntent.putExtra(Intent.EXTRA_STREAM, uri);\n shareIntent.setDataAndType(uri, \"image/png\");\n startActivity(Intent.createChooser(shareIntent, \"Share\"));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void run() {\n String str;\n String str2 = str;\n boolean z = jSONArray.length() > 1;\n final Intent intent = new Intent(z ? \"android.intent.action.SEND_MULTIPLE\" : \"android.intent.action.SEND\");\n final PendingIntent broadcast = PendingIntent.getBroadcast(SocialSharing.this.cordova.getActivity().getApplicationContext(), 0, new Intent(SocialSharing.this.cordova.getActivity().getApplicationContext(), ShareChooserPendingIntent.class), 134217728);\n intent.addFlags(524288);\n String str3 = null;\n try {\n if (jSONArray.length() <= 0 || \"\".equals(jSONArray.getString(0))) {\n intent.setType(\"text/plain\");\n if (SocialSharing.notEmpty(str2)) {\n intent.putExtra(\"android.intent.extra.SUBJECT\", str2);\n }\n if (SocialSharing.notEmpty(str3)) {\n str2 = SocialSharing.notEmpty(str2) ? str2 + \" \" + str3 : str3;\n }\n if (SocialSharing.notEmpty(str2)) {\n intent.putExtra(\"android.intent.extra.TEXT\", str2);\n if (Build.VERSION.SDK_INT < 21) {\n intent.putExtra(\"sms_body\", str2);\n }\n }\n intent.addFlags(268435456);\n str = str4;\n if (str == null) {\n if (str.contains(\"/\")) {\n String[] split = str4.split(\"/\");\n String str4 = split[0];\n str3 = split[1];\n str = str4;\n }\n ActivityInfo activity = SocialSharing.this.getActivity(this.callbackContext, intent, str, str6);\n if (activity == null) {\n return;\n }\n if (z) {\n this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));\n return;\n }\n intent.addCategory(\"android.intent.category.LAUNCHER\");\n String str5 = activity.applicationInfo.packageName;\n if (str3 == null) {\n str3 = activity.name;\n }\n intent.setComponent(new ComponentName(str5, str3));\n SocialSharing.this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass1 */\n\n public void run() {\n cordovaInterface.startActivityForResult(this, intent, 0);\n }\n });\n if (SocialSharing.this.pasteMessage != null) {\n new Timer().schedule(new TimerTask() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass2 */\n\n public void run() {\n SocialSharing.this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass2.AnonymousClass1 */\n\n public void run() {\n SocialSharing.this.copyHintToClipboard(str, SocialSharing.this.pasteMessage);\n SocialSharing.this.showPasteMessage(SocialSharing.this.pasteMessage);\n }\n });\n }\n }, 2000);\n }\n } else if (z) {\n this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));\n } else {\n SocialSharing.this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass3 */\n\n public void run() {\n Intent intent;\n if (Build.VERSION.SDK_INT >= 22) {\n intent = Intent.createChooser(intent, str5, broadcast.getIntentSender());\n } else {\n intent = Intent.createChooser(intent, str5);\n }\n cordovaInterface.startActivityForResult(this, intent, z2 ? 1 : 2);\n }\n });\n }\n } else {\n String downloadDir = SocialSharing.this.getDownloadDir();\n if (downloadDir != null) {\n ArrayList arrayList = new ArrayList();\n Uri uri = null;\n for (int i = 0; i < jSONArray.length(); i++) {\n uri = FileProvider.getUriForFile(SocialSharing.this.webView.getContext(), SocialSharing.this.cordova.getActivity().getPackageName() + \".sharing.provider\", new File(SocialSharing.this.getFileUriAndSetType(intent, downloadDir, jSONArray.getString(i), str2, i).getPath()));\n arrayList.add(uri);\n }\n if (!arrayList.isEmpty()) {\n if (z) {\n intent.putExtra(\"android.intent.extra.STREAM\", arrayList);\n } else {\n intent.putExtra(\"android.intent.extra.STREAM\", uri);\n }\n }\n } else {\n intent.setType(\"text/plain\");\n }\n if (SocialSharing.notEmpty(str2)) {\n }\n if (SocialSharing.notEmpty(str3)) {\n }\n if (SocialSharing.notEmpty(str2)) {\n }\n intent.addFlags(268435456);\n str = str4;\n if (str == null) {\n }\n }\n } catch (Exception e) {\n this.callbackContext.error(e.getMessage());\n }\n }", "private void setShareIntent(Intent shareIntent) {\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(shareIntent);\n }\n }" ]
[ "0.7521105", "0.72408193", "0.72402835", "0.72047055", "0.71892256", "0.71800864", "0.7160171", "0.69612974", "0.6890087", "0.6877773", "0.68228686", "0.6791619", "0.67722034", "0.676686", "0.67595935", "0.67570484", "0.6752525", "0.6715051", "0.6695619", "0.6661597", "0.6658327", "0.66483486", "0.6644129", "0.66320044", "0.66282237", "0.66219985", "0.66001034", "0.6583958", "0.6582922", "0.6578437", "0.6564828", "0.655708", "0.655639", "0.6555422", "0.6549242", "0.6548544", "0.654583", "0.6493234", "0.6487121", "0.64781386", "0.6439433", "0.64070076", "0.63928443", "0.6361833", "0.63536626", "0.63397396", "0.63349193", "0.63293934", "0.63264745", "0.62789947", "0.6261848", "0.6253091", "0.6251029", "0.62285185", "0.61885154", "0.6183004", "0.6175286", "0.6173837", "0.61598754", "0.6157407", "0.61457413", "0.61411005", "0.61381817", "0.61156505", "0.6106596", "0.6080135", "0.6078357", "0.6071603", "0.6068657", "0.606704", "0.6064482", "0.6045396", "0.60303915", "0.60297817", "0.60205525", "0.6019388", "0.60141057", "0.6008018", "0.6003269", "0.5991093", "0.5983955", "0.5973336", "0.5971155", "0.597061", "0.59595805", "0.59551615", "0.5929174", "0.5923588", "0.58936834", "0.58927757", "0.58923227", "0.58862054", "0.58744055", "0.5871043", "0.58615845", "0.58581024", "0.585726", "0.58557916", "0.5846702", "0.5777218" ]
0.77904594
0
Uses the BrowserIntent to link take user to web page that displays more information about the book.
public void viewInfo(View view){ if(currentBook.ISBN13 != null){//If the data for ISBN has been retrieved //Open browser with information String bookLink = GOOGLE_BASE_LINK + currentBook.ISBN13; Intent browserIntent = new Intent(Intent.ACTION_VIEW); browserIntent.setData(Uri.parse(bookLink)); startActivity(browserIntent); }else{ Toast.makeText(this, "Book is still loading...", Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createBrowserIntent(View view){\n Uri uri = Uri.parse(\"https://www.linkedin.com/in/chidi-uwaleke-3769b9a8/\");\n\n //Step 2: Create a browserIntent with action 'Intent.ACTION_VIEW'\n Intent browserIntent = new Intent(Intent.ACTION_VIEW);\n\n //Step 3: Set the data of the intent\n browserIntent.setData(uri);\n\n //Step 4: Start the intent\n startActivity(browserIntent);\n }", "public void onMoreInfoClickedListener(View view) {\n Intent browse = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.wazapay.com\"));\n startActivity(browse);\n }", "@Override\n public void grindClicked() {\n Uri webpage = Uri.parse(\"http://www.grind-design.com\");\n Intent webIntent = new Intent(Intent.ACTION_VIEW, webpage);\n startActivity(webIntent);\n }", "public void openBrowser(View view){\n String url = (String)view.getTag();\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n\n //pass the url to intent data\n intent.setData(Uri.parse(url));\n\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(article.getLink())); // intent to show item using url\n Context context = view.getContext();\n context.startActivity(browserIntent);\n }", "@Override\n public void onClick(View view) {\n Intent detail = new Intent(getBaseContext(), DetailArticle.class);\n detail.putExtra(\"webURL\", webHotURL);\n startActivity(detail);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUri webpage = Uri.parse(currentItem.getStoryUrl());\n\n\t\t\t\t// Create web browser intent\n\t\t\t\tIntent storyOnWebIntent = new Intent(Intent.ACTION_VIEW, webpage);\n\n\t\t\t\t// Check web activity can be handled by the device and start activity\n\t\t\t\tif (storyOnWebIntent.resolveActivity(mContext.getPackageManager()) != null) {\n\t\t\t\t\tmContext.startActivity(storyOnWebIntent);\n\t\t\t\t}\n\n\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\tWindow.open(result.get(\"description\"), \"description\", result.get(\"description\"));\r\n\r\n\t\t\t\t\t\t}", "public void showAbout() {\n\t\t/* track \"About\" */\n\t\ttracker.trackEvent(\"Listings\", \"Click\", \"About\", 0);\n\n\t\tUri uri = Uri.parse(\"http://static.flipzu.com/about-android.html\");\n\t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n\t\tstartActivity(intent);\n\t}", "void openInAppBrowser(String url, String title, String subtitle, int errorMsg);", "public void clickOnMoreLatesBookLink() {\n\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Book currentBook = mAdapter.getItem(position);\n\n // Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri bookUri = Uri.parse(currentBook.getBookPreviewUrl());\n\n // Create a new intent to view the book URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, bookUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }", "private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }", "HtmlPage clickLink();", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Book currentBook = adapter.getItem(position);\n\n // Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri bookUri = Uri.parse(currentBook.getUrl());\n\n // Create a new intent to view the book URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, bookUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }", "@Override\n public void onClick(View v) {\n String Url= currentNews.getWebUrl();\n //sent intent to the website\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n intent.setData(Uri.parse(Url));\n getContext().startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }", "@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }", "@Override\n public void onClick(View v) {\n Intent detail=new Intent(getBaseContext(),DetailArticle.class);\n detail.putExtra(\"webURL\",webHotURL);\n startActivity(detail);\n }", "private void viewPageClicked() {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n try{\n Desktop d = Desktop.getDesktop();\n d.browse(new URI(itemView.getItem().getURL()));\n }catch(Exception e){\n e.printStackTrace();\n }\n\n showMessage(\"View clicked!\");\n }", "private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }", "public void learnMoreOnClick(View view) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://www.cdc.gov/healthywater/drinking/nutrition/index.html\")));\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/notes.html\");\n \t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n }", "protected void WebClicked(View view){\n String url = this.itm.getItem(position).getUrl();\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n try {\n startActivity(browserIntent);\n } catch (ActivityNotFoundException e){\n Toast.makeText(getBaseContext(), \"Webpage \" + url + \"does not exist\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }", "@Override\n public void onClick(View v) {\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(Constant.INTENT_WEB_URL, webHotUrl);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/notes.html\");\n \t\t\n \t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n \n }", "public static void goTo() {\n Browser.driver.get(\"https://www.amazon.co.uk/\");\n Browser.driver.manage().window().maximize();\n }", "private void openBrowser() {\r\n //http://必须有\r\n String url = urlText.getText().toString();\r\n if (!\"http\".equals(url.substring(0, 4))) {\r\n url = \"http://\" + url;\r\n }\r\n Uri uri = Uri.parse(url);//获取网址,并转换成URI\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);//打开浏览器\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }", "@Override\n public void onClick(View v) {\n Intent rpIntent = new Intent(Intent.ACTION_VIEW);\n // Set the URL to be used.\n rpIntent.setData(Uri.parse(\"http://www.rp.edu.sg\"));\n startActivity(rpIntent);\n }", "@OnClick({R.id.web_img, R.id.web})\n void OnClickWeb() {\n Uri webpage=Uri.parse(\"http://\" + getString(R.string.web));\n Intent intentW=new Intent(Intent.ACTION_VIEW, webpage);\n if (intentW.resolveActivity(getPackageManager()) != null) {\n startActivity(intentW);\n }\n }", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent marketIntent = new Intent(Intent.ACTION_VIEW);\n marketIntent.setData(Uri.parse(\"market://details?id=com.adobe.reader\"));\n// marketIntent.setData(Uri.parse(\"market://details?id=com.infraware.office.link\"));\n startActivity(marketIntent);\n\n }", "@Override\n /**\n * User clicked something---launch the browser\n */\n public void propertyChange(PropertyChangeEvent propertyChangeEvent) {\n CardData cardData = (CardData) propertyChangeEvent.getNewValue();\n String url = cardData.getUrl();\n //showErrorMessage(\"clicked on \" + propertyChangeEvent.getNewValue());\n Uri uri = Uri.parse(url);\n\n // log the activity\n\n // TODO: Map the current feed's url\n String sourceUrlPath = getCurrentStrategy().getUrlPath(); // e,g, \"/news/home\"\n String idStr = String.format(\"%d\", cardData.getId());\n\n EventDispatchService dispatchService = _dispatchPaymentFactory.createEventDispatch(idStr);\n dispatchService.sendConfirmation(getDispatchSuccessCallback(), getDispatchFailureCallback());\n\n\n AuthEventPublicDispatch eventDispatchService = _dispatchPaymentFactory.createDispatch(sourceUrlPath, uri.getPath(), url);\n eventDispatchService.sendConfirmation(getEventDispatchSuccessCallback(), getEventDispatchFailureCallback());\n\n Intent browserLaunchIntent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(browserLaunchIntent);\n\n }", "@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}", "public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }", "@OnClick(R.id.tvTermsOfUse)\n void termsOfUse()\n {\n UtilsMethods.openBrowser(this, Keys.TERM_OF_USE_URL);\n }", "protected void intentBrowsingHistory() {\n \t// TODO accessTokenの取得がBookmarkとかぶる部分共通に‥\n \n \t// ログイン状態か確認。Cookie制御は確認済かつ表示前にチェックが走るのでここでは確認しない。\n \tString accessToken = null;\n String refreshToken = null;\n try {\n SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\n accessToken = settings.getString(ACCESS_TOKEN, null);\n refreshToken = settings.getString(REFRESH_TOKEN, null);\n } catch (Exception e) {\n //\n }\n \n if (isNotEmpty(accessToken) && isNotEmpty(refreshToken)) { \n \tIntent intent = new Intent(this, BrowsingHistoryList.class);\n \tstartActivity(intent);\n } else {\n Intent loginIntent = new Intent(this, UserLogin.class);\n startActivityForResult(loginIntent, APL_REQUEST_BROWSINGHISTORY);\n }\n \t\n \t\n }", "@Override\r\n\tpublic void browser() //target method explaination\r\n\t{\r\n\t\tSystem.out.println(\"Customer is Browsing...\");\r\n\t}", "HtmlPage clickSiteLink();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=207\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=201\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "public void openUrlInBrowser(String URL) {}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=217\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void sharePage(){\n Intent shareIntent = new Intent(Intent.ACTION_VIEW);\n shareIntent.setData(Uri.parse(\"http://192.168.43.105:5000\"));//edit url\n startActivity(shareIntent);\n }", "@Override\n public void onClick(View v) {\n startBrowserActivity(MODE_SONIC, StorageNews.get(1).webUrl);\n\n //startActivity(intent);\n //Log.d(\"NNNNN\",StorageNews.toString());\n }", "@Override\n public void onClick(View v) {\n Uri uri = Uri.parse(\"https://www.google.com/?gws_rd=ssl#q=\" + mAnswer.getWord());\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(intent);\n }", "private void openBrowser(String Url) {\n \tif (Url != null && Url.trim().length()>0) {\n \t\tUri uri = Uri.parse(Url);\n \tIntent i = new Intent(Intent.ACTION_VIEW, uri);\n \tstartActivity(i);\n \t} \t\n }", "@Override\n public void onClick(View v) {\n startBrowserActivity(MODE_SONIC, StorageNews.get(2).webUrl);\n\n //startActivity(intent);\n //Log.d(\"NNNNN\",StorageNews.toString());\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/privacy\"));\n startActivity(browserIntent);\n }", "private void toWebViewActivity(){\n Intent toWebViewActivity = new Intent(this, AmazonActivity.class);\n startActivity(toWebViewActivity);\n }", "@Override\n public void onClick(View v) {\n startBrowserActivity(MODE_SONIC, StorageNews.get(4).webUrl);\n\n //startActivity(intent);\n //Log.d(\"NNNNN\",StorageNews.toString());\n }", "public void likePage(View v) {\n final String urlFb = \"fb://page/1450066045229608\";\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(urlFb));\n\n final PackageManager packageManager = getPackageManager();\n List<ResolveInfo> list = packageManager.queryIntentActivities(\n intent, PackageManager.MATCH_DEFAULT_ONLY);\n if (list.size() == 0) {\n //final String urlBrowser = \"https://www.facebook.com/glasvezelpaleiskwartier\";\n final String urlBrowser = \"https://www.facebook.com/pages/1450066045229608\";\n\n intent.setData(Uri.parse(urlBrowser));\n\n }\n\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n startBrowserActivity(MODE_SONIC, StorageNews.get(3).webUrl);\n\n //startActivity(intent);\n //Log.d(\"NNNNN\",StorageNews.toString());\n }", "public void OnSetupBrowser(Intent intent) {\n this.f12125b.mo8854a(intent);\n }", "@Override\n public void onClick(View v) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.forecast_io_url)));\n startActivity(browserIntent);\n }", "@Override\n public void onClick(View view) {\n //Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri newsUri = Uri.parse(url);\n\n // Create a new intent to view the earthquake URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, newsUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }", "public void hyperlinkUpdate(HyperlinkEvent e)\n {\n if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)\n {\n ServiceReference<BrowserLauncherService> serviceReference =\n BrandingActivator.getBundleContext().getServiceReference(\n BrowserLauncherService.class);\n\n if (serviceReference != null)\n {\n BrowserLauncherService browserLauncherService\n = BrandingActivator\n .getBundleContext().getService(serviceReference);\n\n browserLauncherService.openURL(e.getDescription());\n }\n }\n }", "public void onLearnMoreClickedListener(View view) {\n Toast.makeText(this, \"Go to service page on the website . . . \", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(ReadingDataActivity.this,\n\t\t\t\t\t\tBookInfoNewUIActivity.class);\n\t\t\t\tintent.putExtra(BookInfoNewUIActivity.BookIdKey,\n\t\t\t\t\t\treadingDataM.getBookId());\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void onClick(DialogInterface dialog, int which) {\n Intent browserIntent = new Intent(\n Intent.ACTION_VIEW,\n Uri.parse(\"https://docs.google.com/spreadsheet/viewform?formkey=dGpiRDhreGpmTFBmQ2FUTVVjVlhESHc6MQ\"));\n startActivity(browserIntent);\n\n return;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_open_new:\n String url = \"\";\n try{\n url = json.getString(\"url\");\n }\n catch (JSONException e){\n e.printStackTrace();\n }\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(browserIntent);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/cchat.html\");\n \t\t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n }", "public void bestInfo(ActionEvent actionEvent)\n {\n try {\n Desktop.getDesktop().browse(new URL(\"https://en.wikipedia.org/wiki/Best-first_search\").toURI());\n } catch (IOException e) {\n e.printStackTrace();\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n }", "private void gotoInfo() {\n Intent launchInfo = new Intent(this, Info.class);\n startActivity(launchInfo);\n }", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(\"http://\" + url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public ICurrentPage openNewWindow(String url);", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n Intent share=new Intent(android.content.Intent.ACTION_SEND);\n\n share.setType(\"text/plain\");\n share.putExtra(android.content.Intent.EXTRA_SUBJECT,news.getTitle());\n share.putExtra(android.content.Intent.EXTRA_TEXT,\"Follow the link : \"+MainActivity.base_url+news.getAbsolute_url()+\" to read more\");\n startActivity(Intent.createChooser(share,\"Share via\"));\n\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(getActivity(), DetailActivity.class);\n intent.putExtra(\"NAME\", (String) mNameTextView.getText());\n intent.putExtra(\"REALNAME\", (String) mRealNameTextView.getText());\n intent.putExtra(\"URL\", (String) mHero.getUrl());\n startActivity(intent);\n }", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "public void openWebPage(String url) {\n Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(intent);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tIntent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.google.com\"));\n\t\t\t\t\tcontext.startActivity(webIntent);\n\t\t\t\t\t\n\t\t\t\t}", "public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tIntent it = new Intent(getActivity(), DetailActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(MangaInfoFrag.MANGA_LINK_STRING, getActivity()\n\t\t\t\t\t\t.getResources().getString(R.string.domain)\n\t\t\t\t\t\t+ results.get(position - 1).getLink());\n\t\t\t\tit.putExtras(bundle); \n\t\t\t\tstartActivity(it);\n\t\t\t\tToast.makeText(getActivity(),\n\t\t\t\t\t\tresults.get(position - 1).getLink(), Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}", "@Override\n public void onClick(Movie movie) {\n Intent intent = new Intent(this, DetailActivity.class);\n intent.putExtra(Intent.EXTRA_TEXT, movie);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Uri newsUri = Uri.parse(currentNews.getUrl());\n\n // Create a new intent to view the news URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, newsUri);\n\n // Send the intent to launch a new activity\n mContext.startActivity(websiteIntent);\n }", "@Override\r\n\tprotected void openPage(PageLocator locator, Object... args) \r\n\t{\n\t\t\r\n\t}", "public void openList(String chapter, String title, String body) {\n Intent i = new Intent(c, Book.class);\n i.putExtra(\"CHAPTER_KEY\", chapter);\n i.putExtra(\"TITLE_KEY\", title);\n i.putExtra(\"BODY\",body);\n\n c.startActivity(i);\n }", "public void bookResource(View view)\r\n {\n startActivity(new Intent(this, BookResource.class));\r\n // Intent intent_bookResource = new Intent(this, BookResource.class );\r\n // intent_bookResource.putExtra(\"userName\", userName);\r\n // this.startActivity(intent_bookResource);\r\n\r\n\r\n\r\n\r\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tstartActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.facebook.com/mrinalkanti.ray\")));\n\t\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(fullsitelink));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t\t}", "public void openBrowser(Context context, String url) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n context.startActivity(i);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent web = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tweb.setData(Uri.parse(url));\n\t\t\t\tstartActivity(web);\n\t\t\t}", "private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }", "private void onWhatTokenButtonClick() {\r\n\r\n //Open related web post\r\n Intent i = new Intent(Intent.ACTION_VIEW);\r\n i.setData(Uri.parse(getString(R.string.url_github_about_tokens)));\r\n startActivity(i);\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent(getApplicationContext(),Routine.class);\n\t\t\t\tintent.putExtra(\"pdf\", \"http://www.aust.edu/bba/class_routine_mba.pdf\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\n }", "public void rate(View view) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"market://details?id=com.iven.lfflfeedreader\"));\n startActivity(intent);\n }", "@Override\r\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,long id) {\n\t\tIntent intent = new Intent();\r\n\t\tAccountDetail accountDetail = accountDetails.get(position);\r\n\t\tintent.setAction(accountDetail.getAction());\r\n\t\tintent.putExtra(BrowserActivity.BROWSERACTIVITY_URI, accountDetail.getUri());\r\n\t\tstartActivity(intent);\r\n\t\t\r\n\t}", "@Override\n public void handleNewIntent(Intent intent) {\n if (!mUi.isWebShowing()) {\n mUi.showWeb(false);\n }\n mIntentHandler.onNewIntent(intent);\n }", "private void startBookingDetails() {\n\t\t\n\t\n\t Intent launchBookingDetails = new Intent(this, BookingDetails.class);\n\t launchBookingDetails.putExtra(\"obj\", obj);\n\t startActivity(launchBookingDetails);\n\n\t }", "@Override\n public void onClick(View v) {\n\n String url = \"https://club-omnisports-des-ulis.assoconnect.com/billetterie/offre/146926-a-adhesion-karate-2020-2021\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n\n }" ]
[ "0.6616492", "0.64990646", "0.6405049", "0.6325289", "0.63050824", "0.6296583", "0.6230819", "0.6213178", "0.6202709", "0.61943525", "0.6186243", "0.61847484", "0.61782753", "0.61701024", "0.614733", "0.6133908", "0.6132503", "0.61097187", "0.60978985", "0.60959417", "0.60951376", "0.60725737", "0.60250753", "0.60148054", "0.60056835", "0.600444", "0.59983754", "0.5992113", "0.5980502", "0.5962176", "0.5946413", "0.5938506", "0.59341294", "0.5930975", "0.59304625", "0.5926138", "0.5906512", "0.59025526", "0.58841914", "0.58841795", "0.58797663", "0.5872677", "0.5867241", "0.5820343", "0.5795269", "0.57924026", "0.5787229", "0.5773582", "0.5768485", "0.5764899", "0.5751771", "0.57487273", "0.57466596", "0.5739202", "0.5728128", "0.57248044", "0.5707323", "0.57036763", "0.5700823", "0.5698101", "0.56977487", "0.569633", "0.5694078", "0.5689981", "0.5687543", "0.568505", "0.5668618", "0.56653404", "0.56575644", "0.5642068", "0.5641036", "0.5639272", "0.5638278", "0.56270105", "0.5624712", "0.5621376", "0.56202275", "0.5613102", "0.5606146", "0.5602398", "0.5598187", "0.5584622", "0.558248", "0.55798805", "0.55737513", "0.5561983", "0.5560668", "0.5558623", "0.55580014", "0.5553035", "0.55324954", "0.55287164", "0.55234706", "0.55208445", "0.5516183", "0.55136377", "0.5510646", "0.5508841", "0.5508771", "0.55078167" ]
0.7539344
0
Adds book to liked and changes icon. If the book is already liked then the book is removed from the 'liked' list that is stored in SharedPreferences and the icon is changed back.
public void likeBook(View v) { SharedPreferences sharedPreferences = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE); SharedPreferences.Editor prefEditor = sharedPreferences.edit(); try { //If not already liked if (!liked) { //Get current amount of liked books and put like info prefEditor.putBoolean("LIKED" + currentBook.GID, true); prefEditor.commit(); mLikeButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite_red)); liked = true; } else { prefEditor.remove("LIKED" + currentBook.GID); prefEditor.commit(); mLikeButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite_border_black)); liked = false; } }catch(Exception e){ e.printStackTrace(); Toast.makeText(this, "Book is still loading", Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onFavouritesIconPressed() {\n if (currentAdvertIsFavourite()) {\n dataModel.removeFromFavourites(advertisement);\n view.setIsNotAFavouriteIcon();\n } else {\n dataModel.addToFavourites(advertisement);\n view.setIsAFavouriteIcon();\n }\n }", "public void refreshFavoriteBtn() {\r\n if (recipe.isFavorite(context)) {\r\n favoriteBtn.setIcon(\"faw_star\");\r\n } else {\r\n favoriteBtn.setIcon(\"faw_star_o\");\r\n }\r\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "private void setLikes() {\n\n final DatabaseReference likesRef= FirebaseDatabase.getInstance().getReference().child(\"Likes\");\n\n likesRef.addValueEventListener(new ValueEventListener() {\n @SuppressLint(\"NewApi\")\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.child(postId).hasChild(myUid)) {\n likeBtn.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_liked_blue,0,0,0);\n likeBtn.setText(\"Liked\");\n\n\n }\n else{\n likeBtn.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_like_black,0,0,0);\n likeBtn.setText(\"Like\");\n\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tif(!stock.isBookmarked()){\n\t\t\t\t\t\t\tToast.makeText(StockListActivity.this, stock.getStockCode().toString()+\" added to Watchlist \",Toast.LENGTH_SHORT).show\n\n\t();\n\t\t\t\t\t\t\tstock.setBookmarked(true);\n\t\t\t\t\t\t\taddToWatchlist(stock);\n\t\t\t\t\t\t\tiButton.setImageResource(R.drawable.bookmark_yes);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tToast.makeText(StockListActivity.this, stock.getStockCode().toString()+\" removed from Watchlist \",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tstock.setBookmarked(false);\n\t\t\t\t\t\t\tremoveFromWatchlist(stock);\n\t\t\t\t\t\t\tiButton.setImageResource(R.drawable.bookmark_no);\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}", "public void onClickLike() {\r\n\t\ttry {\r\n\t\t\tJSONObject mChannelData = mListChannelsData.getJSONObject(mCurrentPosition);\r\n\t\t\tString channelId = mChannelData.getString(ListChannelsServices.id);\r\n\t\t\tString channelName = mChannelData.getString(ListChannelsServices.name);\r\n\t\t\tif (mDatabaseDAO.checkFavouriteChannelExist(channelId)) {\r\n\t\t\t\tmDatabaseDAO.deleteFavouriteChannel(channelId);\r\n\t\t\t\t((ImageView)mActivity.findViewById(R.id.img_like)).setImageResource(R.drawable.ic_like);\r\n\t\t\t\tUtils.toast(mActivity, getString(R.string.removed_from_favourite_channel));\r\n\t\t\t} else {\r\n\t\t\t\tmDatabaseDAO.insertFavouriteChannel(channelId, \"\", mChannelData.toString());\r\n\t\t\t\t((ImageView)mActivity.findViewById(R.id.img_like)).setImageResource(R.drawable.ic_like_yes);\r\n\t\t\t\tUtils.toast(mActivity, getString(R.string.added_to_favourite_channel));\r\n\t\t\t\t\r\n\t\t\t\t// Google Analytics\r\n\t\t\t\tString action = channelName;\r\n\t\t\t\tEasyTracker.getTracker().trackEvent(NameSpace.GA_CATEGORY_MOST_LIKED_CHANNELS, action, null, 1L);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void like() {\n this.likes += 1;\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (item.isFavorite()) {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite_off);\n\t\t\t\t\t\titem.setFavorite(false);\n\t\t\t\t\t\tpref.setString(item.getFileName(), false);\n\t\t\t\t\t\tif (!inRingtones) {\n\t\t\t\t\t\t\tIntent broadcast = new Intent();\n\t\t\t\t\t\t\tbroadcast.setAction(\"REMOVE_SONG\");\n\t\t\t\t\t\t\tcontext.sendBroadcast(broadcast);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite);\n\t\t\t\t\t\titem.setFavorite(true);\n\t\t\t\t\t\tpref.setString(item.getFileName(), true);\n\t\t\t\t\t}\n\t\t\t\t}", "private void premium_isFavOrLike(Context context, ArticleBean articleBean, final ListingIconView favStartImg, final ListingIconView toggleLikeDisLikeImg) {\n ApiManager.isExistFavNdLike(context, articleBean.getArticleId())\n .subscribe(likeVal -> {\n int like = (int) likeVal;\n if (articleBean != null) {\n articleBean.setIsFavourite(like);\n }\n favStartImg.setVisibility(View.VISIBLE);\n favStartImg.setEnabled(true);\n toggleLikeDisLikeImg.setVisibility(View.VISIBLE);\n toggleLikeDisLikeImg.setEnabled(true);\n\n if(THPConstants.IS_USE_SEVER_THEME) {\n if (like == NetConstants.LIKE_NEUTRAL) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_YES) {\n // 2 = app:iconType=\"favourite\"\n favStartImg.updateIcon(2);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_NO) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 6 = app:iconType=\"like\"\n toggleLikeDisLikeImg.updateIcon(6);\n }\n }\n else {\n if (like == NetConstants.LIKE_NEUTRAL) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_YES) {\n favStartImg.setImageResource(R.drawable.ic_like_selected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_NO) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_on_copy);\n }\n }\n\n }, val -> {\n Log.i(\"\", \"\");\n });\n }", "public void addLike() {\n // TODO implement here\n }", "public void setUpFavouriteIcon() {\n if (isUserOwner()) {\n view.hideFavouriteIcon();\n } else if (currentAdvertIsFavourite()) {\n view.setIsAFavouriteIcon();\n } else {\n view.setIsNotAFavouriteIcon();\n }\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.like_unlike_change_btn:\n\t\t\t\n\t\t\tUtill.showProgress(getApplicationContext());\n\t\t\t count = Integer.parseInt(newsList.get(position).getLikeCount()) ;\n\t\t\t likeStatus = newsList.get(position).getMyLikeStatus();\n\t\t\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\t\t\tparams.put(\"news_feed_id\", newsList.get(position).getNews_feed_id());\n\t\t\t\tparams.put(\"news_feed_like_user_id\", SessionManager.getUser_id(getApplicationContext()));\n\t\t\t\t\n\t\t\t if(newsList.get(position).getMyLikeStatus().equalsIgnoreCase(\"1\"))\n\t\t\t\t{\n\t\t\t\t\tlikeStatus = \"2\";\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlikeStatus = \"1\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tparams.put(\"likestatus\", likeStatus);\n\n\t\t\t\tif (Utill.isNetworkAvailable(VedioWebView.this)) {\n\t\t\t\t\tUtill.showProgress(getApplicationContext());\n\n\t\t\t\t\tGlobalValues.getModelManagerObj(getApplicationContext()).likeNews(params, new ModelManagerListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSuccess(String json) {\n\t\t\t\t\t\t\t// Utill.hideProgress();\n\t\t\t\t\t\t\tLog.e(\"like result \", json+\"\");\n\t\t\t\t\t\t//\tgetNewsFeed();\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJSONObject jsonObj = new JSONObject(json);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\t10-23 20:25:32.215: E/result:(4090): {\"status\":\"true\",\"message\":\"Liked Successfully\",\"liked\":\"1\"}\n\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),jsonObj.getString(\"message\"), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t // if()\n\t\t\t\t\t\t\t\t//likeStatus = jsonObj.getString(\"liked\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnewsList.get(position).setMyLikeStatus(likeStatus);\n\t\t\t\t\t\t\tif(likeStatus.equalsIgnoreCase(\"1\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tnewsList.get(position).setLikeCount((++count)+\"\");\n\t\t\t\t\t\t\t\tlike_unlike_change_btn.setTextColor(Color.parseColor(\"#536CB5\") );\n\t\t\t\t\t\t\t\tlike_unlike_change_btn.setCompoundDrawablesWithIntrinsicBounds(R.drawable.active_like_icon, 0, 0, 0);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tnewsList.get(position).setLikeCount((--count)+\"\");\n\t\t\t\t\t\t\t\tlike_unlike_change_btn.setTextColor(Color.parseColor(\"#ffffff\") );\n\t\t\t\t\t\t\t\tlike_unlike_change_btn.setCompoundDrawablesWithIntrinsicBounds(R.drawable.like_icon, 0, 0, 0);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewsList.get(position).setMyLikeStatus(likeStatus);\n\t\t\t\t\t\t\tUtill.hideProgress();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onError(String msg) {\n\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tUtill.hideProgress();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tbreak;\n\n\t\t\tcase R.id.comment_btn:\n\t\t\t\tcomment_relative_layout.setVisibility(View.VISIBLE);\n\t\t\t\t\tbreak;\n\t\t\tcase\tR.id.comment_send_btn :\n\t\t\t\t\n\t\t\t//\tToast.makeText(getApplicationContext(), \"Plsase enter comment in comment box\", 1).show();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!comment_edittxt.getText().toString().equalsIgnoreCase(\"\")||comment_edittxt.getText().toString()!=\"\")\n\t\t\t\t{\n\t\t\t\t\tcomment_relative_layout.setVisibility(View.GONE);\n\t\t\t\t\tcommentNews(comment_edittxt.getText().toString(), newsList.get(position).getNews_feed_id());\n\t\t\t\t\thideSoftKeyboard();\n\t\t\t\t\tcomment_edittxt.setText(\"\");\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Toast.makeText(getApplicationContext(), \"Plsase enter comment in comment box\", 1).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void success(MainServerData<Object> wrappedObject, Response response) {\n if(urlListData.liked == 0) {\n urlListData.liked = 1;\n urlListData.likedNum += 1;\n }\n else {\n urlListData.liked = 0;\n urlListData.likedNum -= 1;\n }\n item.setIcon(urlListData.liked == 0 ? R.drawable.mainpage_bookmark_unchecked : R.drawable.mainpage_bookmark_checked);\n item.setEnabled(true);\n LinkBoxController.notifyUrlDataSetChanged();\n }", "public boolean addLike (Message like) {\n Logger.write(\"VERBOSE\", \"DB\", \"addLike(...)\");\n \n try {\n execute(DBStrings.addLike.replace(\"__likerKey__\", Crypto.encodeKey(getSignatory(like)))\n .replace(\"__parent__\", like.LIKEgetItemID()));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n return false;\n }\n \n return true;\n }", "@Override\n public void onClick(View view) {\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n DatabaseReference dbRef = firebaseDatabase.getReference().child(\"borrowed-book\");\n DatabaseReference updatedBRef = dbRef.child(bb.getBookName()+bb.getBorrowerId());\n Map<String, Object> status = new HashMap<>();\n status.put(\"status\", 0);\n updatedBRef.updateChildren(status);\n\n SharedPreferences pref = mContext.getSharedPreferences(mContext.getString(R.string.shared_pref),\n Context.MODE_PRIVATE);\n\n //remove returned book from list and reset books\n borrowed_books.remove(position);\n setBook(borrowed_books);\n\n //decrement no of books borrowed\n int no_books_borrowed = pref.getInt(mContext.getString(R.string.no_books_borrowed), MainActivity.default_no_pref);\n if(no_books_borrowed > 0) {\n SharedPreferences.Editor editor = pref.edit();\n editor.putInt(mContext.getString(R.string.no_books_borrowed), no_books_borrowed-1);\n editor.commit();\n }\n BookUpdateService.startActionUpdateWidget(mContext);\n }", "public void put(Book book) {\n\t\tboolean ok = false;\n\t\tfor (Integer isbnToLend : wishList) {\n\t\t\tif (isbnToLend == book.getIsbn()) {\n\t\t\t\tok = true;\n\t\t\t}\n\t\t}\n\t\tif (!ok) {\n\t\t\tlogger.level3(\"Proba wlozenia ksiazki ktorej nie ma na liscie do kieszeni: \" + book);\n\t\t\tthrow new EnvinronmentException(\"Proba wypozyczenia ksiazki spoza listy przez studenta: \" + this);\n\t\t}\n\t\tlogger.level1(\"Wlozono ksiazke do kieszeni: \" + book);\n\t\tlendBooks.add(book);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.action_heart) {\n if(selectedHeart == false) {\n menu.getItem(0).setIcon(filledHeart);\n BackendUtils.doGetRequest(\"/api/like\", new HashMap<String, String>() {{\n put(\"username\", username);\n }}, new VolleyCallback() {\n @Override\n public void onSuccess(String result) {\n Log.d(TAG, result);\n }\n\n @Override\n public void onError(VolleyError error) {\n Log.d(TAG, String.valueOf(error.networkResponse.statusCode));\n }\n }, getApplicationContext(), this);\n\n Toast.makeText(this, \"Liked!\", Toast.LENGTH_SHORT).show();\n selectedHeart = true;\n } else {\n menu.getItem(0).setIcon(unfilledHeart);\n Toast.makeText(this, \"Unliked!\", Toast.LENGTH_SHORT).show();\n selectedHeart = false;\n }\n return true;\n }\n return false;\n }", "void addLike(long mediaId);", "@Override\n public View getView(int position, final View contentView, ViewGroup parent){\n TextView v = (contentView.findViewById(R.id.content));\n v.setText(getItem(position)); // returns text of joke\n\n ImageButton likeButton = contentView.findViewById(R.id.likeButton);\n ImageButton shareButton = contentView.findViewById(R.id.shareButton);\n\n // if joke is already liked, like button should reflect it\n if(sharedPreferences.contains(getItem(position))) {\n likeButton.setImageResource(R.drawable.like_filled);\n clicked = false;\n }\n else {\n likeButton.setImageResource(R.drawable.like_empty);\n clicked = true;\n }\n\n likeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(clicked) {\n likeButton.setImageResource(R.drawable.like_filled);\n clicked = false;\n\n // animation for like button\n YoYo.with(Techniques.Bounce)\n .duration(500) // in ms\n // .repeat(5)\n .playOn(likeButton); // pass the view\n\n Toast.makeText(context, \"Joke added to Favourites!\", Toast.LENGTH_SHORT).show();\n // create new joke, get text from textview, and set true for isLiked value\n joke = new Joke(getItem(position), true);\n // pass joke to MainActivity via listener reference\n jokeLikeListener.jokeIsLiked(joke);\n }\n else {\n likeButton.setImageResource(R.drawable.like_empty);\n clicked = true;\n\n YoYo.with(Techniques.Bounce).duration(500).playOn(likeButton);\n\n Toast.makeText(context, \"Joke removed from Favourites\", Toast.LENGTH_SHORT).show();\n joke = new Joke(getItem(position), false);\n jokeLikeListener.jokeIsLiked(joke);\n }\n }\n });\n\n // to share jokes via other apps -> tested better on real device\n // also add listener for share button in fav list fragment\n shareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // create ACTION_SEND Intent\n Intent intent = new Intent(Intent.ACTION_SEND);\n // the content you want to share\n // 'v' refers to TextView created above\n String shareBody = v.getText().toString();\n // type of content\n intent.setType(\"text/plain\");\n\n // applying information subject & body\n intent.putExtra(Intent.EXTRA_SUBJECT, \"Random Jokes!\");\n intent.putExtra(Intent.EXTRA_TEXT, shareBody);\n\n v.getContext().startActivity(Intent.createChooser(intent, \"Share Via\"));\n }\n });\n return contentView;\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "public void storeLikeFeed(FeedUserRequest request, TopicsListResponse response) throws SQLException {\n storeFeed(request, response, LIKED_FEED_TYPE, TopicFeedRelation.DEFAULT_QUERY);\n }", "public void onClicked() {\n mypreference = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor editorpref = mypreference.edit();\n Gson gson = new Gson();\n //retrieve the stored ArrayList of fovorite movies as json format\n String storedJsonList = mypreference.getString(\"storedjsonList\", \"\");\n // get the type of this json format\n Type type = new TypeToken<ArrayList<ItemsClass>>() {\n }.getType();\n ArrayList<ItemsClass> movieArrayList = new ArrayList<ItemsClass>();\n //create array list of the retrieved json\n // store it in my Arraylist\n movieArrayList = gson.fromJson(storedJsonList, type);\n\n// favo.setSelected(va[0]);\n ischecked = va[0];\n if (va[0] == true) {\n\n if (movieArrayList == null) {\n\n favoImageButton.setImageResource(R.drawable.liked);\n\n String loadedPosterString = encodeTobase64(theposterImage);\n\n\n serItems.add(new ItemsClass(loadedPosterString, title, releaseDate, overview, rate, id));\n\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id + \"and you list size is\" + serItems.size(), Toast.LENGTH_SHORT).show();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n\n } else if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n int detectId = serItems.get(i).getId();\n if (serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you already have this movie in favorite list \", Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.liked);\n break;\n } else if (serItems.size() > 0 && detectId != id && i < serItems.size() - 1) {\n\n continue;\n\n } else if (detectId != id && i == serItems.size() - 1 && i > serItems.size() - 2) {\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n serItems.add(new ItemsClass(storedPoster, title, releaseDate, overview, rate, id));\n serItems.size();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n break;\n }\n\n }\n }\n\n } else {\n if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n\n int detectId = serItems.get(i).getId();\n if (i < serItems.size() && serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you have deleted this movie this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n mypreference = getContext().getSharedPreferences(\"moviepref\", Context.MODE_PRIVATE);\n editorpref.putString(\"storedPoster\", \"\");\n editorpref.putString(\"storedTitle\", \"\");\n editorpref.putString(\"storedOverview\", \"\");\n editorpref.putString(\"storedDate\", \"\");\n editorpref.putFloat(\"storedrating\", (float) 0.0);\n editorpref.commit();\n va[0] = !va[0];\n//\n break;\n } else if (detectId != id && i < serItems.size() - 1) {\n continue;\n } else if (detectId == id && i == serItems.size() - 1) {\n Toast.makeText(getContext(), \" actually you don't have this movie in your favorite list \", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tif(item.reward.getReward_favorite()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(1);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.orange_star);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(0);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.black_star);\n\t\t\t\t\t}\n\t\t\t\t}", "public void drawFav(Recipe r, ImageView favIcon) {\n int imgFav;\n if (r.isFavorite()) {\n imgFav = getResources().getIdentifier(\"favstarylw\", \"drawable\", getPackageName());\n } else {\n imgFav = getResources().getIdentifier(\"favstargrey\", \"drawable\", getPackageName());\n }\n favIcon.setImageResource(imgFav);\n }", "public void updateFavorited(UserProfile up, String itemCode, Boolean madeIt) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"UPDATE userItems \"\n + \"SET madeIt = ? \"\n + \"WHERE itemCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setBoolean(1, madeIt);\n ps.setString(2, itemCode);\n\n ps.executeUpdate();\n } catch (SQLException se) {\n System.out.println(\"ERROR: Could not execute SQL statement in: \" + \"Item.changeRating()\");\n System.out.println(\"ERROR: Could not execute SQL statement: \" + se);\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n up.updateFav(itemCode, madeIt);\n }", "public void likePost(String userKey) {\n if (!this.likes.contains(userKey)) {\n this.likes.add(userKey);\n }\n }", "@Override\n public void doLike(final int position, final boolean like) {\n mCircleAction.doLike(circleList.get(position).getSid(), !circleList.get(position).isLiked(),new RequestCallback() {\n @Override\n public void onResult(int code, String result, Throwable var3) {\n if(code == 0){\n if(!circleList.get(position).isLiked()){\n //点赞\n circleList.get(position).setLikeCount(circleList.get(position).getLikeCount() + 1);\n circleList.get(position).setIsLiked(true);\n } else {\n //取消赞\n circleList.get(position).setLikeCount(circleList.get(position).getLikeCount() - 1);\n circleList.get(position).setIsLiked(false);\n }\n mCircleAdapter.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onFailed() {\n\n }\n });\n }", "private void handleLikeButtonClick() {\n boolean performLike = !CurrentUser.hasLiked(prismPost);\n performUIActivitiesForLike(performLike);\n\n if (performLike) {\n DatabaseAction.performLike(prismPost);\n } else {\n DatabaseAction.performUnlike(prismPost);\n }\n }", "public void updateIcon(boolean isPlaying) {\n\t\tplay_button.setImageResource(isPlaying ? R.drawable.ic_pause\n\t\t\t\t: R.drawable.ic_play);\n\t}", "private void setModifiedAndUpdateIcon() {\n document.setModified(true);\n updateTabIcon(document);\n }", "public void addToLikedCars(String likedCars);", "public void ratings(){\n SimpleActivity activity = getSimpleActivity();\n RatingBar ratingBar = (RatingBar) activity.findViewById(R.id.ratingBar);\n friendsPreference = PreferenceManager.getDefaultSharedPreferences(activity);\n if (friendsPreference.getFloat(friendNameFragment+\"Rating\", 0)!=0) {\n ratingBar.setRating(friendsPreference.getFloat(friendNameFragment+\"Rating\", 0));\n }\n }", "@Override\n public void onClick(View v) {\n if (deletedContentModel != null && deletedContentModel.getBean() != null) {\n premium_updateBookmarkFavLike(null, null, context,\n deletedPosition, deletedContentModel.getBean(), \"dislike\");\n CleverTapUtil.cleverTapBookmarkFavLike(context, articleId, mFrom, \"UNDO\");\n }\n }", "private void swipeLike() {\n String tmp = \"which position\" + manager.getTopPosition();\n System.out.println(manager.getTopPosition());\n //System.out.println(strangerList.get(manager.getTopPosition()-1).toString());\n //insert pos ACCOUNT -> DATABASE\n mRelationDB.addLike(mPI.getId(), managerlist.get(manager.getTopPosition()-1).getId());\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t((ImageView) v)\n\t\t\t\t.setImageResource(!followState ? R.drawable.heart\n\t\t\t\t\t\t: R.drawable.favourite);\n\t\t\t\tpost.setFavorite(!followState?1:0);\n\t\t\t\tmHandler.obtainMessage(!followState?3:4, post_id)\n\t\t\t\t.sendToTarget();\n\t\t\t}", "public void updateDislike(DatumC datum) {\n datum.getLikes().setUserLike(false);\n notifyItemChanged(this.arrayList.indexOf(datum), datum);\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (isLiked) {\n if (dataSnapshot.child(post_key).hasChild(firebaseAuth.getCurrentUser().getUid())) {\n like_database.child(post_key).child(firebaseAuth.getCurrentUser().getUid()).removeValue();\n isLiked = false;\n\n } else {\n like_database.child(post_key).child(firebaseAuth.getCurrentUser().getUid()).setValue(\"random\");\n isLiked = false;\n\n }\n }\n }", "public void update(DatumC datum) {\n datum.getLikes().setUserLike(true);\n notifyItemChanged(this.arrayList.indexOf(datum), datum);\n }", "public static void colocarLikes(int num) throws IOException, InterruptedException {\n\n int contador = 1;\n int likes = 0;\n String like = \"\";\n\n if(num != 0){\n\n try {\n x = new Scanner(new File(user+\".txt\"));\n } \n catch(Exception e){\n System.out.println(\"Ficheiro nao encontrado\");\n TimeUnit.SECONDS.sleep(2);\n verFeed();\n return;\n }\n\n while(x.hasNext()){\n\n String a = x.next();\n String b = x.next();\n String line = \"\", oldtext = \"\",linha=\"\", newTexto=\"\";\n\n File topico = new File(a+\".txt\");\n FileWriter likesWriter = new FileWriter(a+\".txt\",true); // alterar o valor de likes na mensagem do topico desse ficheiro\n\n\n y = new Scanner(new File(a+\".txt\"));\n \n BufferedReader read = new BufferedReader(new FileReader(topico)); // ler as mensagens do topico\n\n while((line = read.readLine()) != null) \n {\n\n oldtext += line + \"\\r\\n\";\n\n String aa = y.next(); // nome de utilizador\n String ab = y.next(); // numeros de likes\n y.nextLine();\n\n PrintWriter pw = new PrintWriter(a+\".txt\");\n\n if(contador != num){\n likesWriter.write(line+\"\\n\");\n }\n\n\n if(contador == num){ // quando chegar à linha da mensagem que quer alterar\n linha = line + \"\\n\";\n likes = Integer.parseInt(ab);\n likes++; // incrementar o numero de likes em 1\n like = Integer.toString(likes);\n String newLinha = linha.replaceAll(ab,like);\n likesWriter.write(newLinha);\n System.out.println(\"Like colocado!\\n\");\n }\n contador++;\n }\n likesWriter.close();\n }\n }\n }", "void addDeprecatedBookNo(Object newDeprecatedBookNo);", "private void removeFromFavorites() {\n favoriteBool = false;\n preferencesConfig.writeRemoveFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Removed from favorites\", Toast.LENGTH_SHORT).show();\n\n }", "public void toggleFavorite() {\n setFavorite(!mFavorite);\n }", "public void addBook(Book book)\r\n\t{\r\n\t\tList<Book> oldValue = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\titems.add(book);\r\n\t\tfirePropertyChange(\"books\", oldValue, items);\r\n\t\tfirePropertyChange(\"itemsCount\", oldValue.size(), items.size());\r\n\t}", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void setIcon(Button buttonPlayed){\n if(game.getPlayerTurn() == player1){\n buttonPlayed.setBackgroundResource(drawable.o);\n buttonPlayed.setEnabled(false);\n }\n else{\n buttonPlayed.setBackgroundResource(drawable.cross);\n buttonPlayed.setEnabled(false);\n }\n }", "public void appendToLikedCars(String likedCars);", "@Override\n public void onBindViewHolder(final MyHolder holder, int position) {\n\n String imgName = houses.get(position).getImg();\n holder.img.setImageBitmap(string_toImage(imgName));\n //binding data to views\n holder.posTxt.setText(c.getString(R.string.money_sign)+houses.get(position).getPos());\n holder.nameTxt.setText(houses.get(position).getName());\n\n\n if(houses.get(position).getBookmarked()==null) { //if bookmark is null, this is a new object and its defualt is now set to false\n houses.get(position).setBookmarked(false);\n }\n //chcking bool bookmark value set as bookmarked_house or unbookmarked_hosue image\n if(houses.get(position).getBookmarked()) {\n holder.bookmarkbutton.setImageResource(R.drawable.bookmarked_vector);\n }else {\n holder.bookmarkbutton.setImageResource(R.drawable.unbookmarked_vector);\n }\n\n //click listener from custom ItemCLickListener\n holder.setItemClickListener(new ItemClickListener() {\n @Override\n public void onItemClick(View v, int pos) {\n switch (v.getId()) {\n case R.id.contactButton://saving email and phone to go to messages page\n savePreferences(\"phone_number\",houses.get(pos).getPhone());\n BottomNavigationView bottomNavigationView = (BottomNavigationView) ((AppCompatActivity)c).findViewById(R.id.bottom_bar);\n bottomNavigationView.setSelectedItemId(R.id.m);\n final Fragment messageFrag = new Message_page();\n ((AppCompatActivity)c).getSupportFragmentManager().beginTransaction().setReorderingAllowed(true)\n .replace(R.id.fragmentContent, messageFrag, null).addToBackStack(null).commit();\n break;\n case R.id.bookmarkButton://setting bookmark true or not, with database writes and reads\n\n if(houses.get(pos).getBookmarked()) {\n //if currently true, set to false set image as unbookmarked\n refBookmarkedHouses.child(\"userHouses\").child(houses.get(pos).getName()).child(\"bookmarked\").setValue(false);\n holder.bookmarkbutton.setImageResource(R.drawable.unbookmarked_vector);\n //then remove from bookmarks\n refBookmarkedHouses.child(\"userBookmarkedHouses\").child(houses.get(pos).getName()).removeValue();\n\n }else {\n //if currently false, set to true and set image as bookmarked\n refBookmarkedHouses.child(\"userHouses\").child(houses.get(pos).getName()).child(\"bookmarked\").setValue(true);\n holder.bookmarkbutton.setImageResource(R.drawable.bookmarked_vector);\n //then add to bookmarks\n House p = new House(houses.get(pos).getName(), houses.get(pos).getPos(),houses.get(pos).getImg(),houses.get(pos).getPhone(),true);\n refBookmarkedHouses.child(\"userBookmarkedHouses\").child(houses.get(pos).getName()).setValue(p);\n\n }\n break;\n } //end of switch statement\n }\n\n });//end of item click listener aka button functionality\n\n }", "public boolean likesPastebin();", "public static boolean addLikedSongs(LikedSongsDto details) {\n\t\tSongsDao dao = new SongsDao();\n\t\treturn dao.addLikedSongs(details);\n\t}", "public long addFavPair(Pair pair) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues cv = new ContentValues();\n cv.put(FavoriteEntry.SHIRT_ID, pair.getShirt().getId());\n cv.put(FavoriteEntry.TROUSER_ID, pair.getTrouser().getId());\n\n try {\n return db.insertOrThrow(FavoriteEntry.TABLE_NAME, null, cv);\n } catch (SQLException e) {\n Log.d(TAG, \"Could not insert to database! \" + e);\n return -1;\n }\n }", "public boolean likeClue(Clue clue) {\n boolean update = false;\n\n // If the current clue is contained in the list of liked clues\n if(mainActivity.mLikedClues.size() > 0) {\n if (mainActivity.mLikedClues.get(clue.getId()) != null) {\n return false;\n } else {\n update = true;\n }\n }\n else\n update = true;\n\n\n if (update){\n\n // Update the clue on the server, and add it to the users list\n String message = \"OtherFragmentGrid - UpdateClue\";\n String route = \"/clues/\" + clue.getId() + \"/update\";\n int method = Request.Method.PUT;\n\n HashMap<String, String> params = new HashMap<String, String>();\n HTTPRequest request;\n\n params.put(\"_id\", clue.getId());\n params.put(\"ownerId\", clue.getOwnerId());\n params.put(\"question\", clue.getQuestion());\n params.put(\"answer\", clue.getAnswer());\n params.put(\"updated\", mainActivity.getCurrentDate());\n params.put(\"orderNumber\", Integer.toString(clue.getOrderNumber()));\n params.put(\"likes\", Integer.toString(clue.getLikes() + 1));\n JSONObject req = new JSONObject(params);\n\n request = new HTTPRequest(message,\n mainActivity.HOST + mainActivity.PORT + route,\n method,\n req);\n\n mainActivity.mHTTPHelper.sendToServer(request);\n\n mainActivity.updateLikedClues(clue);\n\n // Send push notification to the owner of the clue\n if(!mSocket.connected()) {\n mSocket.connect();\n }\n HashMap<String, String> msg = new HashMap<String, String>();\n\n msg.put(\"senderUsername\", mainActivity.myProfile.getUsername());\n msg.put(\"senderId\", mainActivity.myProfile.getId());\n msg.put(\"recipientId\", connectionId);\n msg.put(\"clueId\", clue.getId());\n msg.put(\"clueText\", clue.getQuestion() + \" \" + clue.getAnswer());\n JSONObject msgJSON = new JSONObject(msg);\n mSocket.emit(\"likeNotification\", msgJSON);\n\n // Update the likes_given in the shared preferences and check for the achievement\n mainActivity.likes_given = mainActivity.mSettings.getInt(\"likes_given\", mainActivity.likes_given);\n mainActivity.likes_given++;\n mainActivity.mEditor.putInt(\"likes_given\", mainActivity.likes_given);\n mainActivity.mEditor.commit();\n mainActivity.progressAchievements(\"likes_given\");\n\n // ********************************************************\n // Store like to the database on the server\n String tag = \"Add Like\";\n String route2 = \"/likes\";\n int method2 = Request.Method.POST;\n\n HashMap<String, String> params2 = new HashMap<String, String>();\n HTTPRequest request2;\n\n params2.put(\"_ownerId\", mainActivity.myProfile.getId());\n params2.put(\"_clueId\", clue.getId());\n params2.put(\"date\", mainActivity.getCurrentDate());\n JSONObject req2 = new JSONObject(params2);\n\n request2 = new HTTPRequest(tag,\n mainActivity.HOST + mainActivity.PORT + route2,\n method2,\n req2);\n\n mainActivity.mHTTPHelper.sendToServer(request2);\n // ********************************************************\n }\n\n return true;\n\n }", "public void setLikedcount(Integer likedcount) {\n this.likedcount = likedcount;\n }", "@Override\n public void onClick(View v) {\n FavouriteDatabase fd = new FavouriteDatabase();\n fd.addToFavouritesList(catID);\n Toast.makeText(getContext(), \"Added to your Favourites\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t/**\n\t\t * Get Extra values\n\t\t */\n\t\tBundle b = getIntent().getExtras();\n\t\tif (b != null) {\n\t\t\tKEY_IS_SHARING = b.getBoolean(Const.KEY_IS_SHARING, false);\n\t\t\tKEY_IS_SHARE_SONG = b.getInt(Const.KEY_SHARE_TYPE,\n\t\t\t\t\tShareUtility.TYPE_SONG) == ShareUtility.TYPE_SONG;\n\t\t\tSHARING_OBJECT_ID = b.getInt(Const.KEY_SHARE_VALUE, 0);\n\t\t\tif (KEY_IS_SHARING) {\n\t\t\t\tbtn_Addfriend\n\t\t\t\t.setBackgroundResource(R.drawable.selector_button_share);\n\t\t\t\tbtn_Addfriend.setText(\"Chia sẻ\");\n\t\t\t}\n\t\t}\n\t\tif (KEY_IS_SHARING || KEY_BACK_FROM_SHARE\n\t\t\t\t|| !MSISDN.equals(datastore.getMsisdn())) {\n\t\t\tfriend_adapter = null;\n\t\t\tfan_adapter = null;\n\t\t}\n\t\tif (KEY_BACK_FROM_PROFILE || !MSISDN.equals(datastore.getMsisdn())) {\n\t\t\tswitch (tab_interested_fan.getCheckedRadioButtonId()) {\n\t\t\tcase R.id.btn_Interested:\n\t\t\t\tif(KEY_IS_SEARCHING) {\n\t\t\t\t\tfriend_search_adapter = null;\n\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_IDOL_SEARCHING, 0, false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfriend_adapter = null;\n\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_IDOL_LISTING, 0, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.btn_Fan:\n\t\t\t\tif(KEY_IS_SEARCHING) {\n\t\t\t\t\tfan_search_adapter = null;\n\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_FAN_SEARCHING, 0, false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfan_adapter = null;\n\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_FAN_LISTING, 0, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else\n\t\t\tLoadListFriend(Const.TYPE_FRIEND_IDOL_LISTING, 0, false);\n\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\taddLikeRelationship(jsonArray.getJSONObject(index).getInt(\"postid\"),index);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\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}", "private void showFavouriteIcon(boolean show) {\n faveIcon.setVisible(show);\n defaultIcon.setVisible(!show);\n sortIcon.setVisible(show);\n }", "public void appendToLikedCars(List<String> likedCars);", "private boolean addBook(Book book) {\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif (items.get(i).keyEquals(book))\n\t\t\t\treturn false;\n\t\titems.add(book);\n\t\treturn true;\n\t}", "private void updateBadge() {\n badgeDrawable.setNumber((inbox == null) ? 0 : inbox.getCountUnread());\n }", "public void addToLikedCars(List<String> likedCars);", "public void addRecentVisited(int position) {\n SharedPreferences sharedPref1 = getContext().getSharedPreferences(\"recentVisited\", Context.MODE_PRIVATE);\n Boolean removeOld=false;\n int toRemove=0;\n Log.d(\"size\", userName.size()+\"\");\n int count = sharedPref1.getInt(\"size\",0);\n for(int i=0;i<count+1;i++){\n\n // checks if user is in shared preferences.\n if(Objects.equals(sharedPref1.getString(\"uid_\" + i, \"null\"), uid.get(position))){\n toRemove=i;\n removeOld=true;\n }\n }\n SharedPreferences.Editor editor = sharedPref1.edit();\n if(removeOld){\n editor.remove(\"uid_\"+toRemove);\n editor.remove(\"name_\"+toRemove);\n }\n editor.putInt(\"size\",(count+1));\n editor.putString(\"name_\" + (count+1), userName.get(position));\n editor.putString(\"uid_\" + (count+1), uid.get(position));\n\n editor.apply();\n\n }", "public void onClickFavoriteButton() {\n String snackBarText;\n if (isFavorite) {\n diskIO.execute(new Runnable() {\n @Override\n public void run() {\n mDatabase.movieDao().delete(movie);\n }\n });\n isFavorite = false;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_border_white_24px);\n snackBarText = getString(R.string.remove_favorite);\n } else {\n diskIO.execute(new Runnable() {\n @Override\n public void run() {\n mDatabase.movieDao().insert(movie);\n }\n });\n isFavorite = true;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_white_24px);\n snackBarText = getString(R.string.add_favorite);\n }\n Snackbar.make(mBinding.coordinatorLayout, snackBarText, Snackbar.LENGTH_SHORT).show();\n }", "public void onitemclickmethod(int position) {\n\n position_of_image = position;\n int num1 = uploads.get(position_of_image).getNumber_likes();\n uploads.get(position_of_image).setNumber_likes(num1 + 1);\n\n String id = uploads.get(position_of_image).getId();\n int number = uploads.get(position_of_image).getNumber_likes();\n String name = uploads.get(position_of_image).getName();\n url = uploads.get(position_of_image).getImageUrl();\n\n //updating the tables\n\n Map<String, Object> map = new HashMap<>();\n map.put(id, new Upload(name, url, number, id));\n // mDatabaseRef.child(id).child(\"number_likes\").setValue(number);\n uploads.clear();\n mDatabaseRef.updateChildren(map);\n mRecyclerView.smoothScrollToPosition(position_of_image);\n\n }", "@Override\n public void onClick(View view) {\n if (post.isLikedByUser) {\n removeLike(post);\n } else {\n likePost(post);\n }\n }", "public void handleStar(boolean isFavorite) {\n isLoadingFinished = true;\n isLoadingFinished_isFavorite = isFavorite;\n if (mStarMenuItem == null) {\n return;\n }\n //endof workaround\n mStarMenuItem.setVisible(true);\n if (isFavorite) { //column in database is null when not starred.\n mStarMenuItem.setChecked(true);\n mStarMenuItem.setTitle(R.string.action_star_remove);\n mStarMenuItem.setIcon(android.R.drawable.btn_star_big_on);\n //Google Play Games\n try {\n Games.Achievements.increment(apiClientGetter.getGoogleApiClient(), getActivity().getString(R.string.achievement_personal_schedule), 1);\n } catch(IllegalStateException e){\n //This happens when GoogleApiClient is not connected yet.\n //Ignore this error, user gets Achievement next time.\n }\n } else {\n mStarMenuItem.setChecked(false);\n mStarMenuItem.setTitle(R.string.action_star_add);\n mStarMenuItem.setIcon(android.R.drawable.btn_star_big_off);\n }\n persistFavorite(isFavorite);\n }", "private void deleteIcons() {\n Uri uri = DatabaseMap.PlaceEntry\n .buildPlaceByFavoriteUri(getResources().getInteger(R.integer.favorite_add));\n String[] projection = {DatabaseMap.PlaceEntry.PLACE_ICON_FILE_NAME};\n Cursor cursor = getContentResolver().query(uri, projection, null, null, null);\n ArrayList<String> favoritesIcons = new ArrayList<String>();\n\n while (cursor.moveToNext()) {\n favoritesIcons.add(cursor.getString(cursor.getColumnIndex(DatabaseMap.PlaceEntry.PLACE_ICON_FILE_NAME)));\n }\n\n String[] files = fileList();\n for (String fileName : files) {\n if (!favoritesIcons.contains(fileName))\n deleteFile(fileName);\n }\n }", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_fav) {\n FavoritesDataSource dataSource = new FavoritesDataSource(getBaseContext());\n dataSource.open();\n if(isFav){\n //remove from favorites\n dataSource.deleteFromFavorites(placeid);\n item.setIcon(R.drawable.ic_heart_outline_white);\n Toast.makeText(getBaseContext(),placeName+\" was removed from favorites\",Toast.LENGTH_SHORT).show();\n isFav = false;\n }else{\n //add to favorites\n Place place = new Place(placeid,placeName,address,true,picURL);\n dataSource.addToFavorites(place);\n item.setIcon(R.drawable.ic_heart_fill_white);\n Toast.makeText(getBaseContext(),placeName+\" was added to favorites\",Toast.LENGTH_SHORT).show();\n isFav = true;\n }\n dataSource.close();\n return true;\n }else if(id == R.id.action_share){\n //open twitter url\n String tweetParams = \"text=\"+ URLEncoder.encode(\"Check out \"+placeName+\" located at \"+address+\". Website \")+\"&url=\"+URLEncoder.encode(tweetURL)+\"&hashtags=TravelAndEntertainmentSearch\";\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://twitter.com/intent/tweet?\"+tweetParams));\n startActivity(browserIntent);\n return true;\n }else if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void premium_ui_Bookmark_Row(RecyclerView.ViewHolder viewHolder, ArticleBean bean, int position) {\n BookmarkPremiumViewHolder holder = (BookmarkPremiumViewHolder) viewHolder;\n\n holder.authorName_Txt.setText(ContentUtil.getAuthor(bean.getAuthor()));\n holder.title.setText(bean.getArticletitle());\n // Section Name\n String sectionName = bean.getArticleSection();\n if (sectionName == null || TextUtils.isEmpty(sectionName)) {\n sectionName = bean.getSectionName();\n }\n\n sectionName = ResUtil.capitalizeFirstLetter(sectionName);\n holder.sectionName.setText(sectionName);\n // Publish Date\n String formatedPubDt = CommonUtil.fomatedDate(bean.getPubDateTime(), mFrom);\n holder.time_Txt.setText(formatedPubDt);\n\n holder.bookmarkProgressBar.setVisibility(View.GONE);\n holder.share_Img.setVisibility(View.GONE);\n\n isExistInBookmark(holder.bookmark_Img.getContext(), bean, holder.bookmark_Img);\n\n PicassoUtil.loadImageWithFilePH(holder.itemView.getContext(), holder.image, ContentUtil.getThumbUrl(bean.getThumbnailUrl()));\n\n holder.bookmark_Img.setOnClickListener(v -> {\n if (bean.getGroupType() == null || bean.getGroupType().equals(NetConstants.G_BOOKMARK_DEFAULT)) {\n local_removeBookmarkFromApp(v.getContext(), bean.getArticleId(), bean, holder.bookmarkProgressBar, holder.bookmark_Img, position, mFrom);\n } else if (NetUtils.isConnected(v.getContext()) && bean.getGroupType().equals(NetConstants.G_BOOKMARK_PREMIUM)) {\n premium_updateBookmarkFavLike(holder.bookmarkProgressBar, holder.bookmark_Img, holder.bookmark_Img.getContext(), position, bean, \"bookmark\");\n } else {\n Alerts.noConnectionSnackBar(v, (AppCompatActivity) v.getContext());\n }\n }\n );\n\n holder.share_Img.setOnClickListener(v -> {\n SharingArticleUtil.shareArticle(v.getContext(), bean);\n }\n );\n\n holder.itemView.setOnClickListener(v -> {\n if (PremiumPref.getInstance(holder.itemView.getContext()).isUserAdsFree()) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_PREMIUM, bean.getArticleUrl(), position, bean.getArticleId());\n } else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom, bean.getArticleUrl(), position, bean.getArticleId());\n }\n } else {\n IntentUtil.openSubscriptionActivity(holder.itemView.getContext(), THPConstants.FROM_SUBSCRIPTION_EXPLORE);\n }\n THPFirebaseAnalytics.setFirbaseAnalyticsEvent(holder.itemView.getContext(), \"Action\", ResUtil.capitalizeFirstLetter(mFrom) + \" clicked : \" + bean.getArticleId() + \" : \" + bean.getTitle(), ResUtil.capitalizeFirstLetter(mFrom) + \" List Screen\");\n\n if (getSnackbar() != null && getSnackbar().isShown()) {\n getSnackbar().dismiss();\n }\n }\n );\n }", "boolean setLike(Integer id, Integer idUser);", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View v) {\n saveRoundSetting();\n saveMembers();\n sharedpreferencesAddname= getSharedPreferences(\"AddFriend\" , MODE_PRIVATE);\n final SharedPreferences.Editor editorFR = sharedpreferencesAddname.edit();\n for(int i =0 ; i<3;i++)\n {\n editorFR.putInt(\"friendid\"+i , -1);\n editorFR.commit();\n }\n\n\n Intent NextScreen = new Intent(RoundSetting.this, AddFriends.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n saveRoundSetting();\n saveMembers();\n sharedpreferencesAddname= getSharedPreferences(\"AddFriend\" , MODE_PRIVATE);\n final SharedPreferences.Editor editorFR = sharedpreferencesAddname.edit();\n for(int i =0 ; i<3;i++)\n {\n editorFR.putInt(\"friendid\"+i , -1);\n editorFR.commit();\n }\n\n\n Intent NextScreen = new Intent(RoundSetting.this, AddFriends.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n View vi = convertView;\n\n if(tasks.get(position) != null){\n\n vi = inflater.inflate(R.layout.task_list_item_summary_done, null);\n\n final TaskRecord tr = tasks.get(position);\n\n ((TextView) vi.findViewById(R.id.taskListItemSummary_title)).setText(tr.title);\n\n final View finalVi = vi;\n tr.parseObject.getParseObject(\"user\").fetchIfNeededInBackground(new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject object, ParseException e) {\n\n ((TextView) finalVi.findViewById(R.id.taskListItemSummary_description)).setText(object.getString(\"name\"));\n }\n });\n\n final View view = vi;\n\n\n final ImageButton likeButton = (ImageButton) vi.findViewById(R.id.taskListItemSummary_like_button);\n if(tr.parseObject.getParseObject(\"user\").getObjectId().equals(ParseUser.getCurrentUser().getObjectId()) || !tr.done || tr.history)likeButton.setVisibility(View.GONE);\n final ImageButton dislikeButton = (ImageButton) vi.findViewById(R.id.taskListItemSummary_dislike_button);\n if(tr.parseObject.getParseObject(\"user\").getObjectId().equals(ParseUser.getCurrentUser().getObjectId()) || !tr.done || tr.history)dislikeButton.setVisibility(View.GONE);\n\n final ArrayList <String> likes = new ArrayList<String>();\n List <String> lLikes = tr.parseObject.getList(\"likes\");\n if(lLikes != null)likes.addAll(lLikes);\n\n final ArrayList <String> dislikes = new ArrayList<String>();\n List <String> lDislikes = tr.parseObject.getList(\"dislikes\");\n if(lDislikes != null)dislikes.addAll(lDislikes);\n\n likeButton.setBackgroundColor(vi.getResources().getColor( likes.contains(ParseUser.getCurrentUser().getObjectId()) ? R.color.colorGreen : R.color.colorInactive));\n dislikeButton.setBackgroundColor(vi.getResources().getColor( dislikes.contains(ParseUser.getCurrentUser().getObjectId()) ? R.color.colorRed : R.color.colorInactive));\n\n\n if(tr.history){\n ImageView checkbox = (ImageView) vi.findViewById(R.id.taskListItemSummary_checkbox);\n checkbox.setVisibility(View.VISIBLE);\n if(tr.done && likes.size()>=dislikes.size())checkbox.setImageDrawable(vi.getResources().getDrawable(R.drawable.ic_check_box_done));\n else checkbox.setImageDrawable(vi.getResources().getDrawable(R.drawable.ic_check_box_empty));\n }\n\n likeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n if (!likes.contains(ParseUser.getCurrentUser().getObjectId())) {\n likes.add(ParseUser.getCurrentUser().getObjectId());\n }\n\n dislikes.remove(ParseUser.getCurrentUser().getObjectId());\n\n tr.parseObject.put(\"likes\", likes);\n tr.parseObject.put(\"dislikes\", dislikes);\n\n tr.parseObject.saveInBackground();\n\n likeButton.setBackgroundColor(v.getResources().getColor(likes.contains(ParseUser.getCurrentUser().getObjectId()) ? R.color.colorGreen : R.color.colorInactive));\n dislikeButton.setBackgroundColor(v.getResources().getColor(dislikes.contains(ParseUser.getCurrentUser().getObjectId()) ? R.color.colorRed : R.color.colorInactive));\n\n\n }\n });\n\n dislikeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n if (!dislikes.contains(ParseUser.getCurrentUser().getObjectId())) {\n dislikes.add(ParseUser.getCurrentUser().getObjectId());\n }\n\n likes.remove(ParseUser.getCurrentUser().getObjectId());\n\n tr.parseObject.put(\"likes\", likes);\n tr.parseObject.put(\"dislikes\", dislikes);\n\n tr.parseObject.saveInBackground();\n\n likeButton.setBackgroundColor(v.getResources().getColor(likes.contains(ParseUser.getCurrentUser().getObjectId()) ? R.color.colorGreen : R.color.colorInactive));\n dislikeButton.setBackgroundColor(v.getResources().getColor(dislikes.contains(ParseUser.getCurrentUser().getObjectId()) ? R.color.colorRed : R.color.colorInactive));\n\n\n }\n });\n\n }else{\n vi = inflater.inflate(R.layout.task_list_header, null);\n\n ((TextView) vi.findViewById(R.id.header_title_textView)).setText(heders.get(position));\n }\n\n return vi;\n }", "@Override\n public void onClick(View v) {\n Double rate = Double.valueOf(mRatingBar.getRating());\n analyticsManager.trackBookRating(mBook,rate);\n String user = FirebaseAuth.getInstance().getCurrentUser().getDisplayName();\n String text = mText.getText().toString();\n mReviewsRef.push().setValue(new Review(rate,user,text));\n\n mSumReviews++;\n mSumRating+=Double.valueOf(mRatingBar.getRating());\n mDatabase.getReference(\"Reviews/\"+bookKey+\"/rating\").setValue(mSumRating/mSumReviews);\n finish();\n }", "@Override\n public void onClick(final View view) {\n final ParseRelation<ParseUser> likers = post.getRelation(\"likers\");\n final ParseQuery<ParseUser> usrLikers = likers.getQuery();\n usrLikers.findInBackground(new FindCallback<ParseUser>() {\n @Override\n public void done(List<ParseUser> objects, ParseException e) {\n if (e == null) {\n Log.i(\"USERS:\", \"Looking for current user\");\n for (int i = 0; i < objects.size(); i++) {\n Log.i(\"USERS:\", objects.get(i).getUsername());\n if (objects.get(i).getObjectId().equals(ParseUser.getCurrentUser().getObjectId())) {\n liked[0] = true;\n break;\n }\n }//end loop\n if (liked[0]) {\n unlikePost(view,post,likers,liked);\n } else {\n likePost(view,post,likers);\n }\n }//end works\n }//end done\n });\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (((MemeLab.get(getActivity())).getMemes()).contains(\n MemeLab.get(getActivity()).getMeme(selectedImagePath)) ||\n ((MemeLab.get(getActivity())).getMyanmarMemes()).contains(\n MemeLab.get(getActivity()).getMeme(selectedImagePath)) ||\n (MemeLab.get(getActivity())\n .getCustomMemes()\n .contains(MemeLab.get(getActivity()).getMeme(selectedImagePath)))) {\n if (isChecked) {\n Toast.makeText(getActivity(), \"added to Favorites\", Toast.LENGTH_SHORT).show();\n sendResult(FAVORITE_RESULT, true);\n }\n if (!isChecked) {\n Toast.makeText(getActivity(), \"removed from Favorites\", Toast.LENGTH_SHORT).show();\n sendResult(FAVORITE_RESULT, false);\n }\n } else {\n Toast.makeText(getActivity(), \"cannot add Custom images to Favorites\", Toast.LENGTH_SHORT)\n .show();\n }\n }", "private void changeIcon(SingleDocumentModel model) {\n\t\tif (model.isModified()) {\n\t\t\tsetIconAt(models.indexOf(model), createIcon(\"icons/red.png\"));\n\t\t}else {\n\t\t\tsetIconAt(models.indexOf(model), createIcon(\"icons/green.png\"));\n\t\t}\n\t}", "public void addBook(Book book) {\n \tset.add(book);\n }", "public void addBook(Book book) {\n\t\tboolean notFound = true;\n\t\tfor (Item item : items) {\n\t\t\tif(item.getName().equals(book.getName())) {\n\t\t\t\t// Found\n\t\t\t\tnotFound = false;\n\t\t\t\titem.updateQuantity();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(notFound) {\n\t\t\tItem item = new Item(book, 1);\n\t\t\titems.add(item);\n\t\t}\n\t}", "BlogPost updateLikes(BlogPost blogPost, User user);", "@Override\n public void onBindViewHolder(@NonNull final ContactoViewHolder contactoViewHolder, int position) {//setear valores de la lista\n final Mascota contacto = contactos.get(position);\n final ConstructorMascotas constructorMascotas = new ConstructorMascotas(activity);\n\n contactoViewHolder.imgFoto.setImageResource(contacto.getFoto());\n contactoViewHolder.tvNombreCV.setText(contacto.getNombre());\n\n if(activity.getClass().getName().equals(MainActivity.class.getName())){\n if(fragment.getClass().getName().equals(ListOfPetsFragment.class.getName())){\n contacto.setLikes(constructorMascotas.getLikes(contacto));\n // Elemento de likes\n contactoViewHolder.tvRaitingCV.setText(String.valueOf(contacto.getLikes()));\n activity.registerForContextMenu(contactoViewHolder.imgFoto);\n contactoViewHolder.tvNombreCV.setWidth(700);\n\n // Botón para darle like\n contactoViewHolder.imgRaitingBone.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n contacto.setLikes(contacto.getLikes()+1);\n constructorMascotas.insertLike(contacto);\n contactoViewHolder.tvRaitingCV.setText(String.valueOf(contacto.getLikes()));\n Toast.makeText(activity,\"Like for \"+contacto.getNombre(),Toast.LENGTH_SHORT).show();\n }\n });\n }else if (fragment.getClass().getName().equals(PerfilPetFragment.class.getName())){\n contactoViewHolder.tvRaitingCV.setText(String.valueOf(contacto.getLikes()));\n contactoViewHolder.imgRaitingBone.setVisibility(View.INVISIBLE);\n }\n }else if(activity.getClass().getName().equals(RatingActivity.class.getName())){\n contactoViewHolder.tvRaitingCV.setText(String.valueOf(contacto.getLikes()));\n contactoViewHolder.imgRaitingBone.setVisibility(View.INVISIBLE);\n }\n\n /*\n contactoViewHolder.imgRaitingBone.setImageResource(contacto.getLikes());\n contactoViewHolder.imgBoneYellow.setImageResource(contacto.getHuesoYellow());\n */\n\n\n\n\n\n }", "public void addBook(Book b){\n\t\tbookMap.get(b.getTitle()).add(b);\n\t}", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "private void updatePreferenceIcon() {\n int alarmVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_ALARM);\n if (mPreference != null) {\n mPreference.showIcon(alarmVolume == 0 ?R.drawable.ic_audio_alarm_mute : R.drawable.ic_audio_alarm);\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n prefs.edit().putBoolean(\"prefs_shown_star_tip\", true).apply();\n //Using apply (instead of commit), because we don't want to stall the UI-thread.\n //apply will make the change in memory, and then save it to persistent story\n //on a background thread.\n }", "public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}", "public void like(Long time, String liker) {\n\t for(Post post: posts) {\n\t\t if(post.getTime() == time) {\n\t\t\t post.addLike(liker);\n\t\t\t return;\n\t\t }\n\t }\n }", "public CF_ViewHolder(View itemView) {\n super(itemView);\n name = itemView.findViewById(R.id.name);\n likes = itemView.findViewById(R.id.likes);\n\n LL = itemView.findViewById(R.id.LL);\n\n C1 = itemView.findViewById(R.id.color1);\n C2 = itemView.findViewById(R.id.color2);\n C3 = itemView.findViewById(R.id.color3);\n\n fav = itemView.findViewById(R.id.fav);\n pallteby = itemView.findViewById(R.id.plateby);\n\n// fav.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// if (!loved) {\n// String token;\n// SharedPreferences prefs = context.getSharedPreferences(Config.MY_PREFS_NAME, MODE_PRIVATE);\n// token = prefs.getString(\"token\", null);\n//\n// if (token == null) { //if user is signed in only then make him like the product\n// Toast.makeText(context, \"You need to sign in.\", Toast.LENGTH_SHORT).show();\n//\n// } else {\n// fav.setImageResource(context.getResources().getIdentifier(R.mipmap.favorite_selected + \"\", \"drawable\", context.getPackageName()));\n// loved = true;\n// loveCall(\"loved\", PID);\n// }\n//\n//\n// }\n// if (loved) {\n// fav.setImageResource(R.mipmap.top_favourite);\n// loved = false;\n// loveCall(\"not_loved\", PID);\n// }\n// }\n// });\n\n }", "@Override\n\tpublic void bookLike(String isbn, String userid) {\n\t\tMemberManage memberManage=new MemberManage();\n\t\tmemberManage.setNum(isbn);\n\t\tmemberManage.setUserid(userid);\n\t\tmemberManageDAO.bookLike(memberManage);\n\t}", "public void onClicklistenerForFavorites(View view){\n if(isAlreadyFavorteis() == true){\n Boolean hasDeleted = dBhelper.deleteFavortiesByCategoryId(userAskAbout,inputSpinnerOne.getSelectedItemPosition(),inputSpinnertow.getSelectedItemPosition());\n if(hasDeleted == true) {\n Toast.makeText(getApplicationContext(), \"Your data has deleted in Favorties\", Toast.LENGTH_LONG).show();\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites);\n isAlreadyFavorties = false;\n }\n\n }else\n {\n favortiesMethed();\n isAlreadyFavorties = true;\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites_pressed);\n }\n\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n img.setImageResource(R.drawable.like_clickled);\n text.setText(\"Liked\");\n text.setTextColor(Color.parseColor(\"#0090FF\"));\n\n } else {\n img.setImageResource(R.drawable.like);\n text.setText(\"Like\");\n text.setTextColor(Color.parseColor(\"#000000\"));\n }\n }", "@Override\n public View getView(final int position, View view, ViewGroup arg2) {\n if (view == null) {\n view = inflater.inflate(R.layout.sqtj_item, null);\n }\n\n /* ll_shequn_shequ_item.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if (iv_shequn_shequ_item.getDrawable().getCurrent().getConstantState().equals(getResources()\n .getDrawable(R.drawable.public_btn_like_current_3x).getConstantState())) {\n\n //当image1的src为R.drawable.A时,设置image1的src为R.drawable.B\n\n iv_shequn_shequ_item.setImageResource(R.drawable.public_btn_like_moren_3x);\n tv_shequn_dianzhan.setText(String.valueOf(Integer.valueOf(tv_shequn_dianzhan.getText().toString()) - 1));\n } else {\n //否则设置image1的src为R.drawable.A\n iv_shequn_shequ_item.setImageResource(R.drawable.public_btn_like_current_3x);\n tv_shequn_dianzhan.setText(String.valueOf(Integer.valueOf(tv_shequn_dianzhan.getText().toString()) + 1));\n }\n\n }\n });\n */\n\n\n return view;\n }", "private final void addToBook(Position pos, Move moveToAdd) {\n List<BookEntry> ent = bookMap.get(pos.zobristHash());\n if (ent == null) {\n ent = new ArrayList<BookEntry>();\n bookMap.put(pos.zobristHash(), ent);\n }\n for (int i = 0; i < ent.size(); i++) {\n BookEntry be = ent.get(i);\n if (be.move.equals(moveToAdd)) {\n be.count++;\n return;\n }\n }\n BookEntry be = new BookEntry(moveToAdd);\n ent.add(be);\n numBookMoves++;\n }", "void addMentionedIn(Hadith newMentionedIn);", "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "public void updateMute() {\n if (game.isMuted()) {\n mute.setIcon(muted);\n } else {\n mute.setIcon(unmuted);\n }\n }", "public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite);", "public void nextIcon() {\n Profile profile = null;\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n playerIcon.setOpacity(1);\n currentIndex++;\n if (currentIndex == 0) {\n playerIcon.setImage(icon0);\n } else if (currentIndex == 1) {\n playerIcon.setImage(icon1);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 2) {\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n playerIcon.setImage(icon2);\n\n } else if (currentIndex == 3) {\n playerIcon.setImage(icon3);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 4) {\n playerIcon.setImage(icon4);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 5) {\n playerIcon.setImage(icon5);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 6) {\n playerIcon.setImage(icon6);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 7) {\n playerIcon.setImage(icon0);\n currentIndex = 0;\n playerIcon.setOpacity(1);\n }\n }", "public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }" ]
[ "0.5942323", "0.59204286", "0.58048034", "0.5704944", "0.55647576", "0.5558586", "0.549651", "0.54421836", "0.54283965", "0.5421941", "0.5404735", "0.5355701", "0.52988446", "0.5246586", "0.5238688", "0.5219788", "0.52119577", "0.5211058", "0.5163624", "0.5157798", "0.51300496", "0.51289445", "0.5125225", "0.51252156", "0.5103434", "0.50970703", "0.5074464", "0.5073836", "0.50617653", "0.50359535", "0.50309414", "0.50213593", "0.50074774", "0.49891928", "0.4975338", "0.49031055", "0.48930237", "0.48630065", "0.48593467", "0.48497018", "0.48347494", "0.48312995", "0.4816059", "0.4814502", "0.47939655", "0.47592032", "0.475084", "0.47368103", "0.47154427", "0.47096443", "0.47069213", "0.47054538", "0.47014782", "0.46929938", "0.46894583", "0.46814367", "0.46806714", "0.46702096", "0.4670124", "0.46674827", "0.46673113", "0.46644467", "0.46585372", "0.46580455", "0.4657578", "0.46567774", "0.4655796", "0.46547428", "0.4645572", "0.46414784", "0.46400893", "0.46349123", "0.46349123", "0.4634542", "0.4630477", "0.46246877", "0.46230027", "0.4610583", "0.46097666", "0.46093854", "0.4609329", "0.46009743", "0.45964214", "0.45963857", "0.45907232", "0.45897925", "0.4584572", "0.45788684", "0.45767906", "0.45759115", "0.45723087", "0.45664597", "0.4565841", "0.456442", "0.456045", "0.45533213", "0.45277426", "0.45229796", "0.45098272", "0.45057118" ]
0.76503676
0
Submits comment Creates URI and URL string to request to add the comment. Then volley is used to ping the url and add comment to database. Edit Texts are also cleared.
public void addComment(View v) { //Get review views SimpleRatingBar rating = (SimpleRatingBar) mLeaveReview.findViewById(R.id.comment_h_rating); EditText title = (EditText) mLeaveReview.findViewById(R.id.comment_h_title); EditText comment = (EditText) mLeaveReview.findViewById(R.id.comment_h_body); //Set params SharedPreferences sharedPref = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE); VALUE_GID = currentBook.GID; VALUE_UID = sharedPref.getInt("UID", -1); VALUE_PASSWORD = sharedPref.getString("PASSWORD", null); VALUE_RATING = ((int) rating.getRating()); VALUE_TITLE = title.getText().toString(); VALUE_COMMENT = comment.getText().toString(); //Verify info if (VALUE_GID == null || VALUE_UID == -1) { ErrorUtils.errorDialog(this, "Error", "Information could not be retrieved from memory. Try logging out and logging back in."); return; } else if (VALUE_PASSWORD == null) { Toast.makeText(this, "No saved password was found. Please log out then log back in.", Toast.LENGTH_LONG).show(); } else if (VALUE_RATING <= 0 || VALUE_RATING > 5) { Toast.makeText(this, "Please select a rating", Toast.LENGTH_SHORT).show(); return; } //Build URI Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME) .authority(BASE_URL) .appendPath(PATH0) .appendPath(PATH1) .appendPath(PATH2) .appendQueryParameter(PARAM_ACTION, VALUE_ACTION_ADD_REVIEW) .appendQueryParameter(PARAM_GID, VALUE_GID) .appendQueryParameter(PARAM_UID, Integer.toString(VALUE_UID)) .appendQueryParameter(PARAM_PASSWORD, VALUE_PASSWORD) .appendQueryParameter(PARAM_RATING, Integer.toString(VALUE_RATING)); if (!(VALUE_TITLE.trim().length() == 0)) { builder.appendQueryParameter(PARAM_TITLE, VALUE_TITLE); } if (!(VALUE_COMMENT.trim().length() == 0)) { builder.appendQueryParameter(PARAM_COMMENT, VALUE_COMMENT); } builder.build(); String urlString = builder.toString(); downloadJSON(urlString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void submitComment(View view){\n //make url\n String url = \"\";\n try {\n url = App.baseURL + \"posts/comment/\" + URLEncoder.encode(forumPost.getId(), \"UTF-8\");\n } catch(UnsupportedEncodingException e) {\n Log.e(\"Error\", \"Caught encoding exception: \" + e);\n }\n\n //grab timestamp and comment content\n String commentContent = this.commentContent.getText().toString();\n //get timestamp since epoch\n long timeStamp = System.currentTimeMillis();\n String ts = Long.toString(timeStamp);\n\n //make JSON object with timestamp, author, and content\n JSONObject jsonObject = new JSONObject();\n try {\n jsonObject.put(\"content\", commentContent);\n jsonObject.put(\"author\", username);\n jsonObject.put(\"time\", ts);\n } catch(JSONException e) {\n Log.e(\"Error\", \"Caught JSON object exception: \" + e);\n }\n\n //make request\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, url, jsonObject, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n //get response status\n try {\n String responseStatus = response.getString(\"status\");\n Log.d(\"status responcse: \", responseStatus);\n //check status\n if(responseStatus.equals(\"200\") || responseStatus.equals(\"OK\")){\n //request was good\n //make success toast\n Toast success = Toast.makeText(CreateComment.this, R.string.create_comment_success, Toast.LENGTH_SHORT);\n success.setGravity(Gravity.BOTTOM, 0, 50);\n success.show();\n //create intent and redirect back to view post page\n Intent intent = new Intent(CreateComment.this, ViewPost.class);\n Bundle bundle = new Bundle(8);\n\n bundle.putString(\"username\", username);\n bundle.putString(\"title\", forumPost.getTitle());\n bundle.putString(\"author\", forumPost.getAuthor());\n bundle.putString(\"id\", forumPost.getId());\n bundle.putString(\"time\", forumPost.getCreatedAt());\n bundle.putString(\"content\", forumPost.getContent());\n bundle.putString(\"lastEditTime\", forumPost.getLastModified());\n bundle.putString(\"timeRaw\", forumPost.getTimeRaw());\n\n intent.putExtras(bundle);\n startActivity(intent);\n }\n } catch(JSONException e) {\n Log.e(\"Error\", \"Caught JSON object exception: \" + e);\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error\", \"Volley error submitting comment POST: \" + error);\n }\n });\n\n //submit request\n queue.add(request);\n }", "private void sendDataToServer() {\n\t\tcommentView = (EditText) findViewById(R.id.editComment);\n\t\tString commentToBePosted = commentView.getText().toString();\n\n\t\tboolean valid;\n\t\tvalid = checkValidityOfComment(commentToBePosted);\n\n\t\tif (valid) {\n\t\t\t// Intent intent = getIntent();\n\t\t\tPostCommentTask postComment = new PostCommentTask();\n\t\t\tpostComment.execute(commentToBePosted);\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n\n Toast.makeText(context, \"Posting Comment\", Toast.LENGTH_SHORT).show();\n final String userid = sharedPrefs.getUserIdFromSharedPref();\n final String username = sharedPrefs.getUsernameFromSharedPref();\n final String profilepic = sharedPrefs.getProfilePictureFromSharedPref();\n final String addNewCommentURL = Constants.protocol + Constants.IP +\n Constants.addNewPostComment;\n\n final String commentText = editTextComment.getText().toString();\n Long timestamp = System.currentTimeMillis();\n //Comment.UserInfo userInfo = new Comment.UserInfo()\n Comment comment;\n if(profilepic.equals(\"\")){\n comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, null));\n }else{\n comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, profilepic));\n }\n\n Log.d(\"newComment\",comment.toString());\n commentsList.add(0, comment);\n commentsListAdapter.notifyItemInserted(0);\n commentsRecyclerView.smoothScrollToPosition(0);\n\n\n //Comment comment = new Comment(postId, commentText, timestamp.toString(), userid, 0,null);\n //GsonBuilder gsonBuilder = new GsonBuilder();\n //Gson gson = gsonBuilder.create();\n //String jsonObject = gson.toJson(comment);\n\n Map<String,Map<String, Object>> Data = new HashMap<>();\n\n Map<String, Object> PostCommentData = new HashMap<>();\n PostCommentData.put(\"UserId\", userid);\n PostCommentData.put(\"PostId\", postId);\n PostCommentData.put(\"CommentText\", commentText);\n PostCommentData.put(\"timestamp\", timestamp);\n PostCommentData.put(\"LikesCount\", 0);\n\n Map<String, Object> NotificationData = new HashMap<>();\n NotificationData.put(\"ByUserId\", userid);\n NotificationData.put(\"ToUserId\", userIdOfPost);\n NotificationData.put(\"PostId\", postId);\n NotificationData.put(\"NotificationType\", \"post_comment\");\n NotificationData.put(\"Read\", false);\n NotificationData.put(\"timestamp\", timestamp);\n //PostCommentData.put(\"CommentId\", timestamp.toString());\n\n\n Data.put(\"PostCommentData\",PostCommentData);\n Data.put(\"NotificationData\",NotificationData);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, addNewCommentURL, new JSONObject(Data), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.d(\"volleyadd\", response.toString());\n Toast.makeText(context, \"Posting Done\", Toast.LENGTH_SHORT).show();\n //FirebasePushNotificationMethods.sendTownPostNotification(userid, key, txtPrimary, txtSecondary, editTextShareNews, MainActivity.this);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"VolleyError\", error.toString());\n }\n });\n\n\n RequestQueue queue = Volley.newRequestQueue(context);\n queue.add(jsonObjectRequest);\n\n\n //final String userid = firebaseAuth.getCurrentUser().getUid();\n// String commentid = databaseReference.child(\"postcomments\").child(postId).child(\"comments\").push().getKey();\n//\n// final String toUserId = getUserIdOfPostFromBundle();\n// //Long timestamp = HelperFunctions.getCurrentTimestamp();\n// //Comment comment = new Comment(commentText, null, 0, timestamp, userid);\n// Map<String, Object> childUpdates = new HashMap<>();\n// childUpdates.put(\"/postcomments/\" + postId + \"/comments/\" + commentid, comment);\n// databaseReference.updateChildren(childUpdates).addOnSuccessListener(new OnSuccessListener<Void>() {\n// @Override\n// public void onSuccess(Void aVoid) {\n// HelperFunctions.getToastShort(getActivity(), \"comment posted\");\n// FirebasePushNotificationMethods.sendPostCommentNotification(toUserId, userid, postId, commentText, getContext());\n// }\n// });\n }", "@Override\n public void onClick(View view) {\n commentText = holder.edCommentText.getText().toString().replaceAll(\" \", \"%20\");\n new CommentPost(arrayList, Id, queId, commentText).execute();\n }", "public void requestToPostComment(Context context, String commentText, String bravoId, final IRequestListener iRequestListener,\r\n FragmentBasic fragmentBasic) {\r\n int _loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin _sessionLogin = BravoUtils.getSession(mContext, _loginBravoViaType);\r\n String userId = _sessionLogin.userID;\r\n String accessToken = _sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"User_ID\", _sessionLogin.userID);\r\n subParams.put(\"Bravo_ID\", bravoId);\r\n subParams.put(\"Comment_Text\", commentText);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_POST_COMMENT.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPost postComment = new AsyncHttpPost(context, new AsyncHttpResponseProcess(context, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putFollow :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObPostComment obPostComment;\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n obPostComment = gson.fromJson(response.toString(), ObPostComment.class);\r\n if (obPostComment == null)\r\n return;\r\n iRequestListener.onErrorResponse(obPostComment.error);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"Cannot post the comment\");\r\n }\r\n }, params, true);\r\n AIOLog.d(url);\r\n postComment.execute(url);\r\n }", "@Override\n public void addPostComment(final NewsFeed.PostData.PostComment postComment)\n {\n Log.i(TAG,\"adding new comment on news feed post\");\n Map<String, String> params = new HashMap<>();\n params.put(\"add_comment_post\", \"1\");\n params.put(\"user_id\", SessionHelper.getInstance(mContext).getUser().getUserId());\n params.put(\"post_id\", postComment.getPostId());\n params.put(\"comment\", postComment.getCommentMessage());\n Log.d(TAG, \"params to add comment in news feed post : \" + params);\n\n\n remoteServer.sendData(RemoteServer.URL, params, new RemoteServer.VolleyStringListener() {\n @Override\n public void onVolleySuccessResponse(String response) {\n try {\n Log.i(TAG,\"server response to add comment on news feed post = \"+response);\n JSONObject obj = new JSONObject(response);\n if (obj.get(\"res\").toString().equals(\"1\")) {\n\n if (listener != null)\n {\n listener.onPostCommentAdded(postComment);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onVolleyErrorResponse(VolleyError error) {\n\n }\n });\n\n }", "@Override\n public void onComment(Comment newComment) {\n addComment(mPostRef, newComment)\n .addOnSuccessListener(this, new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(LOG_VAL, \"Comment added\");\n\n //Hide keyboard and scroll to top\n hideKeyboard();\n mCommentRecycler.smoothScrollToPosition(0);\n }\n })\n .addOnFailureListener(this, new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(LOG_VAL, \"Add comment failed\", e);\n\n //show failure message and hide keyboard\n hideKeyboard();\n Snackbar.make(findViewById(android.R.id.content), \"Failed to add comment\",\n Snackbar.LENGTH_SHORT).show();\n }\n });\n }", "public void postComments(String fid) {\n\t\tJSONObject jsObject = new JSONObject();\n\t\tString nid=myPrefs.getString(\"garden_id\", \"none\");\n\n\t\ttry {\n\t\t\tjsObject.put(\"nid\", nid);\n\t\t\t//\t\t\tjsObject.put(\"subject\", commentSubject);\n\t\t\tjsObject.put(\"comment_body\", new JSONObject().put(\"und\", new JSONArray().put(0, new JSONObject().put(\"value\", commentStr))));\n\t\t\tif(null!=fid)\n\t\t\t\tjsObject.put(\"field_image\", new JSONObject().put(\"und\", new JSONArray().put(0, new JSONObject().put(\"fid\", fid))));\n\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t\tcd = new ConnectionDetector(getActivity());\n\n\t\t// Check if Internet present\n\t\tif (!cd.isConnectingToInternet()) {\n\t\t\t// Internet Connection is not present\n\t\t\talert.showAlertDialog(getActivity(),\n\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\"Please connect to working Internet connection\", false);\n\t\t\t// stop executing code by return\n\t\t\treturn;\n\t\t}else{\n\t\t\ttaskPostComment=new PostComment(jsObject,myPrefs){\n\n\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\tAppUtil.initializeProgressDialog(getActivity(), \"Finalizing post...\", progressDialog);\n\t\t\t\t};\n\n\t\t\t\tprotected void onPostExecute(JSONObject result) {\n\t\t\t\t\tAppUtil.cancelProgressDialog();\n\t\t\t\t\tCalenderHelper calenderHelper=new CalenderHelper(getActivity());\n\t\t\t\t\tCalendar cal=Calendar.getInstance();\n\t\t\t\t\tDate date=new Date();\n\t\t\t\t\tcalenderHelper.createEvent(\"\", \"Status:\"+commentStr, cal.get(Calendar.YEAR),cal.get(Calendar.MONTH),cal.get(Calendar.DATE),cal.get(Calendar.HOUR),cal.get(Calendar.MINUTE),cal.get(Calendar.SECOND),cal.get(Calendar.MILLISECOND),date.getTime(),date.getTime(),null);\n\t\t\t\t\t//\t\t\t\t\tsubject.setText(\"\");\n\t\t\t\t\tcomment.setText(\"\");\n\t\t\t\t\tsharedImagePath=null;\n\t\t\t\t\tToast.makeText(getActivity(), \"Post Successful\", 1000).show();\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tif(isRefreshEnabled()){\n\t\t\t\t\t\tsetRefreshEnabled(false);\n\t\t\t\t\t\tfetchGardenDetails(homeFrgRootView,true);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}.execute(\"http://www1.kitchengardens.in/svc/comment/\");\n\t\t}\n\t}", "@Override\n\tpublic String createComment_request() {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/flood/addComment\", method = RequestMethod.POST)\n public String addCommentPost(@ModelAttribute(\"newComment\") Comment comment,\n HttpServletRequest request,\n Model model) {\n comment.setUserId(1L);\n model.addAttribute(\"newComment\", commentService.addComment(comment));\n return \"floodLine\";\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(isAdded()){\n\t\t\t\t\tif(comment.getText().length()>0){\n\n\t\t\t\t\t\t//\t\t\t\t\t\tcommentSubject=subject.getText().toString().trim();\n\t\t\t\t\t\tcommentStr=comment.getText().toString().trim();\n\t\t\t\t\t\tif(sharedImagePath==null){\n\t\t\t\t\t\t\tAlertHomeFragment dialog=new AlertHomeFragment(HomeFragment.this,\"Info\",\"Image not added to post.\\n\\nNote: Sharing your image with your status is recommended.\",\"Proceed Anyway\",\"Cancel\",false,\"not_added\");\n\t\t\t\t\t\t\tdialog.setCancelable(true);\n\t\t\t\t\t\t\tdialog.show(fm, \"post\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tmyPrefs = getActivity().getSharedPreferences(\"myPrefs\",getActivity().MODE_PRIVATE);\n\t\t\t\t\t\t\tdoPostCommentsActions(myPrefs);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tAlertHomeFragment dialog=new AlertHomeFragment(HomeFragment.this,\"Warning\",\"All fields are mandatory to be filled.\",\"OK\",\"Proceed\",true,\"field_check\");\n\t\t\t\t\t\tdialog.setCancelable(true);\n\t\t\t\t\t\tdialog.show(fm, \"field\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tToast.makeText(getActivity(), \"Something went wrong.Try sharing your updates again.\", 1000).show();\n\t\t\t\t}\n\t\t\t}", "public void addComment(Comment com){\n final Comment com2=com;\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected Void doInBackground(Void... params) {\n try {\n mCommentTable.insert(com2);\n } catch (Exception exception) {\n Log.i(\"add comment error: \",exception.getMessage());\n }\n return null;\n }\n }.execute();\n }", "private void initComment(final String orden, final String comment, final String url){\n View view = (LayoutInflater.from(Menu.this)).inflate(R.layout.user_input, null);\n\n final EditText userInput = (EditText) view.findViewById(R.id.userInputEditText);\n\n AlertDialog.Builder alertBuilder = new AlertDialog.Builder(Menu.this);\n alertBuilder.setView(view);\n alertBuilder.setCancelable(false)\n .setPositiveButton(getApplicationContext().getText(R.string.gt_kemik_paqueteria_userinput_yes), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //EXECUTE POST\n doPost(orden, comment + \": \" + userInput.getText().toString(), url);\n }\n })\n .setNegativeButton(getApplicationContext().getText(R.string.gt_kemik_paqueteria_userinput_no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //EXECUTE POST\n doPost(orden, comment , url);\n }\n });\n Dialog dialog = alertBuilder.create();\n dialog.show();\n }", "private void addNewCommentToProduct(final Context context, final Comment comment, Retrofit retrofit){\n try {\n if(iProduct != null && context != null && comment != null && retrofit != null){\n final View view = CommonPresenter.getViewInTermsOfContext(context);\n // Create interface objet\n CoursModeProjetApi modeProjetApi = retrofit.create(CoursModeProjetApi.class);\n // Retrieve prototype method from api\n Call<Comment> call = modeProjetApi.addComment(comment.getProductId(), comment.getEmail(), comment.getContent());\n call.enqueue(new Callback<Comment>() {\n @Override\n public void onResponse(Call<Comment> call, Response<Comment> response) {\n if(!response.isSuccessful()){\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_traitement_error));\n return;\n }\n Comment mComment = response.body();\n Log.i(\"TAG_APP\", \"CODE = \"+mComment.getSuccess()+\", MESSAGE = \"+mComment.getMessage());\n }\n\n @Override\n public void onFailure(Call<Comment> call, Throwable t) {\n CommonPresenter.showSnackBarMessage(view, t.getMessage());\n }\n });\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addNewCommentToProduct() : \"+ex.getMessage());\n }\n }", "public void saveComment(Comment comment) {\n \t\tContentValues values = new ContentValues();\n \n \t\tUser user = comment.getUser();\n \n \t\tString userName = null;\n \n \t\tif (user != null) {\n \t\t\tuserName = user.getUserName();\n \t\t}\n \n \t\tvalues.put(SQLiteHelper.COLUMN_PARENT_ID, comment.getLocalParentId());\n \t\tvalues.put(SQLiteHelper.COLUMN_GLOBALID, comment.getId());\n \t\tvalues.put(SQLiteHelper.COLUMN_PARENT_GLOBALID, comment.getParentId());\n \t\tvalues.put(SQLiteHelper.COLUMN_COMMENT, comment.getContent());\n \t\tvalues.put(SQLiteHelper.COLUMN_USER, userName);\n \n \t\tLog.v(TAG, \"Saving Comment: \" + comment.getContent());\n \n \t\tif (comment.getLocalId() == 0) {\n \t\t\t// Insert\n \t\t\tlong insertId = database.insert(SQLiteHelper.TABLE_COMMENTS, null,\n \t\t\t\t\tvalues);\n \t\t\t// Set local id\n \t\t\tcomment.setLocalId(insertId);\n \n \t\t\tLog.v(TAG, \"Insert\");\n \t\t} else {\n \t\t\tString strFilter = SQLiteHelper.COLUMN_ID + \"=\"\n \t\t\t\t\t+ comment.getLocalId();\n \t\t\tdatabase.update(SQLiteHelper.TABLE_COMMENTS, values, strFilter,\n \t\t\t\t\tnull);\n \n \t\t\tLog.v(TAG, \"Update\");\n \t\t}\n \n \t}", "@RestReturn(value=JComment.class, entity=JComment.class, code={\n @RestCode(code=302, message=\"OK\", description=\"Redirect to newly created comment\")\n })\n @RequestMapping(value=\"\", method= RequestMethod.POST)\n public RedirectView addComment(HttpServletRequest request,\n HttpServletResponse response,\n UriComponentsBuilder uriBuilder,\n @PathVariable String domain,\n @RequestParam(required=true) String productId,\n @RequestParam(required=false) String productName,\n @RequestParam(required=false) String username,\n @RequestParam(required=false) Float latitude,\n @RequestParam(required=false) Float longitude,\n @RequestParam(required=true) String comment) {\n\n final DComment body = rnrService.addComment(productId, username, latitude, longitude, comment);\n\n return new RedirectView(uriBuilder.path(\"/{domain}/comment/{id}\").\n buildAndExpand(domain, body.getId()).toUriString());\n }", "public void addComment(BlogEntry blog, CommentForm comment);", "public ThreeDSecureRequest addComment(String comment) {\n //create new comments array list if null\n if (null == this.comments) {\n this.comments = new ArrayList<Comment>();\n }\n\n int size = comments.size();\n this.comments.add(new Comment().addComment(comment).addId(++size));\n return this;\n }", "private void makePostCommentClickable() {\n\t\tButton postComment = (Button) findViewById(R.id.postComment);\n\t\tpostComment.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsendDataToServer();\n\t\t\t}\n\t\t});\n\t}", "Builder addComment(Comment value);", "public String doCreateComment() {\r\n Users commenter = ui.getUser();\r\n try {\r\n this.newComment.setRecipe(this.recipe);\r\n this.newComment.setCommenter(commenter);\r\n this.newComment.setDateCommented(new Date().getTime());\r\n List<Comment> c = recipe.getComments();\r\n c.add(newComment);\r\n this.recipe.setComments(c);\r\n recipesEJB.editRecipe(recipe);\r\n } catch (javax.ejb.EJBAccessException ejbae) {\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Only registered users can post comments.\"));\r\n }\r\n return \"/recipe.xhtml?recipe=\" + qm.get(\"recipe\");\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_comments, container, false);\n\n commentsRecyclerView = (RecyclerView) view.findViewById(R.id.commentsRecyclerView);\n commentsRecyclerView.setHasFixedSize(true);\n commentsRecyclerView.setItemViewCacheSize(20);\n commentsRecyclerView.setDrawingCacheEnabled(true);\n commentsRecyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);\n linearLayoutManager = new LinearLayoutManager(context);\n commentsRecyclerView.setLayoutManager(linearLayoutManager);\n commentsListAdapter = new CommentsListAdapter(commentsList);\n commentsRecyclerView.setAdapter(commentsListAdapter);\n\n commentsRecyclerView.addOnScrollListener(new EndlessRecyclerOnScrollListener(linearLayoutManager) {\n @Override\n public void onLoadMore(int current_page) {\n if(!mIsLoading) {\n loadMoreData();\n }\n }\n });\n\n editTextComment = (EditText) view.findViewById(R.id.editTextComment);\n\n backButton = (ImageButton) view.findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (getCallingActivityFromBundle().equals(getString(R.string.main_activity))) {\n getActivity().getSupportFragmentManager().popBackStack();\n ((MainActivity) getActivity()).showLayout();\n } else {\n getActivity().getSupportFragmentManager().popBackStack();\n }\n }\n });\n\n loadMoreData();\n\n sendMessageBtn = (ImageButton) view.findViewById(R.id.sendMessageBtn);\n sendMessageBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //Send message to firebase\n\n Toast.makeText(context, \"Posting Comment\", Toast.LENGTH_SHORT).show();\n final String userid = sharedPrefs.getUserIdFromSharedPref();\n final String username = sharedPrefs.getUsernameFromSharedPref();\n final String profilepic = sharedPrefs.getProfilePictureFromSharedPref();\n final String addNewCommentURL = Constants.protocol + Constants.IP +\n Constants.addNewPostComment;\n\n final String commentText = editTextComment.getText().toString();\n Long timestamp = System.currentTimeMillis();\n //Comment.UserInfo userInfo = new Comment.UserInfo()\n Comment comment;\n if(profilepic.equals(\"\")){\n comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, null));\n }else{\n comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, profilepic));\n }\n\n Log.d(\"newComment\",comment.toString());\n commentsList.add(0, comment);\n commentsListAdapter.notifyItemInserted(0);\n commentsRecyclerView.smoothScrollToPosition(0);\n\n\n //Comment comment = new Comment(postId, commentText, timestamp.toString(), userid, 0,null);\n //GsonBuilder gsonBuilder = new GsonBuilder();\n //Gson gson = gsonBuilder.create();\n //String jsonObject = gson.toJson(comment);\n\n Map<String,Map<String, Object>> Data = new HashMap<>();\n\n Map<String, Object> PostCommentData = new HashMap<>();\n PostCommentData.put(\"UserId\", userid);\n PostCommentData.put(\"PostId\", postId);\n PostCommentData.put(\"CommentText\", commentText);\n PostCommentData.put(\"timestamp\", timestamp);\n PostCommentData.put(\"LikesCount\", 0);\n\n Map<String, Object> NotificationData = new HashMap<>();\n NotificationData.put(\"ByUserId\", userid);\n NotificationData.put(\"ToUserId\", userIdOfPost);\n NotificationData.put(\"PostId\", postId);\n NotificationData.put(\"NotificationType\", \"post_comment\");\n NotificationData.put(\"Read\", false);\n NotificationData.put(\"timestamp\", timestamp);\n //PostCommentData.put(\"CommentId\", timestamp.toString());\n\n\n Data.put(\"PostCommentData\",PostCommentData);\n Data.put(\"NotificationData\",NotificationData);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, addNewCommentURL, new JSONObject(Data), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.d(\"volleyadd\", response.toString());\n Toast.makeText(context, \"Posting Done\", Toast.LENGTH_SHORT).show();\n //FirebasePushNotificationMethods.sendTownPostNotification(userid, key, txtPrimary, txtSecondary, editTextShareNews, MainActivity.this);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"VolleyError\", error.toString());\n }\n });\n\n\n RequestQueue queue = Volley.newRequestQueue(context);\n queue.add(jsonObjectRequest);\n\n\n //final String userid = firebaseAuth.getCurrentUser().getUid();\n// String commentid = databaseReference.child(\"postcomments\").child(postId).child(\"comments\").push().getKey();\n//\n// final String toUserId = getUserIdOfPostFromBundle();\n// //Long timestamp = HelperFunctions.getCurrentTimestamp();\n// //Comment comment = new Comment(commentText, null, 0, timestamp, userid);\n// Map<String, Object> childUpdates = new HashMap<>();\n// childUpdates.put(\"/postcomments/\" + postId + \"/comments/\" + commentid, comment);\n// databaseReference.updateChildren(childUpdates).addOnSuccessListener(new OnSuccessListener<Void>() {\n// @Override\n// public void onSuccess(Void aVoid) {\n// HelperFunctions.getToastShort(getActivity(), \"comment posted\");\n// FirebasePushNotificationMethods.sendPostCommentNotification(toUserId, userid, postId, commentText, getContext());\n// }\n// });\n }\n });\n\n //final Comment comment = new Comment();\n// query.addListenerForSingleValueEvent(new ValueEventListener() {\n// @Override\n// public void onDataChange(DataSnapshot dataSnapshot) {\n// for (DataSnapshot item : dataSnapshot.getChildren()) {\n// final Comment comment = item.getValue(Comment.class);\n// comment.setCommentid(item.getKey());\n// Log.d(\"commentdata\", comment.toString());\n// commentsList.add(comment);\n//// comment.setCommentid(item.getKey());\n//// comment.setCommenttext(item.child(\"commenttext\").toString());\n//// //comment.setLikes(item.child(\"likes\"));\n//// comment.setLikesCount(2);\n//// comment.setTimestamp(Long.valueOf(item.child(\"timestamp\")));\n//\n// //final Comment comment = item.getValue(Comment.class);\n// }\n// commentsListAdapter.notifyDataSetChanged();\n// }\n//\n// @Override\n// public void onCancelled(DatabaseError databaseError) {\n//\n// }\n// });\n\n\n\n return view;\n }", "@Override\n public void onClick(View v) {\n mSearchComments = MApplication.getEncodedString(editCampaignComments.getText().toString().trim());\n //If it is empty toast message will display to enter the text\n //else request to delete the COMMENTS\n if (TextUtils.isEmpty(mSearchComments)) {\n Toast.makeText(searchPollCommentsAdapterContext, searchPollCommentsAdapterContext.getResources().getString(R.string.enter_the_comments),\n Toast.LENGTH_SHORT).show();\n } else {\n campaignSearchCommentsSave(position, commentId, searchlistDialog);\n }\n }", "@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }", "@Override\n\tpublic CommentVnEntity UpdateComment(CommentVnRequest commentRequest) {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString tag=(String)inputView.getTag();\n\t\t\t\tString act,id,content;\n\t\t\t\tcontent=inputView.getText().toString();\n\t\t\t\tif(!content.contains(\"@\")){\n\t\t\t\t\ttag=null;\n\t\t\t\t}\n\t\t\t\tif(tag!=null){\n\t\t\t\t\tact=REPLY_COMMENT;\n\t\t\t\t\tid=tag;\n\t\t\t\t}else{\n\t\t\t\t\tact=COMMENT_POST;\n\t\t\t\t\tid=post.getPost_id();\n\t\t\t\t}\n\t\t\t\tfinal Map<String, String> reply = new HashMap<String, String>();\n\t\t\t\treply.put(\"app\", APP);\n\t\t\t\treply.put(\"mod\", MOD);\n\t\t\t\treply.put(\"act\", act);\n\t\t\t\treply.put(\"id\", id);\n\t\t\t\treply.put(\"content\", content);\n\t\t\t\treply.put(\"oauth_token\", OAUTH_TOKEN);\n\t\t\t\treply.put(\"oauth_token_secret\", OAUTH_TOKEN_SECRECT);\n\t\t\t\tnew Thread(new WeibaActionHelper(myHandler, mContext,\n\t\t\t\t\t\treply, COMMENT_OK)).start();\n\t\t\t}", "void addComment(long mediaId, String text);", "void addNewComment(BlogComment comment) throws DAOException;", "public void submitComment(String message) {\n refreshState();\n CommentDTO comment = new CommentDTO(message, currentUser, currentPost);\n ctrl.addComment(comment, currentPost, currentUser);\n refreshState();\n }", "@PostMapping(value= \"/comment/\")\n\tpublic void createComment(@RequestBody Comment comment) {\n\t\tlogger.debug(\"Saving comments.\");\n\t\tservice.createComment(comment);\n\t\t//return \"Comment records created.\";\n\t}", "private void campaignSearchCommentsSave(final int position, String commentId, final Dialog listDialog) {\n MApplication.materialdesignDialogStart(searchPollCommentsAdapterContext); //Material dialog starts\n CampaignCommentEditDeleteRestClient.getInstance().postCampaignPollCommentEdit(new String(\"edit_poll\"), new String(searchPollId), new String(MApplication.getString(searchPollCommentsAdapterContext, Constants.USER_ID)), new String(commentId), new String(mSearchComments), new Callback<CommentDisplayResponseModel>() { /** Requesting the response from the given base url**/\n @Override\n public void success(CommentDisplayResponseModel campaignCommentEdit, Response response) {\n //If the succes matches with the value 1 then the corresponding row is modified\n //else corresponding row wont remove\n if ((\"1\").equals(campaignCommentEdit.getSuccess())) {\n listDialog.dismiss();\n dataResultsSearch.set(position, campaignCommentEdit.getResults().getData().get(0));\n prefrenceSearchCommentsCount = MApplication.loadArray(searchPollCommentsAdapterContext, searchcommentsCount, Constants.USER_POLL_COMMENTS_COUNT, Constants.USER_POLL_COMMENTS_SIZE); //Prefernce comment count is stored in array list\n prefrenceSearchCommentsCount.set(commentsCountSearchPosition, Integer.valueOf(campaignCommentEdit.getCount())); //Changing the particular position value\n MApplication.saveArray(searchPollCommentsAdapterContext, prefrenceSearchCommentsCount, Constants.USER_POLL_COMMENTS_COUNT, Constants.USER_POLL_COMMENTS_SIZE); //Saving again into the prefernce\n notifyDataSetChanged();//Notifies the attached observers that the underlying data has been changed\n // and any View reflecting the data set should refresh itself.\n }\n }\n @Override\n public void failure(RetrofitError retrofitError) {\n MApplication.errorMessage(retrofitError, searchPollCommentsAdapterContext); //Error message popups when the user cannot able to coonect with the server\n }\n });\n MApplication.materialdesignDialogStop(); //Progress bar stops\n }", "public Builder setComment(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n comment_ = value;\n onChanged();\n return this;\n }", "@Override\n\t public void callback(YKResult result,YKComment comment) {\n\t\tAppUtil.dismissDialogSafe(mCustomButterfly);\n\t\tif(result.isSucceeded()){\n\n\t\t addComment(mCommentLoad,comment);\n\t\t mCommentEdit.setText(\"\");\n\t\t mCommentEdit.clearFocus();\n\t\t isComment = true;\n\t\t YKUtil.hideKeyBoard(CommentActivity.this, mCommentEdit);\n\t\t Toast.makeText(CommentActivity.this, \"发送成功\", Toast.LENGTH_SHORT).show();\n\t\t //\t\t //TODO 本地刷新在列表里面添加一条数据\n\t\t mAdapter.notifyDataSetChanged();\n\n\t\t}else{\n\n\t\t String message = (String) result.getMessage();\n\t\t Toast.makeText(CommentActivity.this, message, Toast.LENGTH_SHORT).show();\n\t\t}\n\n\t }", "@Override\n\t public void callback(YKResult result,YKComment comment) {\n\t\tAppUtil.dismissDialogSafe(mCustomButterfly);\n\t\tif(result.isSucceeded()){\n\t\t addComment(mCommentLoad,comment);\n\t\t mCommentEdit.setText(\"\");\n\t\t mCommentEdit.clearFocus();\n\t\t isComment = true;\n\t\t YKUtil.hideKeyBoard(CommentActivity.this, mCommentEdit);\n\t\t Toast.makeText(CommentActivity.this, \"发送成功\", Toast.LENGTH_SHORT).show();\n\t\t //TODO 本地刷新在列表里面找到你回复的那条评论在他的回复列表里面添加一条回复在回复数据\n\t\t mAdapter.notifyDataSetChanged();\n\t\t //mAdapter.update(mArrayList);\n\t\t}else{\n\n\t\t String message = (String) result.getMessage();\n\t\t Toast.makeText(CommentActivity.this, message, Toast.LENGTH_SHORT).show();\n\t\t}\n\n\t }", "@RequestMapping(method = RequestMethod.POST, value = \"users/{userId}/tweets/{tweetId}/comments\")\n public Comment addCommentForTweet(@PathVariable String userId, @PathVariable long tweetId, @RequestBody Comment comment, @RequestHeader(\"Authorization\") String access_token) {\n if (jwtUtil.isAccessTokenValid(access_token, userId)) {\n return commentService.addCommentForTweet(comment, tweetId, userId);\n } else {\n return null;\n }\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t if(!AppUtil.isNetworkAvailable(mContext)){\n\t\t\tToast.makeText(mContext, string.intent_no, Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t }\n\t\t if(!YKCurrentUserManager.getInstance().isLogin()){\n\t\t\tnew AlertDialog.Builder(CommentActivity.this).setTitle(\"确认举报\") \n\t\t\t.setIcon(android.R.drawable.ic_dialog_info) \n\t\t\t.setPositiveButton(\"举报\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\tToast.makeText(CommentActivity.this, \"举报成功,我们会及时处理!!!\", Toast.LENGTH_SHORT).show();\n\t\t\t } \n\t\t\t}) \n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t// 点击“返回”后的操作,这里不设置没有任何操作 \n\t\t\t } \n\t\t\t}).show(); \n\t\t }else{\n\t\t if(YKCurrentUserManager.getInstance().getUser().getId().equals(comment.getmAuthor().getID())){\n\t\t\tmCommentEdit.clearFocus();\n\t\t\tYKUtil.hideKeyBoard(mContext, mCommentEdit);\n\t\t\tnew AlertDialog.Builder(CommentActivity.this).setTitle(\"确认删除\") \n\t\t\t.setIcon(android.R.drawable.ic_dialog_info) \n\t\t\t.setPositiveButton(\"确认\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\tdeleteAllComment(comment);\n\t\t\t } \n\t\t\t}) \n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t// 点击“返回”后的操作,这里不设置没有任何操作 \n\t\t\t } \n\t\t\t}).show(); \n\n\t\t }else{\n\t\t\tmCommentEdit.clearFocus();\n\t\t\tYKUtil.hideKeyBoard(mContext, mCommentEdit);\n\t\t\tnew AlertDialog.Builder(CommentActivity.this).setTitle(\"确认举报\") \n\t\t\t.setIcon(android.R.drawable.ic_dialog_info) \n\t\t\t.setPositiveButton(\"举报\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\tToast.makeText(CommentActivity.this, \"举报成功,我们会及时处理!!!\", Toast.LENGTH_SHORT).show();\n\t\t\t } \n\t\t\t}) \n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() { \n\n\t\t\t @Override \n\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t// 点击“返回”后的操作,这里不设置没有任何操作 \n\t\t\t } \n\t\t\t}).show(); \n\t\t }\n\t\t }\n\t\t}", "public void setCommentText(String commentText) {\n\t this.commentText = commentText;\n\t}", "@Override\n public void onClick(View view) {\n comment.deleteInBackground(new DeleteCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.i(TAG, e.getMessage());\n return;\n }\n\n // after deleting, update comment count\n ParseQuery<Post> commentPost = ParseQuery.getQuery(\"Post\");\n commentPost.getInBackground(comment.getPostId().getObjectId(), new GetCallback<Post>() {\n @Override\n public void done(Post post, ParseException e) {\n if(e != null) {\n Log.i(TAG, e.getMessage());\n return;\n }\n Log.i(TAG, \"Post: \" + post.getCommentsCount());\n if(post.getCommentsCount() == null){\n return;\n }else if(post.getCommentsCount().equals(1)){\n post.remove(\"commentsCount\");\n }else {\n post.increment(\"commentsCount\", -1);\n }\n post.saveInBackground();\n Log.i(TAG, \"Post after: \" + post.getCommentsCount());\n Log.i(TAG, \"Delete Comment Successful\");\n\n //delete seleted comment in the list\n removeAt(position);\n\n // need to reload the activity to update the number of comments above the recyle view\n Intent i = new Intent(context, DetailPost.class);\n i.putExtra(\"user\",Parcels.wrap(postUser));\n i.putExtra(\"post\", Parcels.wrap(post));\n context.startActivity(i);\n }\n });\n\n }\n });\n\n }", "@PostMapping(\"/{postId}/newComment\")\n public String newComment(@PathVariable(\"postId\") Long postId, @RequestParam(\"comment\") String comment, Principal principal) {\n \tString username = principal.getName();\n \tmainService.newComment(username, postId, comment);\n \treturn \"redirect:/\";\n }", "Builder addComment(String value);", "void saveComment(Comment.SavableComment comment) throws SQLException;", "@RequestMapping(path = \"/posts/{id}/comment\")\n @ResponseBody\n public String comment(@RequestBody Comment comment, @PathVariable(name = \"id\") String postId) {\n User cUser = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n Comment temp = new Comment(comment.getBody(), usersDoa.getOne(cUser.getId()), pDoa.getOne(Long.parseLong(postId)));\n commentsDoa.save(temp);\n return \"\";\n// return \"redirect:/posts/\" + postId;\n }", "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {\n LOG.debug(\"Handling POST request to /comments...\");\n\n req.setCharacterEncoding(ENCODING);\n res.setCharacterEncoding(ENCODING);\n\n Comment newComment = ParserUtils.parseBodyAsComment(req);\n ServletContext context = req.getServletContext();\n BlogPost post = (BlogPost) context.getAttribute(SELECTED_POST);\n if (post != null) {\n post.getComments().getComments().add(newComment);\n res.sendRedirect(req.getContextPath() + \"/post/\" + post.getPostID());\n } else {\n res.sendRedirect(req.getContextPath() + \"/index\");\n }\n }", "public void updateRedeemDate(Context context, String url, final String couponCode ) {\n //mPostCommentResponse.requestStarted();\n RequestQueue queue = Volley.newRequestQueue(context);\n\n //Send data\n try {\n StringRequest postRequest = new StringRequest(\n Request.Method.POST,\n url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n JSONObject jsonObject;\n try {\n jsonObject = new JSONObject(response);\n int success = Integer.parseInt(jsonObject.getString(\"success\"));\n String message = jsonObject.getString(\"message\");\n if (success == 1) {\n Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity().getApplicationContext(), \"Error. \" + error.toString(), Toast.LENGTH_LONG).show();\n }\n }) {\n @Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n params.put(\"CouponCode\", couponCode);\n return params;\n }\n\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n return params;\n }\n };\n queue.add(postRequest);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void addComments() {\n\t\tCookie myCookie = new Cookie(\"username\", \"ch\");\n\t\tComment _comment1 = new Comment(\"New Commment1\", DateTime.now());\n\n\t\t_logger.info(\"Creating a new Comment ...\");\n\n\t\tResponse response = _client\n\t\t\t\t.target(WEB_SERVICE_URI + \"/blogEntries/2/comments\").request()\n\t\t\t\t.cookie(myCookie).post(Entity.xml(_comment1));\n\t\tif (response.getStatus() != 201) {\n\t\t\t_logger.error(\"Failed to create Comment; Web service responded with: \"\n\t\t\t\t\t+ response.getStatus());\n\t\t\tfail(\"Failed to create new Comment\");\n\t\t}\n\n\t\tString location = response.getLocation().toString();\n\t\t_logger.info(\"URI for new Comment: \" + location);\n\t\tresponse.close();\n\n\t\t// Case 2\n\t\tComment _comment2 = new Comment(\"New Commment2\", DateTime.now());\n\n\t\t_logger.info(\"Creating a new Comment ...\");\n\n\t\tresponse = _client.target(WEB_SERVICE_URI + \"/blogEntries/2/comments\")\n\t\t\t\t.request().cookie(myCookie).post(Entity.xml(_comment2));\n\t\tif (response.getStatus() != 201) {\n\t\t\t_logger.error(\"Failed to create Comment; Web service responded with: \"\n\t\t\t\t\t+ response.getStatus());\n\t\t\tfail(\"Failed to create new Comment\");\n\t\t}\n\n\t\tlocation = response.getLocation().toString();\n\t\t_logger.info(\"URI for new Comment: \" + location);\n\t\tresponse.close();\n\n\t}", "public void setComment(String comment);", "public void setComment(String comment);", "@Override\n public void onClick(View v) {\n String url = \"https://jsonplaceholder.typicode.com/posts\";\n\n //****** SE CREA UNA SOLICITUD DE COLA DONDE SE LE MANDA EL MÉTODO \"POST\", LA URL Y SE CREAN LOS EVENTOS \"RESPONSE\" Y \"ON ERROR RESPONSE\" ******//\n\n StringRequest requestCrearPost = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n //****** SI LA SOLICITUD SE COMPLETA CORRECTAMENTE Y EL RESPONSE ES \"OK\", SE MUESTRA UN TOAST DE CONFIRMACIÓN Y SE RE-CREA LA ACTIVIDAD******//\n Toast.makeText(PostActivity.this, \"POST CREADO CORRECTAMENTE\", Toast.LENGTH_SHORT).show();\n recreate();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n //****** SI LA SOLICITU NO SE COMPLETA CORRECTAMENTE, SE MUESTRA UN TOAST CON EL ERROR ******//\n Toast.makeText(getApplicationContext(), error.toString(), Toast.LENGTH_SHORT).show();\n\n }\n }) {\n\n //****** SE MAPEAN Y SE RETORNAN LOS PARÁMETROS MANDÁNDOLE EL NOMBRE (COMO LO PIDE EL SERVIDOR) Y EL VALOR ******//\n @Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", txtTituloPost.getText().toString());\n params.put(\"body\", txtContenidoPost.getText().toString());\n params.put(\"userId\", MainActivity.idUsuario);\n\n return params;\n }\n };\n //****** SE AGREGA A LA COLA DE SOLICITUDES LA SOLICITUD \"requestCrearPost\" ******//\n queue.add(requestCrearPost);\n }", "public void addComment(Comment comment){\n commentRepository.createComments(comment);\n }", "@Override\n public void onClick(View v) {\n mSearchComments = MApplication.getEncodedString(editCampaignComments.getText().toString().trim());\n //If it is empty toast message will display to enter the text\n //else request to delete the COMMENTS\n if (TextUtils.isEmpty(mSearchComments)) {\n Toast.makeText(searchPollCommentsAdapterContext, searchPollCommentsAdapterContext.getResources().getString(R.string.enter_the_comments), Toast.LENGTH_SHORT).show();\n } else {\n campaignSearchCommentsDelete(position, commentId, searchlistDialog);\n }\n }", "private void addReview(){\n db = DatabaseHelper.getInstance(this).getWritableDatabase();\n btn = findViewById(R.id.rvBtn);\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n editText = findViewById(R.id.rvEditText);\n ratingBar = findViewById(R.id.rvRatingBar);\n\n String comment = editText.getText().toString();\n double rating = ratingBar.getRating();\n\n if(rating == 0){\n Toast.makeText(BookReviewActivity.this, \"Please add your rating\", Toast.LENGTH_SHORT).show();\n } else if(comment.equals(\"\")){\n Toast.makeText(BookReviewActivity.this, \"Please add your comment\", Toast.LENGTH_SHORT).show();\n } else {\n db.execSQL(\"INSERT INTO REVIEW (Comment, Rate, BookID) VALUES ('\"+comment+\"','\"+rating+\"','\"+bookIDSelected+\"');\");\n Toast.makeText(BookReviewActivity.this, comment+\", \"+rating, Toast.LENGTH_SHORT).show();\n }\n\n loadReviews();\n\n }\n });\n }", "public void comment(String data);", "private void initCommentData(int modeid, final boolean flag) {\n// mCommentList.add(mc);\n\n\n RequestParams params = new RequestParams();\n ECApplication application = (ECApplication) getApplication();\n params.addBodyParameter(\"sessionid\", application.sessionId);\n params.addBodyParameter(\"tid\", String.valueOf(modeid));\n //Toast.makeText(ModeDetailNineGridActivity.this, \"getCommenttid: \"+String.valueOf(mld.getId()), Toast.LENGTH_SHORT).show();\n params.addBodyParameter(\"ismood\", \"1\");\n params.addBodyParameter(\"page\", \"1\");\n params.addBodyParameter(\"pagesize\", \"10\");\n\n new HttpUtils().send(HttpRequest.HttpMethod.POST, CONST.FETCH_COMMENT, params, new RequestCallBack<String>() {\n\n @Override\n public void onSuccess(ResponseInfo<String> responseInfo) {\n ResponseObject<ModeCommentResult> object = new GsonBuilder().create().\n fromJson(responseInfo.result, new TypeToken<ResponseObject<ModeCommentResult>>() {\n }.getType());\n if (object.getStatus() == 400) {\n mcd = object.getResult().getData();\n int sum = object.getResult().getSum();\n //Toast.makeText(ModeDetailNineGridActivity.this, \"sum: \"+String.valueOf(sum), Toast.LENGTH_SHORT).show();\n mCommentList = new ArrayList<>();\n\n for (int i = 0; i < sum; i++) {\n //判断该好友是否被删除了\n if (FriendsLab.get(ModeDetailNineGridActivity.this).findFriById(String.valueOf(mcd[i].getUserid()))\n || UserInfoLab.get(ModeDetailNineGridActivity.this).IsCurrentUser(String.valueOf(mcd[i].getUserid()))) {\n ModeComment mc = null;\n mc = new ModeComment(String.valueOf(mcd[i].getId()), String.valueOf(mcd[i].getUserid()), \"\", mcd[i].getContent(), mcd[i].getDate(), \"\");\n mCommentList.add(mc);\n\n if (flag) {\n initToCommentData(mcd[i].getId(), mcd[i].getUserid(), i);\n }\n// Myhandle=new Handler(){\n// public void handleMessage(Message msg)\n// {\n// ArrayList<ModeComment> mCommentList1=(ArrayList<ModeComment>)msg.getData().getSerializable(\"tocomment\");\n// mCommentList.addAll(mCommentList1);\n// //initCommentAdapter();\n// //Log.i(\"test Comment\",msg.getData().getString(\"hi\"));\n// }\n// };\n }\n }\n\n initCommentAdapter();\n\n } else {\n Toast.makeText(ModeDetailNineGridActivity.this, \"getCommentstatus: \" + object.getStatus(), Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(HttpException error, String msg) {\n Toast.makeText(ModeDetailNineGridActivity.this, msg, Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "public void addComment(String content, String screenName) {\n ParseObject comment = new ParseObject(\"comment\");\n comment.put(\"content\", content);\n comment.put(\"screenName\", screenName);\n comment.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error creating comment in Parse: \" + e);\n }\n\n }\n });\n\n add(\"comments\", comment);\n saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error saving comment to photo in Parse: \" + e);\n }\n }\n });\n }", "public void setComment(String comment){\n this.comment = comment;\n }", "public void setComment(String comment) {\n this.comment = comment;\n }", "public void setComment(String c) {\n comment = c ;\n }", "private void doPostCommentsActions(SharedPreferences myPrefs) {\n\t\tJSONObject js= new JSONObject();\n\n\t\tFile imageFile = new File(sharedImagePath);\n\t\tif(imageFile.exists()){\n\t\t\tString fileName=System.currentTimeMillis()+\"\"+rand.nextInt()+\".jpeg\";\n\n\t\t\ttry {\n\t\t\t\tjs.put(\"filename\", fileName);\n\t\t\t\tjs.put(\"uid\",myPrefs.getInt(\"uid\", -1));\n\t\t\t\tjs.put(\"file\", AppUtil.getBase64StringOfFile(imageFile));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tcd = new ConnectionDetector(getActivity());\n\n\t\t\t// Check if Internet present\n\t\t\tif (!cd.isConnectingToInternet()) {\n\t\t\t\t// Internet Connection is not present\n\t\t\t\talert.showAlertDialog(getActivity(),\n\t\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\t\"Please connect to working Internet connection\", false);\n\t\t\t\t// stop executing code by return\n\t\t\t\treturn;\n\t\t\t}else{\n\t\t\t\ttaskPostImage=new PostImage(js,myPrefs){\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tAppUtil.initializeProgressDialog(getActivity(), \"Uploading Image...\", progressDialog);\n\t\t\t\t\t};\n\n\t\t\t\t\tprotected void onPostExecute(JSONObject result) {\n\t\t\t\t\t\tif(null!=result){\n\t\t\t\t\t\t\tAppUtil.cancelProgressDialog();\n\t\t\t\t\t\t\tpostComments(result.optString(\"fid\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}.execute(\"http://www1.kitchengardens.in/svc/file/\");\n\t\t\t}\n\t\t}\n\n\t}", "public Builder setComments(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n comments_ = value;\n onChanged();\n return this;\n }", "public void deleteComment() {\n text = null;\n authorName = null;\n timestamp = null;\n }", "public long submitComment(Long playerId, String text) {\r\n\t\tPlayer player = lookupPlayer(playerId);\r\n\t\tlong id;\r\n\t\tif (player.getGame().getStatus() == STATUS.COMPLETE) {\r\n\t\t\tid = commentService.submitGameOverComment(player, text);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tid = commentService.submitCommentToAnswered(playerId, text);\r\n\t\t}\r\n\t\treturn id;\r\n\t}", "void update(Comment comment);", "@Before({PostIntercept.class, UserIntercept.class})\n @ActionKey(\"/api/blog/appendComment\")\n public void appendComment() {\n Integer belongTo = getParaToInt(\"belongTo\"); //MUST\n String content = getPara(\"content\"); //MUST\n String createdBy = getPara(\"createdBy\"); //MUST\n if (belongTo == null || content == null || createdBy == null) {\n mResult.fail(102);\n renderJson(mResult);\n return;\n }\n mResult.success(mCommentService.publish(createdBy, belongTo, content));\n renderJson(mResult);\n }", "public interface CommentService {\n @GET(Constants.URL_STATUS_FRAG)\n Observable<CommentsWrapper> getCommentsShow(@Query(\"id\") long id);\n @FormUrlEncoded\n @POST(Constants.URL_NEW_COMMENT_ACTIVITY)\n void postComment(@Field(\"access_token\") String token, @Field(\"comment\") String text,@Field(\"id\") long id,Callback<Comment> callback);\n}", "@Transactional\r\n\t@RequestMapping(value = { \"/comment\", \"/komentar\" }, method = RequestMethod.POST)\r\n\tpublic ResponseEntity<Comment> add(Comment comment) {\r\n\r\n\t\tcomment.setCommentState(CommentState.PENDING);\r\n\t\treturn new ResponseEntity(commentRepository.save(comment), HttpStatus.OK);\r\n\t}", "private void updateLiveComment(String comment) {\n MainActivity mainActivity = (MainActivity) this.getContext();\n mainActivity.setLiveComment(comment);\n }", "public void saveComment(Comment comment) {\n\t\tSQLiteDatabase db=dbHelper.getWritableDatabase();\n\t\tif(db.isOpen()){\n\t\t\tContentValues cv = new ContentValues();\n\t\t\tcv.put(COLUMN_NAME_CONTENT, comment.getContent());\n\t\t\tcv.put(COLUMN_NAME_ID, comment.getCommentID());\n\t\t\tcv.put(COLUMN_NAME_EVNET, comment.getEventID());\n\t\t\tcv.put(COLUMN_NAME_SPEAKER, comment.getSpeaker());\n\t\t\tcv.put(COLUMN_NAME_TIME, comment.getTime());\n\t\t\tdb.insert(TABLE_NAME, null,cv);\n\t\t}\n\t}", "private Task<Void> addComment(final DocumentReference postRef, final Comment comment) {\n final DocumentReference commentRef = postRef.collection(\"comments\").document();\n\n //In a transaction, add the new comment and update the aggregate totals\n return db.runTransaction(new Transaction.Function<Void>() {\n @Override\n public Void apply(Transaction transaction) throws FirebaseFirestoreException {\n Post post = transaction.get(postRef).toObject(Post.class);\n\n //Compute new number of comments\n int newNumComments = post.getNumComments() + 1;\n\n //Set new post info\n post.setComments(newNumComments);\n\n //Commit to Firestore db\n transaction.set(postRef, post);\n transaction.set(commentRef, comment);\n\n return null;\n }\n });\n }", "public interface MWTCommentService {\r\n\r\n @GET(\"/assets/{assetID}/comments\")\r\n void getComments(@Path(\"assetID\") String assetID,\r\n Callback<MWTCommentResult> cb);\r\n\r\n @FormUrlEncoded\r\n @POST(\"/assets/{assetID}/comments\")\r\n void addComments(@Path(\"assetID\") String assetID,\r\n @Field(\"action\") String action,\r\n @Field(\"content\") String content,\r\n Callback<MWTAddCommentResult> cb);\r\n}", "public final void editComment() {\n EditDialog newInstance = EditDialog.newInstance(this.mAlbumItem);\n newInstance.setViewModel(this.viewModel);\n newInstance.show(this.mFragmentManager, (String) null);\n }", "public void setComment(String comment)\n {\n this.comment = comment;\n }", "private void sendCommentsToDetailsActivity(){\n emailList = new ArrayList<>();\n commentList = new ArrayList<>();\n\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n final JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"reviewed_festivals\");\n for (int i = 0 ; i < jsonArray.length(); i++)\n {\n JSONObject fiesta_info = jsonArray.getJSONObject(i);\n String fid = fiesta_info.getString(\"id\");\n String email = fiesta_info.getString(\"email\");\n String comment = fiesta_info.getString(\"comment\");\n\n\n //idList.add(fid);\n emailList.add(email);\n commentList.add(comment);\n\n\n\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n requestQueue.add(request);\n\n\n }", "@Override\n @Transactional\n public void onSubmit() {\n ValueMap values = getModelObject();\n\n // check if the honey pot is filled\n if (StringUtils.isNotBlank((String)values.get(\"comment\")))\n {\n error(\"Caught a spammer!!!\");\n return;\n }\n // Construct a copy of the edited comment\n Snip snip = new Snip();\n SnipMeta meta= new SnipMeta();\n\n logger.info(this.getDefaultModel().toString());\n\n logger.info(((List<String>) values.get(\"select_all\")).toString());\n\n meta.setTags((ArrayList<String>)values.get(\"select_all\"));\n meta.setDescription((String) values.get(\"meta\"));\n\n\n // Set date of comment to add\n snip.setDate(new Date());\n snip.setCode((String)values.get(\"code\"));\n snipList.add(0, snip); //TODO: eliminare lo show di tutti gli snipp da snipList magari con una FIFO\n meta.setSnip(snip);\n\n\n //--------- get session ad manager ------\n MyAuthenticatedWebSession app_session = MyAuthenticatedWebSession.getYourAppSession();\n logger.info(\"web session is: \"+app_session.toString());\n EntityManager em = app_session.getEntityManager();\n //---------------------------------------------------\n\n Users tmp_id = em.find(Users.class ,app_session.getAttribute(\"user\"));\n //snip.setUser(app_session.getCurrentUser()); --less network more backend\n snip.setUser(tmp_id);\n em.getTransaction().begin();\n em.setFlushMode(COMMIT);\n em.persist(snip);\n em.persist(meta);\n em.flush();\n em.getTransaction().commit();\n\n\n // Clear out the text component\n values.put(\"code\", \"\");\n }", "public Comment(String data, String baseUri) {\n this(data);\n }", "public void setComment(String comment) {\n this.comment = comment;\n }", "public void setComment(String comment) {\n this.comment = comment;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n String id= request.getParameter(\"id\");\n //String user= request.getParameter(\"user\");\n String comment = request.getParameter(\"comment\");\n RequestDispatcher dispatcher = null;\n HttpSession session = request.getSession();\n int user = (int) session.getAttribute(\"userid\");\n dispatcher=getServletContext().getRequestDispatcher( \"/error.jsp\" );\n try{\n String sql = \"Insert into comment (createdon,modifiedon,refid,comment,postid) values (?,?,?,?,?)\";\n PreparedStatement preparedStatement = Database.getDatabase().connect.prepareStatement(sql);\n Calendar cal = Calendar.getInstance(); \n java.sql.Timestamp timestamp = new Timestamp(cal.getTimeInMillis());\n preparedStatement.setTimestamp(1, timestamp);\n preparedStatement.setTimestamp(2, timestamp);\n preparedStatement.setInt(3, user);\n preparedStatement.setString(4, comment);\n preparedStatement.setInt(5, Integer.parseInt(id));\n preparedStatement.executeUpdate();\n \n }\n catch (SQLException ex) {\n Logger.getLogger(Posts.class.getName()).log(Level.SEVERE, null, ex);\n }\n List<Comments> com = new ArrayList<>();\n ResultSet rs = Database.getDatabase().Query(\"select * from commentview\");\n try{\n while(rs.next()){\n\n Comments e = new Comments();\n e.setId(rs.getInt(1));\n e.setCreatedon(rs.getDate(2).toString());\n e.setModifiedon(rs.getDate(3).toString());\n e.setRefid(rs.getInt(4));\n e.setComment(rs.getString(5));\n e.setPostid(rs.getInt(6));\n e.setFullname(rs.getString(7));\n com.add(e);\n \n }\n dispatcher=getServletContext().getRequestDispatcher(\"/WEB-INF/home.jsp\" );\n request.setAttribute(\"comment\", com);\n dispatcher.include(request, response);\n }\n catch(Exception e){\n \n }\n \n dispatcher.include(request, response);\n \n }", "@PostMapping(\"{id}\")\n public Book addComments (@RequestBody String text, @PathVariable Long id) {\n return bookService.addComments(text, id);\n }", "public void setComment(String new_comment){\n this.comment=new_comment;\n }", "public void setComment(String comment) {\n this.comment = comment;\n }", "@PostMapping(value= \"/comments/\")\n\tpublic String createComments(@RequestBody List<Comment> comment) {\n\t\tlogger.debug(\"Saving comments.\");\n\t\tservice.createComments(comment);\n\t\treturn \"Comment records created.\";\n\t}", "private void addQuestion(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Uploading...\",\"Please wait...\",false,false);\n StringRequest stringRequest = new StringRequest(Request.Method.POST, UPLOAD_URL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String s) {\n //Disimissing the progress dialog\n loading.dismiss();\n\n //Showing toast message of the response\n Toast.makeText(AdQuestionActivity.this, s , Toast.LENGTH_LONG).show();\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n //Dismissing the progress dialog\n loading.dismiss();\n //Showing toast\n //Toast.makeText(getActivity(), volleyError.getMessage().toString(), Toast.LENGTH_LONG).show();\n Toast.makeText(AdQuestionActivity.this, \"Upload Error! \"+volleyError.getMessage().toString(), Toast.LENGTH_LONG).show();\n }\n }){\n @Override\n public String getBodyContentType() {\n return \"application/x-www-form-urlencoded; charset=UTF-8\";\n }\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n //Converting Bitmap to String\n String image = \"\";\n if(bitmap!=null)\n image = getStringImage(bitmap);\n\n //Getting Image Name\n //String name = editTextName.getText().toString().trim();\n\n\n //Creating parameters\n Map<String,String> params = new Hashtable<String, String>();\n\n //Adding parameters\n //StringEntity\n params.put(\"image\", image);\n// try {\n// params.put(\"qbody\", URLEncoder.encode(quesDesc.getText().toString(), \"UTF-8\"));\n// } catch (UnsupportedEncodingException e) {\n// e.printStackTrace();\n// }\n params.put(\"qbody\", quesDesc.getText().toString());\n params.put(\"qtitle\", textView.getText().toString());\n params.put(\"tagarray\",newTagArray);\n params.put(\"uid\", session.getUserName().toString());\n params.put(\"Content-Type\", \"application/json; charset=utf-8\");\n\n //returning parameters\n return params;\n }\n };\n\n MyApplication.getInstance().addToRequestQueue(stringRequest);\n }", "public void addComment(String c) {\n comments.add(c);\n }", "private void initWidgets(View view) {\n recyclerView = view.findViewById(R.id.recyclerView);\n mAddCommentText = view.findViewById(R.id.addCommentText);\n mAddComment = view.findViewById(R.id.add);\n mClose = view.findViewById(R.id.close);\n swipeRefreshLayout = view.findViewById(R.id.swipe);\n\n final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n linearLayoutManager.setReverseLayout(true);\n recyclerView.setLayoutManager(linearLayoutManager);\n initCommentAdapter();\n\n HelpMethods.closeKeyboard(getActivity());\n\n asyncFlag = true;\n asyncTask = new mAsyncTask();\n asyncTask.execute();\n\n mAddComment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String text = mAddCommentText.getText().toString();\n\n if (text.trim().isEmpty()) {\n Toast.makeText(getContext(), getString(R.string.COMMENT_TEXT), Toast.LENGTH_SHORT).show();\n\n } else {\n\n int current_user_id = HelpMethods.checkSharedPreferencesForUserId(getContext());\n if (current_user_id != getContext().getResources().getInteger(R.integer.defaultValue)) {\n // addNewComment(post_id, current_user_id, text, TimeMethods.getUTCdatetimeAsString());\n\n CommentMethodsHandler.addNewComment(post_id, current_user_id, text, TimeMethods.getUTCdatetimeAsString(), new CommentMethodsHandler.OnAddingNewCommentsListener() {\n @Override\n public void onSuccessListener() {\n Toast.makeText(getContext(), \"comment added\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onServerException(String ex) {\n\n }\n\n @Override\n public void onFailureListener(String ex) {\n\n }\n });\n mAddCommentText.setText(\"\");\n HelpMethods.closeKeyboard2(getView(), getContext());\n }\n }\n }\n });\n\n\n swipeRefreshLayout.setOnRefreshListener(new SwipyRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh(SwipyRefreshLayoutDirection direction) {\n Log.d(\"MainActivity\", \"Refresh triggered at \"\n + (direction == SwipyRefreshLayoutDirection.BOTTOM ? \"top\" : \"bottom\"));\n\n if (direction == SwipyRefreshLayoutDirection.BOTTOM) {\n //CommentMethodsHandler.getTop10Comments(post_id,0,new );\n datetime = TimeMethods.getUTCdatetimeAsString();\n g1(post_id, 0);\n swipeRefreshLayout.setRefreshing(false);\n } else if (direction == SwipyRefreshLayoutDirection.TOP) {\n //CommentMethodsHandler.getTop10Comments(adapter.getItemCount());\n g1(post_id, adapter.getItemCount());\n swipeRefreshLayout.setRefreshing(false);\n }\n }\n });\n\n\n mClose.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // disableAsyncTask();\n dismiss();\n }\n });\n\n }", "@Function Comment createComment(String data);", "protected void onPostExecute(String file_url) {\n\n\t\t\tif (Message_pl.this.success == 1) {\n\t\t\t\tToast.makeText(Message_pl.this, \"评论成功\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\n\t\t\t}\n\t\t\tif (Message_pl.this.success == 2) {\n\t\t\t\tToast.makeText(Message_pl.this, \"评论失败,刷新试试?\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\n\t\t\tpDialog.dismiss();\n\t\t}", "public void addComment(View v) {\n\t\tIntent i = new Intent(ReadComments.this, AddComment.class);\n\t\tstartActivity(i);\n\t}", "@Override\n\tpublic void add(CommentModel comment) {\n\t\tcomments.add(comment);\n\t}", "public void saveComment(ExoSocialActivity activity, ExoSocialActivity comment) throws ActivityStorageException;", "private void addCommentsToIssue(String comment) {\n\t\tApplicationUser currentUser = ComponentAccessor.getUserManager().getUser(\"NoFails\");\n\t\t// Get access to the Jira comment and component manager\n\t\tCommentManager commentManager = ComponentAccessor.getCommentManager();\n\t\t// Get the last comment entered in on the issue to a String\n\t\tcommentManager.create(issue, currentUser, comment, true);\n\t}", "public void setComments(String comments) {\n _comments = comments;\n }", "public void addComments(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), COMMENTS, value);\r\n\t}", "public void postReview(String author, String review, String game, String rating, String heading) {\n displayLoader();\n JSONObject request = new JSONObject();\n try {\n //Populate the request parameters\n request.put(Constants.AUTHOR, author);\n request.put(Constants.REVIEW, review);\n request.put(Constants.GAME, game);\n request.put(Constants.RATING, rating);\n request.put(Constants.HEADING, heading);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n JsonObjectRequest jsArrayRequest = new JsonObjectRequest\n (Request.Method.POST, jsonURL1, request, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n pDialog.dismiss();\n try {\n //Check if user got registered successfully\n if (response.getInt(Constants.STATUS) == 0) {\n //Set the user session\n Toast.makeText(getApplicationContext(),\n \"Review Posted! Head to your User Page to check it out!\", Toast.LENGTH_LONG).show();\n Intent i = new Intent(getApplicationContext(), UserPageActivity.class);\n startActivity(i);\n\n }else if(response.getInt(Constants.STATUS) == 1){\n //Display error message if username is already taken\n Toast.makeText(getApplicationContext(),\n \"Error!\", Toast.LENGTH_LONG).show();\n //Intent i = new Intent(getApplicationContext(), UserPageActivity.class);\n // startActivity(i);\n\n }else{\n Toast.makeText(getApplicationContext(),\n response.getString(Constants.MESSAGE), Toast.LENGTH_SHORT).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n pDialog.dismiss();\n\n //Display error message whenever an error occurs\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n // Access the RequestQueue through your singleton class.\n MySingleton.getInstance(this).addToRequestQueue(jsArrayRequest);\n }", "public void setComments(String comments) {\n this.comments = comments;\n }", "public void setComments(String comments) {\r\n this.comments = comments;\r\n }", "public static void addCommentToPR(ApprovalRequest ar,\r\n\t\t\tLongString commentText, String commentTitle, Date commentDate,\r\n\t\t\tUser commentUser) {\r\n\t\tComment comment = new Comment(ar.getPartition());\r\n\t\tcomment.setType(Comment.TypeGeneral);\r\n\t\tcomment.setText(commentText);\r\n\t\tcomment.setTitle(commentTitle);\r\n\t\tcomment.setDate(commentDate);\r\n\t\tcomment.setUser(commentUser);\r\n\t\tcomment.setExternalComment(true);\r\n\t\tcomment.setParent(ar);\r\n\t\tar.getApprovable().getComments().add(comment);\r\n\r\n\t}", "private void enterComment(String comment) {\n delegationDefaultCreationScreen.commentField.sendKeys(comment);\n }", "public void setComment(java.lang.String comment) {\r\n this.comment = comment;\r\n }", "@Override\n public void onClick(View v) {\n String issue = textFieldIssue.getText().toString();\n String subject = textFieldSubject.getText().toString();\n\n\n if(issue.isEmpty() || subject.isEmpty() ){\n Toast.makeText(InputFromUser.this, \"Please try your entries again!\", Toast.LENGTH_LONG).show();\n }else {\n //post request with session key getting sent to the server\n String url_session = \"http://198.211.99.235:8080/ticket/v1/\" + sesskey + \"/put\";\n OkHttpHandler1 handler = new OkHttpHandler1(subject, issue);\n String result1 = null;\n try {\n result1 = handler.execute(url_session).get();\n if (result1 != null) {\n Toast.makeText(InputFromUser.this, \"Your ticket was sent!\", Toast.LENGTH_LONG).show();\n textFieldIssue.setText(\"\");\n textFieldSubject.setText(\"\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n }}", "@Before({PostIntercept.class, UserIntercept.class})\n @ActionKey(\"/api/blog/replyComment\")\n public void replyComment() {\n Integer belongTo = getParaToInt(\"belongTo\"); //MUST your new comment's id\n String content = getPara(\"content\"); //MUST\n String createdBy = getPara(\"createdBy\"); //MUST\n Integer replyTo = getParaToInt(\"replyTo\"); //MUST reply to which comment's id\n\n if (belongTo == null || content == null || createdBy == null || replyTo == null) {\n mResult.fail(102);\n renderJson(mResult);\n return;\n }\n mResult.success(mCommentService.reply(createdBy, belongTo, content, replyTo));\n renderJson(mResult);\n }" ]
[ "0.73554", "0.68813115", "0.6862447", "0.6827121", "0.64887106", "0.64814746", "0.6352603", "0.6276106", "0.62303454", "0.60712534", "0.60376686", "0.59839565", "0.5948048", "0.591639", "0.5846076", "0.58339965", "0.58115727", "0.58047885", "0.580064", "0.57288355", "0.57113636", "0.57026273", "0.5673051", "0.565683", "0.56355536", "0.562203", "0.5580031", "0.5561589", "0.5557093", "0.55459976", "0.55430466", "0.551305", "0.5511189", "0.54955786", "0.5489834", "0.54854226", "0.54800165", "0.5453878", "0.544614", "0.5445154", "0.5438116", "0.5435605", "0.54316807", "0.5424249", "0.5412339", "0.5409209", "0.5409209", "0.54078937", "0.54069066", "0.540297", "0.539983", "0.5395142", "0.539131", "0.53883433", "0.53870445", "0.5385361", "0.53829575", "0.538232", "0.53699464", "0.53627145", "0.5340947", "0.53162503", "0.53123593", "0.5302687", "0.529349", "0.5290565", "0.5288925", "0.5284858", "0.528107", "0.52801365", "0.5268217", "0.5260739", "0.5255149", "0.5247428", "0.5245807", "0.5245807", "0.5245533", "0.5242827", "0.5236957", "0.52271885", "0.52165943", "0.5215803", "0.52035326", "0.5194682", "0.51914525", "0.5185647", "0.51800233", "0.5169542", "0.51598936", "0.5158959", "0.51574755", "0.5149413", "0.5147392", "0.51377404", "0.5136212", "0.5131514", "0.51225394", "0.51212406", "0.51187193", "0.5109376" ]
0.67941046
4
Refreshes the screen data by restarting the activity.
private void refreshScreen(){ Intent thisIntent = getIntent(); finish(); startActivity(thisIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onRestart() {\r\n super.onRestart();\r\n refreshData();\r\n }", "private void refresh() {\n\t\tIntent intent = new Intent(BacklogActivity.this, BacklogActivity.class);\n\t\tstartActivity(intent);\n\t}", "@Override\r\n public void onResume() {\r\n super.onResume();\r\n refreshData();\r\n }", "private void restart(){\n model.init();\n view.refreshPieces();\n start();\n }", "@Override\r\n\tprotected void onResume() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onResume();\r\n\t\t\r\n\t\trefresh();\r\n\t}", "@Override\n public void onRestart() {\n model.onRestartScreen(state.titulo,state.comenzar);\n }", "private void refreshScreen() {\n app.getMainMenu().getTextField().clear();\n for (int key = 0; key < 96; key++) {\n app.getWorkSpace().getGridCell(key).unhighlightGridCell();\n app.getWorkSpace().getGridCell(key).updateState(app);\n }\n Storage.getInstance().writeObject(\"workspace\", app.getWorkSpace().getWorkSpaceMap());\n app.show();\n }", "@Override\n public void onResume() {\n super.onResume();\n refreshContent();\n }", "public void refresh()\n {\n refresh( null );\n }", "@Override\n public void onResume()\n {\n super.onResume();\n //Refresh your stuff here\n }", "@Override\n public void onResume()\n {\n super.onResume();\n //Refresh your stuff here\n\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n recreate();\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n xHelper.log(\"goapp\",\"BoardActivity onRestart\");\n }", "protected void refresh()\n {\n refresh(System.currentTimeMillis());\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tLog.d(\"tag\", \"-------onRestart-------\");\n\t\t// 刷新listview\n\t}", "public void refreshData() {\n\n if (!mUpdatingData) {\n new RefreshStateDataTask().execute((Void) null);\n }\n }", "public void refresh() {\n\t\tgetData();\n\t\trender();\n\t}", "public void refresh() {\r\n\t\tinit();\r\n\t}", "@Override\n public void onRestart() { // After a pause OR at startup\n super.onRestart();\n Log.d(TAG, \"onRestart: Refreshing user's list of groups\");\n\n //Rebuild the list of groups the user is in\n this.view = findViewById(R.id.userInformation);\n results.clear();\n this.setupUserView(view);\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\ttActivityDisplay.setText(\"On Restart Called\");\n\t}", "@Override\n\tpublic void refresh(){\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "public void restart()\n\t{\n\t\tinit();\n\t}", "private void refreshTimeSettings()\n\t{\n\t\tIntent i = new Intent(this, MyTimeSettings.class);\n\t\ti.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\ti.putExtra(MyTimeSettingsFragment.EXTRA_REFRSH_AND_CLOSE, true);\n\t\tthis.startActivity(i);\n\t\t\n\t}", "public void restart() {\n\n\t\t//Reset the list of Mho locations\n\t\tmhoLocations.clear();\n\n\t\t//Generate a unique map of game elements again\n\t\tgenerateMap();\n\n\t\t//reset gameOver and win variables\n\t\tgameOver = false;\n\t\twin = false;\n\n\t\t//repaint the board\n\t\tboard.repaint();\n\t}", "public synchronized void restart() {\n printReport();\n printGlobalOpsPerSec();\n metrics.clear();\n intervalStartedAt = null;\n startedAt = null;\n\n reportStream.println(\"\");\n reportStream.println(\"Metrics have been reset\");\n reportStream.println(\"\");\n }", "public void reload() {\n reload(true);\n reload(false);\n }", "public void restart() {\r\n\t\tstart();\r\n\t}", "@Override\n public void onRefresh() {\n loadData();\n }", "@Override\n public void onResume()\n {\n super.onResume();\n empty = true;\n loadData();\n initializeUI();\n }", "@Override\n public void refresh() {\n refresher.enqueueRefresh();\n }", "public static void reload() {\n\t\tatlasHelpScreen.reload();\n\t}", "public void restartActivity() {\n finish();\n startActivity(getIntent());\n }", "@Override\n public void onResume() {\n super.onResume();\n setUpScreen();\n }", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tpublic void onRefresh() {\n\t\tif (!isLoading) {\r\n\t\t\tbottomActivityId = 0;\r\n\t\t\tgetNotificationFromNetWork(\"1\", \"0\");\r\n\t\t}\r\n\t}", "protected void refresh() {\n\t}", "@Override\n public void onRefresh() {\n getData();\n }", "@Override\n protected void onResume() {\n super.onResume();\n updateUI();\n }", "@Override\n\t\tpublic void onRefresh() {\n\t\t\tloadInfo(1, 0);\n\t\t}", "@FXML private void refreshData(){\n\t\tclearFields();\n\t\treadUsers();\n\t\tshowUsers();\n\t\trefreshInformationsFromTableView(null);\n\t}", "public void restart() {\n\t\tthis.restartEvent.emit();\n\t}", "public void restartGame() {\n\t\tclearGame();\n\t\tstartGame();\n\t}", "protected void onRestart ()\n\t{\n\t\tsuper.onRestart ();\n\t}", "public void refresh() {\r\n\t\tmainGUI.getPlayerFrame().setMyTurn(\r\n\t\t\t\tclient.getID() == island.getCurrentPlayer().getID());\r\n\t\ttradingMenu.update();\r\n\t\tsupplyPanel.update();\r\n\t\tcardMenu.update();\r\n\t\trefreshOpponents();\r\n\t}", "public void refresh() {\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n }", "public void restartGame() {\n\t\tplayerTurn = 1;\n\t\tgameStart = true;\n\t\tdispose();\n\t\tplayerMoves.clear();\n\t\tboardSize();\n\t\tnew GameBoard();\n\t}", "@Override\n public void onRefresh() {\n refreshData();\n }", "@Override\n\t\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tToast.makeText(getApplicationContext(), \"onRestart\", Toast.LENGTH_SHORT).show();\n\n\t\t}", "@Override\n\tprotected void onRestart() {\n\t\tshowPhoto(0);\n\t\tsuper.onRestart();\n\t}", "private void refreshData(){\n Log.d(LOG_TAG, \"refreshData()\");\n mRVAdapter.setData(null);\n loadData();\n }", "public void restartDataset() {\n data = new Instances(initialData);\r\n loadInstancesData(data);\r\n RequestContext.getCurrentInstance().update(\"IdFormDialogsSelection:IdPanelSelection\");\r\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n\n }", "public void startRefresh() {\n SmartDashboard.putNumber(\"Ele P\", 0.0);\n SmartDashboard.putNumber(\"Ele I\", 0.0);\n SmartDashboard.putNumber(\"Ele D\", 0.0);\n SmartDashboard.putNumber(\"Ele Set\", 0.0);\n }", "@Override\n protected void onRestart(){\n super.onRestart();\n Log.d(TAG_INFO,\"application restarted\");\n }", "@Override\n protected void onRestart(){\n super.onRestart();\n Log.d(TAG_INFO,\"application restarted\");\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t}", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t}", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t}", "@Override\n public void restart() {\n }", "private void refreshData() {\n // Prevent unnecessary refresh.\n if (mRefreshDataRequired) {\n // Mark all entries in the contact info cache as out of date, so\n // they will be looked up again once being shown.\n mAdapter.invalidateCache();\n fetchCalls();\n mRefreshDataRequired = false;\n }\n }", "public void reload() {\n\t\tpause();\n\t\tsetPosition(0);\n\t}", "@Override\r\n\tprotected void onRestart() {\n\t\tXSDK.getInstance().onRestart();\r\n\t\tsuper.onRestart();\r\n\t}", "public void refreshDisplayData() {\n if (useLiveDisplayUpdates && displaySection.isOpen()) {\n displayPanel.setValue(device.getDisplayData(), true);\n }\n\n }", "Snapshot refresh();", "public static void reload()\r\n {\r\n reloadAsynch();\r\n waitWhileLoading();\r\n }", "@Override\n protected void onResume() {\n super.onResume();\n loadData();\n }", "@Override\n protected void onResume() {\n super.onResume();\n loadData();\n }", "public void refresh() {\n\n realm.refresh();\n }", "public void refresh() {\n\n realm.refresh();\n }", "public void restart()\n\t{\n\t\tstop();\n\t\treset();\n\t\tstart();\n\t}", "public void reloadData() {\n\t\tinitializeStormData();\n\t\tsuper.reloadData();\n\t}", "public void Refresh()\n\t{\n\t}", "protected void restart() {\r\n\t\tthis.stop();\r\n\t\tthis.start();\r\n\t}", "@Override\n\tprotected void onRestart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onRestart();\n\t\tLog.e(\"mainactivity\", \"restarted\");\n\t}", "public void restart() {\n Board.gameOver = false;\n CollisionUtility.resetScore();\n loadMenu();\n }", "@Override\r\n protected void onRestart() {\n\tsuper.onRestart();\r\n }", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "@Override\n public void onRefresh() {\n\n GetFirstData();\n }", "public final void restartApp() {\r\n Intent intent = new Intent(getApplicationContext(), SplashActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }", "public void restart();", "public void reload() {\n waiterNotifications.clear();\n waiterNotifications.addAll(Local.getInstance().getWaiterNotificationList());\n notifyDataSetChanged();\n\n }", "@Override\r\n protected void onRestart() {\n super.onRestart();\r\n mapview.onRestart();\r\n }", "public void reload() {\n reloading = true;\n }", "protected void restart()\r\n \t{\r\n \t\tspielen();\r\n \t}", "public void reload();", "private void resetApp() {\n\t\tSession.inResetMode = true;\n\t\t// Stopping alarm and GPS services at reset.\n\t\t// MyAlarmService.cancelMyAlarmService(this.getApplicationContext());\n\t\tif (Sw_LoginScreenActivity.this.stopService(new Intent(Sw_LoginScreenActivity.this, MyAlarmService.class))) {\n\t\t\tMyAlarmService.running = false;\n\t\t\tLog.w(\"Snowboard\", \"MyAlarmService stopped due to application reset.\");\n\t\t} else {\n\t\t\tLog.e(\"Snowboard\", \"Failed to stop MyAlarmService in application reset.\");\n\t\t}\n\n\t\tif (Sw_LoginScreenActivity.this.stopService(new Intent(Sw_LoginScreenActivity.this, GPSService.class))) {\n\t\t\tLog.w(\"Snowboard\", \"GPSService stopped due to application reset.\");\n\t\t} else {\n\t\t\tLog.e(\"Snowboard\", \"Failed to stop GPSService in application reset.\");\n\t\t}\n\n\t\ttry {\n\t\t\tDataBaseHelper myDbHelper = new DataBaseHelper(Sw_LoginScreenActivity.this);\n\t\t\ttry {\n\t\t\t\t// Deleting Previous Database.\n\t\t\t\tmyDbHelper.dbDelete();\n\t\t\t} catch (Exception ioe) {\n\t\t\t\tLog.e(TAG, \"Unable to delete database\");\n\t\t\t}\n\t\t\tLog.i(TAG, \"DB Deleted\");\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// clear preferences\n\t\teditor.clear();\n\t\teditor.commit();\n\n\t\teditor.putBoolean(Config.IS_RESET_KEY, true);\n\t\teditor.putString(Config.SERVER_URL_KEY, NetworkUtilities.BASE_URL);\n\t\teditor.commit();\n\n\t\t// Recalling this activity\n\t\tstartActivity(new Intent(Sw_LoginScreenActivity.this, Sw_LoginScreenActivity.class));\n\t\tfinish();\n\t}", "@Override\n \tprotected void onRestart() {\n \t\tsuper.onRestart();\n \t\tLog.d(TAG, \"onRestart\");\n \t}", "@Override\n public void onRefresh() {\n synchronizeContent();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\trefreshListView();\n\t}" ]
[ "0.7478787", "0.7107211", "0.6997274", "0.67614466", "0.6744368", "0.6646439", "0.6645906", "0.6624859", "0.6573657", "0.65153646", "0.65046024", "0.6502828", "0.6496647", "0.6491158", "0.6411138", "0.640377", "0.6401852", "0.63246536", "0.6286516", "0.62845427", "0.62832266", "0.62683", "0.6237049", "0.6221234", "0.6219113", "0.6217026", "0.61604846", "0.6154693", "0.6153662", "0.61528105", "0.614708", "0.61401796", "0.6136623", "0.60968626", "0.6094906", "0.6094906", "0.6094906", "0.6090075", "0.6082471", "0.60808617", "0.60761786", "0.6075962", "0.60758054", "0.60649663", "0.6062148", "0.606001", "0.60566103", "0.6054154", "0.6051871", "0.6051871", "0.6051554", "0.6050007", "0.6040908", "0.6032513", "0.6030222", "0.60196227", "0.60174567", "0.6014923", "0.6007668", "0.6007668", "0.6000549", "0.6000549", "0.6000549", "0.59994674", "0.5998035", "0.59977335", "0.5992721", "0.5991646", "0.5986951", "0.5981515", "0.5979163", "0.5979163", "0.59674495", "0.59674495", "0.5964047", "0.59569", "0.5956256", "0.59305394", "0.5928539", "0.5923764", "0.5918931", "0.59180963", "0.59180963", "0.59180963", "0.59180963", "0.59180963", "0.59180963", "0.59180963", "0.59113145", "0.5909697", "0.5907368", "0.5902347", "0.5900808", "0.5891111", "0.58910584", "0.5887531", "0.5872153", "0.5870738", "0.58706623", "0.58704185" ]
0.7430834
1
private boolean flipped = false;
@Override public void init() { runtime.reset(); robot.init(hardwareMap); telemetry.addData("Status", "Initialized"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void flip() {\n _flipped = !_flipped;\n }", "public void flip(){\n this.faceDown = !this.faceDown;\n }", "public void setFlip() {\n\t\tflip = true;\n\t}", "public void flipCard() {\n this.faceUp = !faceUp;\n }", "private boolean isFlipped(){\n switch(this.orientation){\n case \"0\": case\"1\": case\"2\": case\"3\": return false;\n case \"4\": case\"5\": case\"6\": case\"7\": return true;\n default: return false;\n }\n }", "public void setFlipped() {\n\t\thasFlipped = true;\n\t}", "void enableFlipMode();", "public void flip() {\r\n \tif (flip != 0) {\r\n \t\tflipValue = -1;\r\n \t\tflipReposition = frameWidth;\r\n \t} else {\r\n \t\tflipValue = 1;\r\n \t\tflipReposition = 0;\r\n \t}\r\n }", "public void reverseFrame() {\r\n if (reversedImage) {\r\n reversedImage = false;\r\n } else {\r\n reversedImage = true;\r\n }\r\n }", "public boolean isFlipping() {\n return mKeepFlipping;\n }", "public void flip() {\n float tx = x1;\n float ty = y1;\n x1 = x2;\n y1 = y2;\n x2 = tx;\n y2 = ty;\n nx = -nx;\n ny = -ny;\n }", "private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}", "public void changeisReversed()\r\n\t{\r\n\t\tisReversed = !isReversed;\r\n\t}", "public Piece flip(){\n if(this == BLACK){\n return WHITE;\n }\n else{\n return BLACK;\n }\n }", "public Flip() {\n super(\"!flip\", true);\n }", "public void flip(){\n Matrix mirrorMatrix = new Matrix();\n mirrorMatrix.preScale(-1, 1);\n Bitmap turnMap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), mirrorMatrix, false);\n turnMap.setDensity(DisplayMetrics.DENSITY_DEFAULT);\n bitmap = new BitmapDrawable(turnMap).getBitmap();\n }", "void disableFlipMode();", "@Override\n public void Invert() {\n\t \n }", "public void revert()\n\t{\n\t\tswingingWay1 = !swingingWay1;\n\t}", "public void mirror() {\n this.mirrored = !this.mirrored;\n }", "@Override\r\n\tpublic boolean reverseAccrualIt() {\n\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public void flip() {\n\t\t\tif (showing.getImage() == faceUp) {\n\t\t\t\tshowing.setImage(FACE_DOWN);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tshowing.setImage(faceUp);\n\t\t\t}\n\t\t}", "boolean turnFaceDown();", "public void setFaceDown(){faceUp = false;}", "public boolean isSwitched();", "public void flip() {\r\n\t\tObject[] bak = path.toArray(new Direction[path.size()]);\r\n\t\tpath.clear();\r\n\t\tfor (int i = bak.length-1; i >= 0; i--) {\r\n\t\t\tpath.push((Direction) bak[i]);\r\n\t\t}\r\n\t}", "void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}", "protected final byte[] flipCurrentBuffer()\n {\n byte[] returnBuf = currentBuf;\n currentBuf = ( currentBuf == buf1 ) ? buf2 : buf1;\n return returnBuf;\n }", "@Override\n\tpublic boolean reverseAccrualIt() {\n\t\treturn false;\n\t}", "public void flip(int bitIndex);", "private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}", "public void setReverse(Boolean newValue);", "public void setReverse(Boolean newValue);", "public boolean isSwitchedOn(){\r\n return _switchedOn;\r\n }", "public void flipHidden()\n {\n for(int i=0;i<7;i++)\n {\n if(tableauVisible[i].isEmpty() && !tableauHidden[i].isEmpty())\n tableauVisible[i].forcePush(tableauHidden[i].pop());\n } \n }", "public void flipV() {\r\n int tmp, sym;\r\n for (int col = 0; col < pixels.length; ++col) {\r\n for (int row = 0; row < pixels[col].length / 2; ++row) {\r\n // find the column index of the vertically symmetric pixel\r\n sym = pixels[col].length - 1 - row;\r\n // swap the pixel value between the two\r\n tmp = pixels[col][row];\r\n pixels[col][row] = pixels[col][sym];\r\n pixels[col][sym] = tmp;\r\n }\r\n }\r\n this.pix2img();\r\n }", "private void flipArrow() {\n arrow.setRotation(0);\n arrow.setScaleX(-1);\n arrow.setRotation(50);\n }", "private void swapSign() {\n isPositive = !isPositive;\n }", "public boolean isFaceUp(){return faceUp;}", "public boolean reverseAnimate() {\n\t\treturn reverse;\n\t}", "public PImage flipVH(PImage img)\n {\n PImage flipped = createImage(img.width,img.height,RGB);\n flipped.loadPixels();\n for(int i = 0; i < img.width; i++)\n {\n for(int j = 0; j < img.height; j++)\n {\n int loc = i + j * flipped.width;\n int locFlipped = (img.width-i-1) + (img.height-j-1) * flipped.width;\n if(img.pixels[loc] == color(0,0,0))\n {\n flipped.pixels[locFlipped] = color(0,0,0);\n }\n else\n {\n flipped.pixels[locFlipped] = color(255,255,255);\n }\n }\n }\n flipped.updatePixels();\n return flipped;\n }", "public boolean isInverted() {\n/* 59 */ return ((getData() & 0x8) != 0);\n/* */ }", "public void invert(boolean direction){\n intake.setInverted(direction);\n }", "private static Character flip(Character c){\n return c == '0'?'1':'0';\n }", "public void toggle()\n\t{\n\t\tbitHolder.setValue(Math.abs(bitHolder.getValue() - 1 ));\n\t\t\n\t}", "public void flipOverY(){\n int len = tileChars.length;\r\n \r\n // swap columns\r\n for (int i = 0; i < len; i++)\r\n {\r\n for (int j = 0; j < len / 2; j++)\r\n {\r\n char temp = tileChars[i][j];\r\n tileChars[i][j] = tileChars[i][len - j - 1];\r\n tileChars[i][len - j - 1] = temp;\r\n }\r\n }\r\n \r\n boolean temp = this.matchFound[1];\r\n this.matchFound[1] = this.matchFound[3];\r\n this.matchFound[3] = temp;\r\n \r\n this.recalculateEdges(); //fix edges\r\n }", "public synchronized Block flip() {\r\n\t\t// TODO ILLEGAL STATUS: THROW AN EXCEPTION HERE\r\n\t\tif(status == Status.Fliped || status == Status.Cleared)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\tstatus = Status.Fliped;\r\n\t\t// when it is clicked when it should be flipped back after a short interval, the flag should be \r\n\t\t// reset to avoid being covered at which the card should be shown\r\n\t\tdelayedCover = false;\r\n\t\tgraphics.updateBlock();\r\n\t\treturn this;\r\n\t}", "public void flipDirection(Direction flip){\n \tswitch (direction){\n\t\t\tcase NORTH: \n\t\t\t\tdirection = Direction.SOUTH;\n\t\t\t\tbreak;\n\t\t\tcase NORTHEAST:\n\t\t\t\tif (flip == Direction.EAST) direction = Direction.NORTHWEST;\n\t\t\t\telse direction = Direction.SOUTHEAST;\n\t\t\t\tbreak;\n\t\t\tcase EAST:\n\t\t\t\tdirection = Direction.WEST;\n\t\t\t\tbreak;\n\t\t\tcase SOUTHEAST:\n\t\t\t\tif (flip == Direction.EAST) direction = Direction.SOUTHWEST;\n\t\t\t\telse direction = Direction.NORTHEAST;\n\t\t\t\tbreak;\n\t\t\tcase SOUTH:\n\t\t\t\tdirection = Direction.NORTH;\n\t\t\t\tbreak;\n\t\t\tcase SOUTHWEST:\n\t\t\t\tif (flip == Direction.WEST) direction = Direction.SOUTHEAST;\n\t\t\t\telse direction = Direction.NORTHWEST;\n\t\t\t\tbreak;\n\t\t\tcase WEST:\n\t\t\t\tdirection = Direction.EAST;\n\t\t\t\tbreak;\n\t\t\tdefault: //NORTHWEST\n\t\t\t\tif (flip == Direction.WEST) direction = Direction.NORTHEAST;\n\t\t\t\telse direction = Direction.SOUTHWEST;\n\t\t\t\tbreak;\n \t\t}\n }", "public void setFaceUp(){faceUp = true;}", "public void flipCoin() {\n coin.flip();\n }", "@Override\n\tpublic boolean reverseCorrectIt() {\n\t\treturn false;\n\t}", "public void setInverted(boolean inv) {\n/* 69 */ int dat = getData() & 0x7;\n/* 70 */ if (inv) {\n/* 71 */ dat |= 0x8;\n/* */ }\n/* 73 */ setData((byte)dat);\n/* */ }", "@NotNull\n private Coordinate flipV() {\n angle = -angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(this.centerPointCoordinate.getXCoordinate(),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(90 - angle))));\n return nextCenterPointCoordinate;\n }", "public boolean isFacingMirrored() {\n return mIsMirrored;\n }", "public void flipBoard() {\r\n\t\tfor (int i = 0; i < this.SIZE/2; i++) {\r\n\t\t\tfor (int j = 0; j < this.SIZE; j++) {\r\n\t\t\t\tswap(j, this.SIZE - 1 - i, j, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void rotatePiece() {\n boolean temp = this.left;\n boolean temp2 = this.up;\n boolean temp3 = this.right;\n boolean temp4 = this.down;\n this.left = temp4;\n this.up = temp;\n this.right = temp2;\n this.down = temp3;\n }", "public Squarelotron sideFlip(String side);", "public void setReverse(boolean reverse) {\n\t\tif (isReverse != reverse) {\n\t\t\tisReverse = reverse;\n\t\t\tpauseMusic();\n\t\t\tint position;\n\t\t\tif (isReverse) {\n\t\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(musicSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(reverseSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(wahDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revWahDistortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah) {\n\t\t\t\t\tposition = alGetSourcei(wahSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revWahSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(distortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revDistortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(reverseSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(musicSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(revWahDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(wahDistortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah) {\n\t\t\t\t\tposition = alGetSourcei(revWahSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(wahSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(revDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(distortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t}\n\t\t\tplayMusic();\n\t\t}\n\t}", "void reverseDirection();", "public void flip() {\n flipRecur(root);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }", "boolean turnFaceUp();", "public void flipper(int bit)\n\t{\n\t\tif (binaryCode[bit])\n\t\t{\n\t\t\t//if value is true, it becomes false\n\t\t\tbinaryCode[bit]=false;\n\n\t\t} else {\n\t\t\t\n\t\t\t//if value is false, it becomes true\n\t\t\tbinaryCode[bit]=true;\n\t\t}\n\t}", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "public void toggle(){\r\n isDown = !isDown;\r\n }", "public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }", "public void flipCoin() {\n\t\tfaceUp = (int) (Math.random() * ((1 - 0 + 1) + 0));\n\n\t}", "public void setShuffle() {\n\t\tthis.shuffle = !this.shuffle;\n\t}", "private void checkFlipDirection()\n\t{\n\t\tif (currentFloor == 0) //Are we at the bottom?\n\t\t\tcurrentDirection = Direction.UP; //Then we must go up\n\t\tif (currentFloor == (ElevatorSystem.getNumberOfFloors() - 1)) //Are we at the top?\n\t\t\tcurrentDirection = Direction.DOWN; //Then we must go down\n\t}", "private final void flipBonusCard() {\n\t\tstate.setBonusCard(deck.removeTopCard());\n\t}", "@Test\n public final void testIsOrientation() {\n boolean result = ship.isOrientation();\n assertTrue(result);\n this.ship.setOrientation(false);\n result = ship.isOrientation();\n assertFalse(result);\n }", "private void flipArray(T[] array) {\n int point1 = 0,point2 = array.length - 1;\r\n while (point1 < point2) {\r\n T t = array[point1];\r\n array[point1] = array[point2];\r\n array[point2] = t;\r\n point1++;\r\n point2--;\r\n }\r\n }", "private void flipOrientation() {\n try {\n if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_0) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_180);\n } else if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_90) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_270);\n } else if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_180) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_0);\n } else {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_90);\n }\n } catch (Settings.SettingNotFoundException e) {\n Log.e(TAG, e.getMessage());\n }\n }", "public void flipH() {\r\n int tmp, sym;\r\n for (int row = 0; row < pixels.length; ++row) {\r\n for (int col = 0; col < pixels[row].length / 2; ++col) {\r\n // find the column index of the horizontally symmetric pixel\r\n sym = pixels[row].length - 1 - col;\r\n // swap the pixel value between the two\r\n tmp = pixels[row][col];\r\n pixels[row][col] = pixels[row][sym];\r\n pixels[row][sym] = tmp;\r\n }\r\n }\r\n this.pix2img();\r\n }", "void flipUp( ) {\n\t\t\t\t\t\tUpCommand . execute ( ) ;\n\n\n\t\t}", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public void flipBattleCard() {\n flipCards(WarGameConstants.NUMBER_CARDS_TO_BATTLE);\n }", "public void startFlipping() {\n if (!mKeepFlipping) {\n mKeepFlipping = true;\n showOnly(mWhichChild);\n Message msg = mHandler.obtainMessage(FLIP_MSG);\n mHandler.sendMessageDelayed(msg, mFlipInterval);\n }\n }", "private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n dialog.setPadding(new Insets(0,0,0,7));\n }", "public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }", "public boolean shuffleNeeded();", "public void flipVertical() {\n\t\t\tthis.data = flipGridVertical(data);\n\t\t\tcomputeHashes();\n\t\t}", "public native int toggleShuffle();", "public boolean reverse() {\n if (type == 0) {\n return false;\n }\n type = (type == 1) ? 2 : 1;\n isFresh = false;\n return true;\n }", "public boolean isBlindRotating() {\n return isBlindRotating;\n }", "public static void flipVertical (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth();\n int ySize = bi.getHeight();\n\n // Temp image, to store pixels as we reverse everything\n BufferedImage newBi = new BufferedImage (xSize, ySize, 3); \n\n for (int i = 0; i < xSize; i++)\n {\n for (int j = 0; j< ySize; j++)\n {\n int rgb = bi.getRGB(i,j);\n newBi.setRGB(i,ySize-j-1, rgb); //flip the pixels\n }\n }\n for (int i = 0; i < xSize; i++)\n {\n for (int j = 0; j< ySize; j++)\n {\n bi.setRGB(i,j,newBi.getRGB(i,j)); // set each pixel of the original image \n }\n }\n redoList.add(deepCopy(bi)); // add the new image to the redo list\n }", "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "public native MagickImage flipImage() throws MagickException;", "public void flipHand(){\n int up = 0;\n int down = Hand.length-1;\n Card[] temp = new Card[Hand.length];\n for(int i=0;i<Hand.length;i++){\n temp[down]=Hand[up];\n up++;down--;\n }\n Hand=temp;\n }", "public void flipJags(){\n \t\tint length = jagsLeft.length/2;\n \t\tJaguar[] tempJags = new Jaguar[length];\n \t\t\n \t\ttempJags=jagsLeft;\n \t\tfor(int i=0; i < length; i++){ \n \t\t\tjagsLeft[i]=tempJags[length-1-i]; //Flip jaguars on left\n \t\t}\n \t\tfor(int i=0; i < length; i++){\n \t\t\ttempJags[i]=jagsRight[length-1-i]; //Flip jaguars on right\n \t\t}\n \t\t\n \t\tjagsRight = jagsLeft;\n \t\tjagsLeft = tempJags;\n assignLiveWindow();\n \t}", "@Override\n public boolean isReversible() {\n return true;\n }", "static Bitmap flip(Bitmap bitmap, boolean horizontal, boolean vertical) {\n Matrix matrix = new Matrix();\n matrix.preScale(horizontal ? -1 : 1, vertical ? -1 : 1);\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n }", "@JSProperty(\"reversed\")\n void setReversed(boolean value);", "void setForward(boolean isForward);", "private Bitmap flipImage(byte[] input, FileOutputStream fos){\n\n\t\t\t\tMatrix rotate_matrix = new Matrix();\n\t\t\t\trotate_matrix.preScale(-1.0f, 1.0f);\n\t\t\t\tBitmapFactory bmf = new BitmapFactory();\n\t\t\t\tBitmap raw_bitmap = bmf.decodeByteArray(input, 0, input.length);\n\t\t\t\tBitmap result = Bitmap.createBitmap(raw_bitmap, 0, 0, raw_bitmap.getWidth(), raw_bitmap.getHeight(), rotate_matrix, true);\n\t\t\t\treturn result;\n\t\t\t\t/*\n\t\t\t\tresult.compress(Bitmap.CompressFormat.JPEG, 90, fos);\n\t\t\t\ttry {\n\t\t\t\t\tfos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}", "@Override\n public void testPeriodic() {\n //manual flipper mvmt\n /*\n if(m_stick.getRawButton(upButton)){\n flipper.set(0.8);\n }\n else if(m_stick.getRawButton(downButton)){\n flipper.set(-0.8);\n }\n else {\n flipper.set(0);\n }\n */\n\n\n }", "private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }", "@NotNull\n private Coordinate flipH() {\n angle = 180 - angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(90 - angle))),\n this.centerPointCoordinate.getYCoordinate());\n return nextCenterPointCoordinate;\n }" ]
[ "0.8638879", "0.78943264", "0.74888486", "0.72073466", "0.7204576", "0.7188037", "0.7003085", "0.6992688", "0.6859282", "0.6769277", "0.6696064", "0.6667495", "0.66481286", "0.6646963", "0.6600926", "0.65589577", "0.6503395", "0.6417559", "0.63540363", "0.6297959", "0.6287034", "0.62808245", "0.6214736", "0.6211247", "0.6204233", "0.6180052", "0.61798906", "0.616809", "0.61664355", "0.61135983", "0.60919464", "0.60906976", "0.60906976", "0.60824525", "0.6079484", "0.6079122", "0.6071411", "0.6068005", "0.6022839", "0.6002802", "0.60007024", "0.5993763", "0.5992276", "0.5977355", "0.5975628", "0.5973994", "0.5948531", "0.594055", "0.59352285", "0.59313315", "0.591918", "0.5919004", "0.5909408", "0.58932394", "0.5881027", "0.5875518", "0.5873425", "0.58706313", "0.5858267", "0.58254874", "0.5806037", "0.5806037", "0.5806037", "0.5798722", "0.5794883", "0.578793", "0.5782726", "0.57804656", "0.575841", "0.57376367", "0.57309663", "0.5726996", "0.5722345", "0.57210284", "0.57161486", "0.57151306", "0.57140386", "0.5708556", "0.5708556", "0.56990194", "0.56952053", "0.5689975", "0.5682129", "0.5674464", "0.56648624", "0.5652356", "0.56393254", "0.5635803", "0.56333476", "0.56275666", "0.5620391", "0.56177866", "0.5613668", "0.5611146", "0.5605503", "0.5601138", "0.55974674", "0.55920213", "0.5583498", "0.55815876", "0.55751085" ]
0.0
-1
TODO Autogenerated method stub
@Override public void writeByte(int b) throws IOException { }
{ "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
Create the test case
public AppTest( String testName ) { super( testName ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Testcase createTestcase();", "@Test\n public void testCreate() {\n\n }", "private void generate_test_code()\n {\n int I;\n DataType[] ParamTypes = m_Problem.getParamTypes();\n DataType ReturnType = m_Problem.getReturnType();\n TestCase[] Cases = m_Problem.getTestCases();\n StringBuffer Code = new StringBuffer();\n\n Code.append(\"private:\\n\");\n\n // Generate the vector output function\n Code.append(\"\\ttemplate <typename T> string print_array(const vector<T> &V) { ostringstream os; os << \\\"{ \\\"; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << \\'\\\\\\\"\\' << *iter << \\\"\\\\\\\",\\\"; os << \\\" }\\\"; return os.str(); }\\n\\n\");\n\n // Generate the verification function\n generate_verification_code(Code, ReturnType);\n\n // Generate the individual test cases\n Code.append(\"\\n\");\n\n /*\n * Generate the test wrapper function that can call\n * either all or individual test cases. (-1 for all)\n */\n Code.append(\"public:\\n\");\n Code.append(\"\\tvoid run_test(int Case) { \\n\");\n Code.append(\"\\t\\tint n = 0;\\n\\n\");\n for (I = 0; I < Cases.length; ++I)\n generate_test_case(I, Code, ParamTypes, ReturnType, Cases[I]);\n // next\n Code.append(\"\\t}\\n\");\n\n // Insert the cut tags\n Code.insert(0, k_BEGINCUT);\n Code.append(k_ENDCUT);\n\n m_Tags.put(k_TESTCODE, Code.toString());\n }", "@Test\n public void autocreateLesson() throws Exception{\n\n }", "@Test\n public void shouldCreateCase() {\n assertThat(DatabaseHelper.getCaseDao().queryForAll().size(), is(0));\n\n TestEntityCreator.createCase();\n\n // Assure that the case has been successfully created\n assertThat(DatabaseHelper.getCaseDao().queryForAll().size(), is(1));\n }", "public void createTestCase(String testName) {\r\n\t\tif (!active) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (testName == null || testName.isEmpty()) {\r\n\t\t\tthrow new ConfigurationException(\"testName must not be null or empty\");\r\n\t\t}\r\n\t\t\r\n\t\tif (applicationId == null) {\r\n\t\t\tcreateApplication();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tJSONObject testJson = getJSonResponse(Unirest.post(url + TESTCASE_API_URL)\r\n\t\t\t\t\t.field(\"name\", testName)\r\n\t\t\t\t\t.field(\"application\", applicationId));\r\n\t\t\ttestCaseId = testJson.getInt(\"id\");\r\n\t\t} catch (UnirestException | JSONException e) {\r\n\t\t\tthrow new SeleniumRobotServerException(\"cannot create test case\", e);\r\n\t\t}\r\n\t}", "private void generate_test_case(int Index, StringBuffer Code, DataType[] ParamTypes, DataType ReturnType, TestCase Case)\n {\n int I;\n String[] Inputs = Case.getInput();\n String Output = Case.getOutput();\n String Desc = ReturnType.getDescription();\n\n /*\n * Generate code for setting up individual test cases\n * and calling the method with these parameters.\n */\n Code.append(\"\\t\\t// test_case_\" + Index + \"\\n\");\n Code.append(\"\\t\\tif ((Case == -1) || (Case == n)){\\n\");\n\n // Generate each input variable separately\n String additional = \"\";\n for (I = 0; I < Inputs.length; ++I)\n additional += generate_parameter(I, Code, ParamTypes[I], Inputs[I]);\n // next\n\n // Generate the output variable as the last variable\n additional += generate_parameter(Inputs.length, Code, ReturnType, Output);\n\n Code.append(\"\\n\" + additional);\n\n Code.append(\"\\t\\t\\tverify_case(n, Arg\" + Inputs.length + \", \" + m_Problem.getMethodName() + \"(\");\n\n // Generate the function call list\n for (I = 0; I < Inputs.length; ++I)\n {\n Code.append(\"Arg\" + I);\n\n if (I < (Inputs.length - 1))\n Code.append(\", \");\n // end if\n }\n // next\n\n Code.append(\"));\\n\\t\\t}\\n\\t\\tn++;\\n\\n\");\n }", "TestTarget createTestTarget();", "Case createCase();", "@BeforeMethod\r\n\tpublic void startTestCase() {\n\t\ttest = extent.createTest(testCaseName, testCaseDescription);\r\n\t\ttest.assignAuthor(author);\r\n\t\ttest.assignCategory(category);\r\n\t}", "@Test\r\n\tpublic void createChapterDriver() {\r\n\t\tfinal Object testingData[][] = {\r\n\t\t\t{ // Successful test\r\n\t\t\t\t\"producer3\", 305, null\r\n\t\t\t}, { // Content without year\r\n\t\t\t\t\"producer1\", 305, IllegalArgumentException.class\r\n\t\t\t}, { // A user tries to create an content \r\n\t\t\t\t\"user3\", 305, IllegalArgumentException.class\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < testingData.length; i++)\r\n\t\t\tthis.createChapterTemplate((String) testingData[i][0], (Integer) testingData[i][1], (Class<?>) testingData[i][2]);\r\n\t}", "public void createTestSuite(TestSuite testsuite, String[] testcases)\r\n\t\t\tthrows Exception {\r\n\r\n\t\tlogger\r\n\t\t\t\t.info(\"start to create testsuite:\"\r\n\t\t\t\t\t\t+ testsuite.getTestSuiteName());\r\n\t\tint suiteRowNum = addTestSuite(testsuite);\r\n\t\tcaseSuiteMapImpl.addTestCaseBatchByStringArray(testcases, suiteRowNum);\r\n\t\tlogger.info(\"create testsuit:\" + testsuite.getTestSuiteName()\r\n\t\t\t\t+ \" success!\");\r\n\r\n\t}", "private Test createSuite()\n {\n //Let's discover what tests have been scheduled for execution.\n // (we expect a list of fully qualified test class names)\n String tests = System.getProperty(TEST_LIST_PROPERTY_NAME);\n if (tests == null || tests.trim().length() == 0)\n {\n tests = \"\";\n }\n logger.debug(\"specfied test list is: \" + tests);\n\n StringTokenizer st = new StringTokenizer(tests);\n String[] ids = new String[st.countTokens()];\n int n = 0;\n while (st.hasMoreTokens())\n {\n ids[n++] = st.nextToken().trim();\n }\n\n TestSuite suite = new TestSuite();\n for (int i=0; i<n; i++)\n {\n String testName = ids[i];\n if (testName != null && testName.trim().length() > 0)\n {\n try\n {\n Class<?> testClass = Class.forName(testName);\n if ((bc == null)\n && BundleActivator.class.isAssignableFrom(testClass))\n {\n logger.error(\"test \" + testName\n + \" skipped - it must run under felix\");\n }\n else\n {\n suite.addTest(new TestSuite(testClass));\n }\n }\n catch (ClassNotFoundException e)\n {\n logger.error(\"Failed to load standalone test \" + testName);\n }\n }\n }\n return suite;\n }", "@Test\n public void test_create_scenario() {\n try {\n TestData X = new TestData(\"project2.opt\");\n String new_name = \"new_scenario\";\n X.project.create_scenario(new_name);\n assertNotNull(X.project.get_scenario_with_name(new_name));\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }", "TrainingTest createTrainingTest();", "public void shouldCreate() {\n }", "@Test\n public void functionalityTest() {\n new TestBuilder()\n .setModel(MODEL_PATH)\n .setContext(new ModelImplementationGroup3())\n .setPathGenerator(new RandomPath(new EdgeCoverage(100)))\n .setStart(\"e_GoToPage\")\n .execute();\n }", "private String generateJUnitTestCasesSkeletonCode(List<TestCaseList> testCases, ProductMaster product, String packageName, String refClassName, String destinationDirectory, int nameSource, String testExecutionEngine, String testStepOption) {\n\t\tJCodeModel codeModel = new JCodeModel();\r\n\t\tString message = null;\r\n\t\ttry {\r\n\t\t\tif (testExecutionEngine == null)\r\n\t\t\t\ttestExecutionEngine = TAFConstants.TESTENGINE_SEETEST;\r\n\t\t\tlog.info(\"Test Execution Engine : \" + testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\tJClass junitAfterReference = null;\r\n\t\t\tJClass junitBeforeReference = null;\r\n\t\t\tJClass junitTestReference = null;\r\n\t\t\tJClass junitFixMethodOrderReference = null;\r\n\t\t\tJClass junitMethodSortersReference = null;\r\n\t\t\tjunitAfterReference = codeModel.ref(\"org.junit.After\");\r\n\t\t\tjunitBeforeReference = codeModel.ref(\"org.junit.Before\");\r\n\t\t\tjunitTestReference = codeModel.ref(\"org.junit.Test\");\r\n\t\t\tjunitFixMethodOrderReference = codeModel.ref(\"org.junit.FixMethodOrder\");\r\n\t\t\tjunitMethodSortersReference = codeModel.ref(\"org.junit.runners.MethodSorters\");\r\n\r\n\t\t\tfor (TestCaseList testCase : testCases) {\r\n\r\n\t\t\t\t// 1. Create the class for the test case\r\n\t\t\t\tString testCaseName = null;\r\n\t\t\t\tString classPackageName = null;\r\n\t\t\t\tif (testCase.getTestCaseScriptFileName() == null || testCase.getTestCaseScriptFileName().trim().isEmpty()) {\r\n\t\t\t\t\ttestCaseName = ScriptGeneratorUtilities.getTestCaseClassName(testCase.getTestCaseName(), testCase.getTestCaseId(), testCase.getTestCaseCode(), nameSource);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttestCaseName = testCase.getTestCaseScriptFileName();\r\n\t\t\t\t\tif(testCaseName.contains(\".java\")){\r\n\t\t\t\t\t\ttestCaseName = testCaseName.replace(testCaseName.substring(testCaseName.lastIndexOf(\".\")),\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (testCase.getTestCaseScriptQualifiedName() == null || testCase.getTestCaseScriptQualifiedName().trim().isEmpty()) {\r\n\t\t\t\t\tclassPackageName = packageName;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tclassPackageName = testCase.getTestCaseScriptQualifiedName();\r\n\t\t\t\t}\r\n\t\t\t\tJDefinedClass testCaseClass = codeModel._class(classPackageName + \".\" + testCaseName);\r\n\t\t\t\tJDocComment classComment = testCaseClass.javadoc();\r\n\t\t\t\tString javadocCommentClass = \"Automation Script for Testcase : \" + testCase.getTestCaseName()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Product \t\t\t: \" + product.getProductDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase ID\t\t: \" + testCase.getTestCaseId()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase Code \t: \" + testCase.getTestCaseCode()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Description \t\t: \" + testCase.getTestCaseDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test case type \t: \" + testCase.getTestCaseType()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Script Type \t\t: \" + TAFConstants.TESTSCRIPT_TYPE_JUNIT\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test Execution Engine \t: \" + testExecutionEngine\r\n\t\t\t\t\t\t+ \"\\n\" + \"Code generated by TAF on \t: \" + new Date(System.currentTimeMillis());\r\n\t\t\t\tclassComment.append(javadocCommentClass);\r\n\t\t\t\ttestCaseClass.annotate(junitFixMethodOrderReference).param(\"value\", MethodSorters.NAME_ASCENDING);\r\n\r\n\t\t\t\ttestCaseClass = addClassVariablesForTestCaseClass(codeModel, testCaseClass, testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (testStepOption == null)\r\n\t\t\t\t\ttestStepOption = \"SINGLE_METHOD\";\r\n\t\t\t\t// 4. Add methods for the test steps of the test case\r\n\t\t\t\t// 4.a Add the setup and tear down methods\r\n\t\t\t\tJMethod setUpMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"setUp\");\r\n\t\t\t\tJDocComment methodComment1 = setUpMethod.javadoc();\r\n\t\t\t\tString commentString = \"Setup method for testcase\";\r\n\t\t\t\tmethodComment1.append(commentString);\r\n\t\t\t\tsetUpMethod = constructSetUpMethodForTestCase(setUpMethod, testExecutionEngine, refClassName, testCaseName);\r\n\t\t\t\tsetUpMethod.annotate(junitBeforeReference);\r\n\t\t\t\t\r\n\t\t\t\tJMethod tearDownMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"tearDown\");\r\n\t\t\t\tJDocComment methodComment2 = tearDownMethod.javadoc();\r\n\t\t\t\tcommentString = \"Teardown method for the testcase\";\r\n\t\t\t\tmethodComment2.append(commentString);\r\n\t\t\t\ttearDownMethod = constructTearDownMethodForTestCase(tearDownMethod, testExecutionEngine);\r\n\t\t\t\ttearDownMethod.annotate(junitAfterReference);\r\n\t\t\t\t\r\n\t\t\t\tList<TestCaseStepsList> testSteps = testCaseService.listTestCaseSteps(testCase.getTestCaseId());\r\n\t\t\t\tif (testSteps == null || testSteps.isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"No steps in the testcase : \" + testCaseName);\r\n\t\t\t\t\tJMethod testCaseMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\ttestCaseMethod.annotate(junitTestReference);\r\n\t\t\t\t\ttestCaseMethod = constructDefaultTestCaseMethodForTestCase(testCaseMethod, testExecutionEngine, testCase);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(testStepOption.contains(\"SEPARATE_METHOD\")) {\r\n\t\t\t\t\t\tJMethod mainTestStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"mainTest\");\r\n\t\t\t\t\t\tmainTestStepMethod.annotate(junitTestReference);\r\n\t\t\t\t\t\tString stepMethod = \"\";\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tJMethod testStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testStepName);\r\n\t\t\t\t\t\t\ttestStepMethod = constructTestStepMethodForTestCase(testStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\r\n\t\t\t\t\t\t\tstepMethod = testStepName+\"();\";\r\n\t\t\t\t\t\t\tmainTestStepMethod.body().directStatement(stepMethod);\r\n\t\t\t\t\t\t\tstepMethod = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tJMethod singleTestStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\t\tsingleTestStepMethod.annotate(junitTestReference);\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tsingleTestStepMethod = addTestStepForSingleTestStepMethodForTestCase(singleTestStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\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\tFile sourceFile = new File(destinationDirectory);\r\n\t\t\t\tif (!sourceFile.exists()) {\r\n\t\t\t\t\tlog.info(\"Created Directory for source code generation : \" + destinationDirectory);\r\n\t\t\t\t\tsourceFile.mkdirs();\r\n\t\t\t\t}\r\n\t\t\t\tcodeModel.build(sourceFile);\r\n\t\t\t\tString CLASS_PACKAGE_NAME_FOLDER = classPackageName.replace(\".\", File.separator);\r\n\t\t\t\tlog.info(\"CLASS_PACKAGE_NAME_FOLDER : \" + CLASS_PACKAGE_NAME_FOLDER);\r\n\t\t\t\tmessage = sourceFile.getAbsolutePath() + File.separator + CLASS_PACKAGE_NAME_FOLDER + File.separator + testCaseName + \".java\";\r\n\t\t\t}\r\n\t\t} catch (JClassAlreadyExistsException e) {\r\n\t\t\tlog.error(\"Unable to generate testcase ref source code class\", e);\r\n\t\t\tmessage = \"Failed : Unable to generate testcase ref source code class\";\r\n\t\t} catch (IOException io) {\r\n\t\t\tlog.error(\"Unable to create file in file system\", io);\r\n\t\t\tmessage = \"Failed : Unable to create file in file system\";\r\n\t\t}\r\n\t\t\r\n\t\tlog.debug(\"Success : Generated Testcases source code framework.\" );\r\n\t\treturn message;\r\n\r\n\t}", "@Test // (groups={\"All\"}) //(groups={\"smoke\"})\r\n\tpublic void createLead() {\n\t\tSystem.out.println(\"create\");\r\n\t}", "public TestCase(String name) {\n fName= name;\n }", "public Tests(){\n \n }", "@Test\n void createParkingLot() {\n }", "@Test\n public void testCrear() {\n System.out.println(\"crear\");\n usuarioController.crear(usuario1);\n usuarioController.crear(usuario2);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public HockeyTeamTest()\n {\n }", "@Test\n public void createProduct() {\n }", "@Test\n public void shouldCreateEpiDataTravel() {\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataTravel(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(1));\n }", "@Test\npublic void TC11(){\n\n}", "TeststepBlock createTeststepBlock();", "protected TestResult createResult() {\n return new TestResult();\n }", "@Test\n public void testProductOfferingCreate() {\n // TODO: test ProductOfferingCreate\n }", "protected TeststepRunner() {}", "LoadTest createLoadTest();", "@Test\n public void testConstructor(){\n new RowGen(ROW_INDEX, spaces);\n }", "public void testZRecordingCreation() {\n\t\tsolo.pressSpinnerItem(3, 1);\n\t\tsolo.clickOnText(\"Begin Rehearsing\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.typeText(0, \"testName\");\n\t\tsolo.clickOnText(\"Save\");\n\t\t// If file exists already then overwrite it\n\t\tif (solo.searchButton(\"Yes\")) {\n\t\t\tsolo.clickOnButton(\"Yes\");\n\t\t}\n\t\tsolo.pressMenuItem(4);\n\t\tassertTrue(solo.searchText(\"testName\"));\n\t}", "public PerezosoTest()\n {\n }", "@Test\n void scCreation() {\n StandardCalc sc = new StandardCalc();\n }", "public TestPrelab2()\n {\n }", "@Test\n public void testTemplate(){\n }", "public ActivitiTestCase() {\n }", "public void createTestSuite(TestSuite testsuite) throws Exception {\r\n\t\tlogger\r\n\t\t\t\t.info(\"start to create testsuite:\"\r\n\t\t\t\t\t\t+ testsuite.getTestSuiteName());\r\n\t\tint suiteRowNum = addTestSuite(testsuite);\r\n\t\tcaseSuiteMapImpl.addTestCaseBatchByArrayList(testsuite\r\n\t\t\t\t.getTestcaseList(), suiteRowNum);\r\n\t\tlogger.info(\"create testsuite:\" + testsuite.getTestSuiteName()\r\n\t\t\t\t+ \" success!\");\r\n\r\n\t}", "@Test\n public void TestCreateCat() {\n String expectedName = \"Milo\";\n Date expectedBirthDate = new Date();\n\n Cat newCat = AnimalFactory.createCat(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newCat.getName());\n Assert.assertEquals(expectedBirthDate, newCat.getBirthDate());\n }", "@Test\n public void testCrearArchivo() {\n System.out.println(\"CrearArchivo\");\n String Ruta = \"\";\n RandomX instance = null;\n instance.CrearArchivo(Ruta);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n void addTask() {\n }", "@Test(priority=1)\r\n\tpublic void createStudentSeraliztion() {\r\n\t\t//for seralization i used java object student.\r\n\t\t\r\n\t\tStudent student = new Student();\r\n\t\t//information look at book tutorial-9.\r\n\t\tstudent .setId(102);\r\n\t\tstudent .setFirstName(\"Mango\");\r\n\t\tstudent .setLastName(\"Rasalu\");\r\n\t\tstudent .setEmail(\"Mango@123.edu\");\r\n\t\tstudent .setProgramme(\"King\");\r\n\t\t//Courses have two courses.wer using ArrayList To hold different courses.\r\n\t\tArrayList<String> courseList = new ArrayList<String>();\r\n\t\tcourseList.add(\"java\");\r\n\t\tcourseList.add(\"Selenium\");\r\n\t\tstudent.setCourses(courseList);\r\n\t\tgiven()\r\n\t\t\t.contentType(ContentType.JSON)\r\n\t\t\t.body(student)\r\n\t\t.when()\r\n\t\t\t.post(\"http://localhost:8085/student\")\r\n\t\t.then()\r\n\t\t\t.statusCode(201)\r\n\t\t\t.assertThat()\r\n\t\t\t.body(\"msg\",equalTo(\"student added\"));\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "TestNode createTestNode();", "@Test\n\tpublic void test04_CreateNewPageUsingExistingTemplate() {\n\t\tinfo(\"Test 4: Create new page using existing template\");\n\t\tString template1 = wTempData.getWikiTemplate(0);\n\t\tString title1 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template1);\n\t\tString template2 = wTempData.getWikiTemplate(1);\n\t\tString title2 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template2);\n\t\tString template3 = wTempData.getWikiTemplate(2);\n\t\tString title3 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template3);\n\t\tString template4 = wTempData.getWikiTemplate(3);\n\t\tString title4 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template4);\n\t\tString template5 = wTempData.getWikiTemplate(4);\n\t\tString title5 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template5);\n\t\t\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: Open form to create new page\n\t\t*Step Description: \n\t\t\t- Choose path to add new page\n\t\t\t- Click [Add Page] --> [From Template...]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- By default, the [Create Wiki page] is displayed in the [Rich Text] mode */\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t \n\t /*Step Number: 2\n\t\t*Step Name: Step 2: Create new page with Two Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Two Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with two column layout*/\n\t\twikiMg.addSimpleWikiPageByTemplate(template1,title1);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title1);\n\t\tarrayPage.add(title1);\n\t \n\t\t /*Step Number: 3\n\t\t*Step Name: Step 3: Create new page with Three Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Three Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with three column layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template2,title2);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title2);\n\t\tarrayPage.add(title2);\n\t\t\n\t\t /*Step Number: 4\n\t\t*Step Name: Step 4: Create new page with Status Meeting layout\n\t\t*Step Description: \n\t\t\t- Choose template \"Status Meeting\" in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Status Meeting layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template3,title3);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title3);\n\t\tarrayPage.add(title3);\n\t\t\n\t\t /*Step Number: 5\n\t\t*Step Name: Step 5: Create new page with HOW-TO Guide layout\n\t\t*Step Description: \n\t\t\t- Choose template [HOW-TO Guide] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with HOW-TO Guide layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template4,title4);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title4);\n\t\tarrayPage.add(title4);\n\t\t\n\t\t/*Step Number: 6\n\t\t*Step Name: Step 6: Create new page with Leave Planning layout\n\t\t*Step Description: \n\t\t\t- Choose template [Leave Planning] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Leave Planning layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template5,title5);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title5);\n\t\tarrayPage.add(title5);\n \t}", "@Test\n public void testingTheTwoPlane2016Order() {\n }", "@Test\n public void testFindByCreate() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add item\n\n String name = \"task1\";\n String desc = \"desc1\";\n String create = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name, desc, create, yes});\n new StartUI(input1).init(tracker);\n\n // find item\n\n String action2 = \"5\";\n\n Input input2 = new StubInput(new String[]{action2, create, yes});\n new StartUI(input2).init(tracker);\n\n }", "public BookcaseTest () {\n }", "private static void testgen(String[] args) {\n JSONParser parser = new JSONParser();\n TestgenOptions options = parseTestgenOptions(args);\n CLI.setVerbosity(options);\n if (options.numTasks < 1) {\n API.throwCLIError(\"Invalid number of tasks provided (-n): \" + options.numTasks);\n }\n\n Map<String, Object> objects;\n if (!options.inFile.isEmpty()) {\n objects = parser.parse(options.inFile, true);\n } else if (!options.inString.isEmpty()) {\n objects = parser.parse(options.inString, false);\n } else {\n API.throwCLIError(\"No input JSON provided (-i)\");\n return;\n }\n\n if (objects.get(\"initialState\") == null || objects.get(\"goalState\") == null) {\n API.throwCLIError(\"Both an initial state and a goal state must be provided.\");\n }\n\n TestCaseGenerator generator = new TestCaseGenerator(\n (SystemState) objects.get(\"initialState\"),\n (GoalState) objects.get(\"goalState\"),\n options.numTasks,\n options.optimalPlan,\n options.output\n );\n\n ArrayList<Task> tasks = generator.generateTestCase();\n ArrayList<Optimization> ops = generator.generateOptimizations();\n try{\n generator.testCaseToJSON(tasks, ops, options.perturbations);\n } catch (IOException e){\n API.throwCLIError(\"Failed to write testCase to JSON\");\n }\n\n }", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "public void testCreation() {\n // First the two standard constructors with meaningfull data.\n // Also test the different setters.\n final String title1 = \"Title1\";\n final String cleavage1 = \"ARNDCQ\";\n final String restrict1 = \"PG\";\n final char[] cv1 = cleavage1.toCharArray();\n final char[] rs1 = restrict1.toCharArray();\n final String pos1 = \"Cterm\";\n final String pos2 = \"nteRm\";\n final int miscleavage = 3;\n\n Enzyme e = new Enzyme(title1, cleavage1, restrict1, pos1);\n Assert.assertEquals(title1, e.getTitle());\n Assert.assertEquals(new String(cv1), new String(e.getCleavage()));\n Assert.assertEquals(new String(rs1), new String(e.getRestrict()));\n Assert.assertEquals(Enzyme.CTERM, e.getPosition());\n Assert.assertEquals(1, e.getMiscleavages());\n\n final String otherTitle = \"other\";\n final String otherCleavage = \"HIK\";\n final String otherRestrict = \"MN\";\n final char[] otherCv = otherCleavage.toCharArray();\n final char[] otherRs = otherRestrict.toCharArray();\n\n e.setTitle(otherTitle);\n e.setCleavage(otherCleavage);\n e.setRestrict(otherRestrict);\n e.setPosition(Enzyme.NTERM);\n e.setMiscleavages(miscleavage);\n\n Assert.assertEquals(otherTitle, e.getTitle());\n Assert.assertEquals(new String(otherCv), new String(e.getCleavage()));\n Assert.assertEquals(new String(otherRs), new String(e.getRestrict()));\n Assert.assertEquals(Enzyme.NTERM, e.getPosition());\n Assert.assertEquals(miscleavage, e.getMiscleavages());\n\n e.setCleavage(cleavage1);\n e.setRestrict(rs1);\n Assert.assertEquals(new String(cv1), new String(e.getCleavage()));\n Assert.assertEquals(new String(rs1), new String(e.getRestrict()));\n\n e = new Enzyme(null, cleavage1, null, pos2, 5);\n Assert.assertTrue(e.getTitle() == null);\n Assert.assertEquals(new String(cv1), new String(e.getCleavage()));\n Assert.assertTrue(e.getRestrict() == null);\n Assert.assertEquals(Enzyme.NTERM, e.getPosition());\n Assert.assertEquals(5, e.getMiscleavages());\n\n try {\n e = new Enzyme(title1, null, restrict1, null);\n fail(\"No NullPointerException thrown when Enzyme constructor was presented with a 'null' cleavage and position String!\");\n } catch(NullPointerException npe) {\n // Okay, this is what we wanted.\n }\n\n try {\n e = new Enzyme(title1, cleavage1, restrict1, null);\n fail(\"No NullPointerException thrown when Enzyme constructor was presented with a 'null' position String!\");\n } catch(NullPointerException npe) {\n // Okay, this is what we wanted.\n }\n }", "public static void main(String[] args) {\n testFactoryMethod();\n }", "public static void startTestCase(String testCase) throws Exception\n\t{\n\t\tint currentSuiteID;\n\t\tint currentTestCaseID;\n\t\tString currentTestSuite;\n\t\tString currentTestCaseName;\n\t\tXls_Reader currentTestSuiteXLS;\n\t\tXls_Reader Wb = new Xls_Reader(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\java\\\\com\\\\test\\\\automation\\\\uIAutomation\\\\data\\\\Controller.xlsx\");\n\t\tString TestURL = VerifyLoginWithValidCredentials.CONFIG.getProperty(\"TestURL\");\n\t\tfor (currentSuiteID = 2; currentSuiteID <= Wb.getRowCount(ObjectRepository.TEST_SUITE_SHEET); currentSuiteID++)\n\t\t{\n\t\t\tcurrentTestSuite = Wb.getCellData(ObjectRepository.TEST_SUITE_SHEET, ObjectRepository.Test_Suite_ID, currentSuiteID);\n\t if(Wb.getCellData(ObjectRepository.TEST_SUITE_SHEET, ObjectRepository.RUNMODE, currentSuiteID).equals(ObjectRepository.RUNMODE_YES))\n\t \t\t{\n\t\t\t\tcurrentTestSuiteXLS = new Xls_Reader(\"src/config/\" + currentTestSuite + \".xlsx\");\n\t\t\t\tfor (currentTestCaseID = 2; currentTestCaseID <= currentTestSuiteXLS.getRowCount(ObjectRepository.TEST_CASES_SHEET); currentTestCaseID++) \n\t\t\t\t{\n\t\t\t\t\tcurrentTestCaseName = currentTestSuiteXLS.getCellData(ObjectRepository.TEST_CASES_SHEET, ObjectRepository.Test_Case_ID, currentTestCaseID);\n\t\t\t\t\tif (currentTestCaseName.equals(testCase))\n\t {\n\t\t\t\t\t\tString desc = currentTestSuiteXLS.getCellData(ObjectRepository.TEST_CASES_SHEET, \"Description\", currentTestCaseID);\n\t\t\t\t\t\tString subModule = currentTestSuiteXLS.getCellData(ObjectRepository.TEST_CASES_SHEET, \"Sub Module\", currentTestCaseID);\n\t\t\t\t\t\tLog.test = Log.extent.startTest(currentTestCaseName, desc).assignCategory(currentTestSuite + \" Module\", subModule + \" Sub-Module\");\n\t\t\t\t\t\tLog.test.log(LogStatus.INFO, \"Testing on URL : \" + TestURL);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public AllLaboTest() {\n }", "@Test\n\tpublic static void create_Task() {\n\t\tString testName = \"Valid Scenario- When all the data are valid\";\n\t\tlog.info(\"Valid Scenario: Create Task\");\n\t\t// report generation start\n\t\textentTest = extent.startTest(\"Task Controller- Create Task\");\n\n\t\tResponse response = HttpOperation\n\t\t\t\t.createAuthToken(PayLoads.createAuthToken_Payload(extentTest, auth_sheetName, auth_valid_testName));\n\t\tString authToken = ReusableMethods.Auth(extentTest, response);\n\n\t\t// response for login the user\n\t\tresponse = HttpOperation.loginUser(authToken, PayLoads.create_user_Payload(user_sheet, testName));\n\t\tlog.info(\"Response received for login\");\n\t\textentTest.log(LogStatus.INFO, \"Response received for login:- \" + response.asString());\n\n\t\t// get the User Token\n\t\tJsonPath jp = ReusableMethods.rawToJson(response);\n\t\tuserToken = jp.get(\"jwt\");\n\t\tlog.info(\"Received User Token:- \" + userToken);\n\t\textentTest.log(LogStatus.INFO, \"User Token:- \" + userToken);\n\n\t\t// Creating the Task response\n\t\tresponse = HttpOperation.create_Task(userToken, PayLoads.create_task_Payload(sheetName, testName));\n\n\t\tlog.info(\"Response received to create the task\");\n\t\textentTest.log(LogStatus.INFO, \"Response received to create the task:- \" + response.asString());\n\n\t\t// Assertion\n\n\t\tAssert.assertEquals(response.getStatusCode(), 201);\n\t\tlog.info(\"Assertion Passed!!\");\n\t\textentTest.log(LogStatus.INFO, \"HTTP Status Code:- \" + response.getStatusCode());\n\n\t}", "@Test\n public void testCarregarTrimestre() {\n }", "@Test\n\tpublic void constructortest() {\n\t\tMainDish dessertTest = new MainDish(\"quiche\");\n\t\tassertTrue(dessertTest.getName().equals(\"quiche\"));\n\t}", "@Test\n public void test() {\n Solution solution = new Solution();\n\n }", "@Test\n public void test() {\n Solution solution = new Solution();\n\n }", "public Vending_MachineTest()\n {\n // initialise instance variables\n \n \n }", "@Test\r\n public void testNew_doctor() {\r\n System.out.println(\"new_doctor\");\r\n doctor instance = new doctor();\r\n instance.new_doctor();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Before\n\tpublic void setUp() {\n\t\tcompteTest = FactoryCompte.getCompteVide();\n\t\tcompteTest.setIdClient(3630);\n\t\tcompteTest.setBalance(89.8);\n\t\tcompteTest.setNegativeBalanceAllowed(false);\n\t\t\n\t\tinstance.createWithId(compteTest);\t\t\n\t}", "@Before\n public void setUp()\n {\n bookingS1 = new src.ticketbookingsystem.BookingSystem();\n bookingS1.newFlight(\"LHR - KIX\", \"11:30\", \"ANA 23\", \"15\");\n System.out.println(\"Setup flight done.\");\n bookingS1.newTicket(15, 5, \"Bobby Lee\");\n System.out.println(\"Setup Bobby done.\");\n bookingS1.newTicket(25, 3, \"Khalyla Lee\");\n System.out.println(\"Setup Khalyla done.\");\n System.out.println();\n }", "public WizardsTest(String testName) {\n super(testName);\n }", "@Test\r\n\tpublic void testConstructor() {\r\n\t\tnew ConstructorTestClass();\r\n\t}", "@Test\r\n\tpublic void testConstructor() {\r\n\t\tnew ConstructorTestClass();\r\n\t}", "@Test\n\tvoid testLectureChoixInt() {\n\t\t\n\t}", "private String generateTestNGTestCasesSkeletonCode(List<TestCaseList> testCases, ProductMaster product, String packageName, String refClassName, String destinationDirectory, int nameSource, String testExecutionEngine, String testStepOption) {\n\t\tJCodeModel codeModel = new JCodeModel();\r\n\t\tString message = null;\r\n\t\ttry {\r\n\t\t\tif (testExecutionEngine == null)\r\n\t\t\t\ttestExecutionEngine = TAFConstants.TESTENGINE_SEETEST;\r\n\t\t\tlog.info(\"Test Execution Engine : \" + testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\tJClass testNGAfterMethodReference = null;\r\n\t\t\tJClass testNGBeforeMethodReference = null;\r\n\t\t\tJClass testNGTestReference = null;\r\n\t\t\ttestNGAfterMethodReference = codeModel.ref(\"org.testng.annotations.AfterMethod\");\r\n\t\t\ttestNGBeforeMethodReference = codeModel.ref(\"org.testng.annotations.BeforeMethod\");\r\n\t\t\ttestNGTestReference = codeModel.ref(\"org.testng.annotations.Test\");\r\n\r\n\t\t\tfor (TestCaseList testCase : testCases) {\r\n\r\n\t\t\t\t// 1. Create the class for the test case\r\n\t\t\t\t//String testCaseName = getTestCaseClassName(testCase, nameSource);\r\n\t\t\t\t//String testCaseName = null;\r\n\t\t\t\tString testCaseName = null;\r\n\t\t\t\tString classPackageName = null;\r\n\t\t\t\tif (testCase.getTestCaseScriptFileName() == null || testCase.getTestCaseScriptFileName().trim().isEmpty()) {\r\n\t\t\t\t\ttestCaseName = ScriptGeneratorUtilities.getTestCaseClassName(testCase.getTestCaseName(), testCase.getTestCaseId(), testCase.getTestCaseCode(), nameSource);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttestCaseName = testCase.getTestCaseScriptFileName();\r\n\t\t\t\t\tif(testCaseName.contains(\".java\")){\r\n\t\t\t\t\t\ttestCaseName = testCaseName.replace(testCaseName.substring(testCaseName.lastIndexOf(\".\")),\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (testCase.getTestCaseScriptQualifiedName() == null || testCase.getTestCaseScriptQualifiedName().trim().isEmpty()) {\r\n\t\t\t\t\tclassPackageName = packageName;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tclassPackageName = testCase.getTestCaseScriptQualifiedName();\r\n\t\t\t\t}\r\n\t\t\t\tJDefinedClass testCaseClass = codeModel._class(classPackageName + \".\" + testCaseName);\r\n\t\t\t\tJDocComment classComment = testCaseClass.javadoc();\r\n\t\t\t\tString javadocCommentClass = \"Automation Script for Testcase : \" + testCase.getTestCaseName()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Product : \" + product.getProductDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase ID \t\t: \" + testCase.getTestCaseId()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Testcase Code\t\t: \" + testCase.getTestCaseCode()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Description \t\t: \" + testCase.getTestCaseDescription()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test case type \t: \" + testCase.getTestCaseType()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Script Type \t\t: \" + TAFConstants.TESTSCRIPT_TYPE_TESTNG\r\n\t\t\t\t\t\t+ \"\\n\" + \"Test Execution Engine \t: \" + testExecutionEngine\r\n\t\t\t\t\t\t+ \"\\n\" + \"Code generated by TAF on \t: \" + new Date(System.currentTimeMillis());\r\n\t\t\t\tclassComment.append(javadocCommentClass);\r\n\t\t\t\t\r\n\t\t\t\ttestCaseClass = addClassVariablesForTestCaseClass(codeModel, testCaseClass, testExecutionEngine);\r\n\t\t\t\t\r\n\t\t\t\t// 4.a Add the setup method\r\n\t\t\t\tJMethod setUpMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"setUp\");\r\n\t\t\t\tJDocComment methodComment1 = setUpMethod.javadoc();\r\n\t\t\t\tString commentString = \"Setup method for testcase\";\r\n\t\t\t\tmethodComment1.append(commentString);\r\n\t\t\t\tsetUpMethod = constructSetUpMethodForTestCase(setUpMethod, testExecutionEngine, refClassName, testCaseName);\r\n\t\t\t\tsetUpMethod.annotate(testNGBeforeMethodReference);\r\n\t\t\t\t\r\n\t\t\t\tJMethod tearDownMethod = testCaseClass.method(JMod.PUBLIC, void.class, \"tearDown\");\r\n\t\t\t\tJDocComment methodComment2 = tearDownMethod.javadoc();\r\n\t\t\t\tcommentString = \"Teardown method for the testcase\";\r\n\t\t\t\tmethodComment2.append(commentString);\r\n\t\t\t\ttearDownMethod = constructTearDownMethodForTestCase(setUpMethod, testExecutionEngine);\r\n\t\t\t\ttearDownMethod.annotate(testNGAfterMethodReference);\r\n\t\t\t\t\r\n\t\t\t\tif (testStepOption == null)\r\n\t\t\t\t\ttestStepOption = \"SINGLE_METHOD\";\r\n\t\t\t\tList<TestCaseStepsList> testSteps = testCaseService.listTestCaseSteps(testCase.getTestCaseId());\r\n\t\t\t\tif (testSteps == null || testSteps.isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"No steps in the testcase : \" + testCaseName);\r\n\t\t\t\t\tJMethod testCaseMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\ttestCaseMethod.annotate(testNGTestReference);\r\n\t\t\t\t\ttestCaseMethod = constructDefaultTestCaseMethodForTestCase(testCaseMethod, testExecutionEngine, testCase);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(testStepOption.contains(\"SEPARATE_METHOD\")) {\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tJMethod testStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testStepName);\r\n\t\t\t\t\t\t\ttestStepMethod.annotate(testNGTestReference);\r\n\t\t\t\t\t\t\ttestStepMethod = constructTestStepMethodForTestCase(testStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tJMethod singleTestStepMethod = testCaseClass.method(JMod.PUBLIC, void.class, testCaseName + \"_Test\");\r\n\t\t\t\t\t\tsingleTestStepMethod.annotate(testNGTestReference);\r\n\t\t\t\t\t\tfor (TestCaseStepsList testStep : testSteps) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString testStepName = ScriptGeneratorUtilities.getTestStepMethodName(testCaseName, testStep.getTestStepName(), testStep.getTestStepId(), testStep.getTestStepCode(), 1 );\r\n\t\t\t\t\t\t\tsingleTestStepMethod = addTestStepForSingleTestStepMethodForTestCase(singleTestStepMethod, testExecutionEngine, refClassName, testCaseName, testStepName, testStep);\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\tFile sourceFile = new File(destinationDirectory);\r\n\t\t\t\tif (!sourceFile.exists()) {\r\n\t\t\t\t\tlog.info(\"Created Directory for source code generation : \" + destinationDirectory);\r\n\t\t\t\t\tsourceFile.mkdirs();\r\n\t\t\t\t}\r\n\t\t\t\tcodeModel.build(sourceFile);\r\n\t\t\t\tmessage = sourceFile.getAbsolutePath() + DEFAULT_PACKAGE_NAME_FOLDER + File.separator + testCaseName + \".java\";\r\n\t\t\t}\r\n\t\t} catch (JClassAlreadyExistsException e) {\r\n\t\t\tlog.error(\"Unable to generate testcase ref source code class\", e);\r\n\t\t\tmessage = \"Failed : Unable to generate testcase ref source code class\";\r\n\t\t} catch (IOException io) {\r\n\t\t\tlog.error(\"Unable to create file in file system\", io);\r\n\t\t\tmessage = \"Failed : Unable to create file in file system\";\r\n\t\t}\r\n\t\t\r\n\t\tlog.debug(\"Success : Generated Testcases source code framework.\" );\r\n\t\treturn message;\r\n\r\n\t}", "@Test\n\tpublic void testDoGeneration() {\n\t}", "public ClimbingClubTest()\n {\n \n }", "public AcceptanceTestRun() {\n }", "public NewTestWizardPage() {\n\t\tsuper(true, \"New Groovy Test Settings\");\n\n\t\tsetTitle(\"Groovy Test Class\");\n\t\tsetDescription(\"Create a new Groovy unit test class\");\n\t}", "public AcuityTest() {\r\n }", "@Test\n public void onCreate() {\n }", "@Test\n public void onCreate() {\n }", "@Test\n public void testCarregarAno() {\n }", "@Test\n\tpublic void testConstructor() {\n\t\tnew ConstructorTestClass();\n\t}", "@Test\n\tpublic void testConstructor() {\n\t\tnew ConstructorTestClass();\n\t}", "public void testWizards() {\n // open new file wizard\n NewFileWizardOperator nfwo = NewFileWizardOperator.invoke();\n nfwo.selectProject(\"SampleProject\");\n nfwo.selectCategory(\"Java\");\n nfwo.selectFileType(\"Java Class\");\n // go to next page\n nfwo.next();\n // create operator for the next page\n NewJavaFileNameLocationStepOperator nfnlso = new NewJavaFileNameLocationStepOperator();\n nfnlso.txtObjectName().typeText(\"MyNewClass\");\n // finish wizard\n //nfnlso.finish();\n // cancel wizard\n nfnlso.cancel();\n }", "public static Test suite() {\n return createModuleTest(WizardsTest.class);\n }", "@Test\n public void z_topDown_TC02() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n }", "@Test\n public void testGenerarIdentificacion() {\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "public void run(TestCase testCase) {\n }", "@Test\n public void EmployeesTest() {\n\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate static void createTestData() {\n\t\t\n\t\tusers.put(\"User0\", objectHandler.createUser(25.0));\n\t\tusers.put(\"User1\", objectHandler.createUser(1.0));\n\t\t\n\t\tdocuments.put(\"Doc0\", objectHandler.createDocument(\"mydoc\", 25, '4', 'C'));\n\t\tdocuments.put(\"Doc1\", objectHandler.createDocument(\"another\", 15, '3', 'B'));\n\t\t\n\t\tusers.get(\"User0\").addDocument(documents.get(\"Doc0\"));\n\t\tusers.get(\"User1\").addDocument(documents.get(\"Doc1\"));\n\t\t\n\t\tPrinterCapability capability1 = objectHandler.createPrinterCapability(true, false, true, true);\n\t\tPrinterCapability capability2 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\tPrinterCapability capability3 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\t\n\t\tPrinterPricing pricing = objectHandler.createPrinterPricing(0.03, 0.14, 0.06, 0.24);\n\t\t\n\t\tPrinterCapacity capacity1 = objectHandler.createPrinterCapacity(25, 0, 10, 30);\n\t\tPrinterCapacity capacity2 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\tPrinterCapacity capacity3 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\t\n\t\tprinters.put(\"Printer0\", objectHandler.createPrinter(\"A4All\", capability1, pricing, capacity1, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer1\", objectHandler.createPrinter(\"A3B\", capability2, pricing, capacity2, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer2\", objectHandler.createPrinter(\"A3B-rip\", capability3, pricing, capacity3, objectHandler.createPrinterStatus()));\n\t\t\n\t\tVDMSet status = new VDMSet();\n\t\tstatus.add(\"needFixing\");\n\t\tprinters.get(\"Printer2\").break_(status);\n\t}", "@Test\n public void testCrearBibliotecario() {\n System.out.println(\"BibliotecaController\");\n String email = \"mail\";\n String login = \"login\";\n String password = \"pass\";\n String nif = \"nif\";\n BibliotecarioController instance = new BibliotecarioController();\n Bibliotecario result = instance.crearBibliotecario(email, login, password, nif);\n assertEquals(email, result.getEmail());\n assertEquals(login, result.getLogin());\n assertEquals(password, result.getPassword());\n assertEquals(nif , result.getNif());\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGatewayCreateProducerChef() {\n // TODO: test GatewayCreateProducerChef\n }", "public Test TestStart(boolean run){\n Test theTest = new Test(\n \"Test Start\",//Test Title\n CLASSNAME,//Class Name\n \"start()\",//Method Being Tested\n \"A test to seethe slide can start\", //Description\n \"N/A\", //Input Data\n \"True\" //Expected output\n ); \n \n \n \n \n \n if(run){\n theTest.hasRun();\n try{\n sl.start();\n theTest.setPassed(true);\n }catch(Exception e){\n theTest.setPassed(false);\n }\n \n }\n return theTest;\n }", "public ProjektTest()\n {\n }", "@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}", "@Test\n public void testCreateView() {\n System.out.println(\"createView\");\n int i =1;\n AfinadorModelo modeloTest = new AfinadorModelo();\n AfinadorControlador controladorTest = new AfinadorControlador(modeloTest,i);\n String test = controladorTest.vista1.bpmOutputLabel.getText();\n if( test != \"APAGADO \")\n fail(\"The test case is a prototype.\");\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void allAcctsStdUserCreation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the user can successfully enter details in Add new user page and registers it\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\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\tnew BgbRegistrationAction()\n\t\t.AddNewStdUser(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage()\n\t\t.confirmationPageVerificationLinks();\n\t}", "@Test\n\tpublic void createNewBankTest() {\n\t\tBank bank = data.createNewBank();\n\t\tassertEquals(bankTest, bank);\n\t}", "@Test\n public void shouldCreateEpiDataGathering() {\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataGathering(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(1));\n }", "public void createSuite(String gridProject, String suiteName, String includeCategory) throws IOException\n\t{\n\t\tfileNames =\"\";\n\t\timportStatements =\"\";\n\t\t\n\t\tString classesDetails[];\n\t\tString classesNames;\n\t\tString classesImportStatements;\n\t\t\n\t\t\tclassesDetails = getTestClassNames(\"../\"+gridProject);\n\t\t\tclassesNames = classesDetails[0].replaceFirst(\" , \",\"\");\n\t\t\tclassesImportStatements = classesDetails[1];\n\t\t\t\t\n\t\t\tFileOutputStream fout; \n \t\t PrintStream prints; \n\n\t\t File file = new File(\"../common/src/com/oracle/pgbu/common/helpers/\"+suiteName+\".java\"); \n\t\t\tfout = new FileOutputStream(file); \n\t prints = new PrintStream(fout); \n\t prints.println(\"package com.oracle.pgbu.common.helpers;\\n\");\n\t prints.println(\"import com.oracle.pgbu.common.categories.ParallelCategories;\\n\");\n\t \tprints.println(\"import org.junit.runner.RunWith;\\n\");\n\t prints.println(\"import org.junit.runners.Suite.SuiteClasses;\\n\");\n\t prints.println(classesImportStatements+\"\\n\");\n\t \n\t if (!includeCategory.equals(\"All\"))\n\t { \n\t \t prints.println(\"import org.junit.experimental.categories.Categories.IncludeCategory;\\n\");\n\t \t prints.println(\"import com.oracle.pgbu.common.categories.\"+includeCategory+\";\\n\");\n\t \t\n\t prints.println(\"@IncludeCategory(\"+includeCategory+\".class)\");\n\t \n\t \t }\n\t \n\t prints.println(\"@RunWith(ParallelCategories.class)\");\n\t prints.println(\"@SuiteClasses({ \"+ classesNames +\" })\\n\");\n\t prints.println(\"public class \"+suiteName+\" { \\n }\");\n\t \n\t fout.close(); \n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\ttestObj = new EdgeTable(\"1|test\");\r\n\t\ttestObj.makeArrays();\r\n\t}", "@Test\r\n public void testCrear() throws Exception {\r\n System.out.println(\"crear\");\r\n String pcodigo = \"bravos\";\r\n String pnombre = \"Arreglar bumper\";\r\n String tipo = \"Enderazado\";\r\n Date pfechaAsignacion = new Date(Calendar.getInstance().getTimeInMillis());\r\n String pplacaVehiculo = \"TX-101\";\r\n MultiReparacion instance = new MultiReparacion();\r\n Reparacion expResult = new Reparacion(pcodigo, pnombre,tipo,pfechaAsignacion,pplacaVehiculo);\r\n Reparacion result = instance.crear(pcodigo, pnombre, tipo, pfechaAsignacion, pplacaVehiculo);\r\n \r\n assertEquals(expResult.getCodigo(), result.getCodigo());\r\n assertEquals(expResult.getNombre(), result.getNombre());\r\n assertEquals(expResult.getTipo(), result.getTipo());\r\n assertEquals(expResult.getPlacaVehiculo(), result.getPlacaVehiculo());\r\n assertEquals(expResult.getFechaAsignacion(), result.getFechaAsignacion());\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }" ]
[ "0.81283677", "0.6874562", "0.68583983", "0.6802808", "0.675316", "0.67282486", "0.6657648", "0.65971994", "0.65593016", "0.6553712", "0.6546584", "0.6538934", "0.6538514", "0.65184474", "0.6518316", "0.64980024", "0.64724445", "0.6466226", "0.6465721", "0.6435358", "0.64273566", "0.64136714", "0.6413018", "0.6369979", "0.6351548", "0.63515025", "0.63477296", "0.6331806", "0.63248795", "0.6321431", "0.62964433", "0.6294108", "0.62838215", "0.6283075", "0.6268399", "0.62637925", "0.6262718", "0.6259338", "0.625931", "0.6256794", "0.62527776", "0.62508386", "0.6245588", "0.62378514", "0.6235432", "0.6233658", "0.6223998", "0.62224543", "0.62208647", "0.62203777", "0.62200344", "0.6206722", "0.6201702", "0.61985296", "0.61970264", "0.61926466", "0.6187957", "0.6180819", "0.61778957", "0.6176379", "0.6176379", "0.61722463", "0.6166145", "0.6159052", "0.61578643", "0.6156937", "0.61532444", "0.61532444", "0.61474574", "0.6141149", "0.6131061", "0.6129804", "0.61297864", "0.6124746", "0.6114458", "0.61087507", "0.61087507", "0.6107131", "0.610554", "0.610554", "0.61046946", "0.61033076", "0.61007833", "0.61003697", "0.60682094", "0.60682094", "0.6063922", "0.6058757", "0.6056857", "0.60423434", "0.604163", "0.60326576", "0.6028278", "0.6028272", "0.6019412", "0.60183406", "0.60140324", "0.60111547", "0.6009298", "0.60073847", "0.6000861" ]
0.0
-1
FillDatabase.fillRole(); FillDatabase.fillEmployee(); FillDatabase.fillRestaurant(); FillDatabase.fillFood();
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { WelcomePanel welcomePanel = new WelcomePanel(); welcomePanel.setVisible(true); HalfHourBeforeOrderNotificationMailSender.start(); OrderingEmployeeGetterMailSender.start(); OrderButtonDisabler.start(); } catch (Exception e) { e.printStackTrace(); } } }); HibernateUtil.getSessionFactory().close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fillDatabase() {\n Type.type( \"FOOD\" );\n Type.type( \"HOT\" );\n Type.type( \"SNACK\" );\n }", "public void formDatabaseTable() {\n }", "public static void populateData() {\n\n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "@Before\n\tpublic void fillSomeDataIntoOurDb() {\n\t\tentityManager.persist(ago);\n\t\tentityManager.persist(teacherAgo);\n\t\tentityManager.persist(agoSubject);\n\t}", "public void createAndPopulateDatabase(ArrayList<MenuItem> food, ArrayList<MenuItem> bev) throws SQLException\r\n {\r\n createDatabase();\r\n connectToDatabase();\r\n createTables();\r\n populateTables(food, bev);\r\n }", "private void autoPopulateDB() {\r\n User newUser = new User(\"din_djarin\", \"baby_yoda_ftw\");\r\n User secondNew = new User(\"csumb\", \"otters_woo\");\r\n User lastNew = new User(\"username\", \"password\");\r\n\r\n mUserDAO.insert(newUser);\r\n mUserDAO.insert(secondNew);\r\n mUserDAO.insert(lastNew);\r\n }", "private static void pruebas() {\n\t\tResultadosDaoImpl resultadosDao = new ResultadosDaoImpl();\r\n\t\tPartidosDaoImpl partidosDao = new PartidosDaoImpl();\r\n\t\tEquiposDaoImpl equiposDao = new EquiposDaoImpl();\r\n\t\tJornadasDaoImpl jornadasDao = new JornadasDaoImpl();\r\n\t\tEstadisticasDaoImpl estadisticasDao = new EstadisticasDaoImpl();\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesTotalesCasa();\r\n\t\t\r\n\t\tEquipos equipoC = equiposDao.getEquipoById(7);\r\n\t\tEquipos equipoF = equiposDao.getEquipoById(6);\r\n\t\tJornadas jornada = jornadasDao.nextJornada();\r\n//\t\t\r\n//\t\tpartidosDao.getPartidosCasa(equipo,jornada);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesFavorCasa(equipo);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesContraFuera(equipo);\r\n//\t\tdouble phiVM = staticsC.getValorMercado() / (estadisticasDao.getValorMercadoMedio());\r\n\t\t\r\n\t\tEstadisticas staticsC = estadisticasDao.getStatics(equipoC);\r\n\t\tEstadisticas staticsF = estadisticasDao.getStatics(equipoF);\r\n\t\t\r\n\t\tDouble phiF = PlayMethods.analizeStaticsFuera(staticsF,staticsC,jornada);\r\n\t\tDouble phiC = PlayMethods.analizeStaticsCasa(staticsC,staticsF,jornada);\r\n\t\t\r\n\t\t\r\n\t}", "public void initDatabase() throws SQLException {\n\n ModelFactory factory = new ModelFactory(this.connection);\n\n StopsDao stopsData = factory.getStopsDao();\n\n ArrayList<Stop> stops = stopsData.getStopsFromCsv(getResource(\"stops.csv\"));\n\n Iterator<Stop> it = stops.iterator();\n while(it.hasNext()) {\n Stop stop = it.next();\n System.out.println(stop.toString());\n }\n\n\n /*\n ShapesDao shapesData = factory.getShapesDao();\n\n ArrayList<Shape> shapes = shapesData.getShapesFromCsv(getResource(\"shapes.csv\"));\n\n Iterator<Shape> it = shapes.iterator();\n while(it.hasNext()) {\n Shape shape = it.next();\n System.out.println(shape.toString());\n }\n\n CalendarDateDao calendarData = factory.getCalendarDatesDao();\n\n ArrayList<CalendarDate> agencies = calendarData.getCalendarDatesFromCsv(getResource(\"calendar_dates.csv\"));\n\n Iterator<CalendarDate> it = agencies.iterator();\n while(it.hasNext()) {\n CalendarDate date = it.next();\n System.out.println(date.toString());\n }\n\n AgencyDao agencyData = factory.getAgencyDao();\n agencyData.drop();\n agencyData.create();\n\n ArrayList<Agency> agencies = agencyData.getAgenciesFromCsv(getResource(\"agency.csv\"));\n\n Iterator<Agency> it = agencies.iterator();\n while(it.hasNext()) {\n Agency age = it.next();\n System.out.println(age.toString());\n agencyData.saveAgency(age);\n }\n\n RoutesDao routesDao = factory.getRouteDao();\n routesDao.drop();\n routesDao.create();\n\n ArrayList<Route> routes = routesDao.getRoutesFromCsv(getResource(\"routes.csv\"));\n\n Iterator<Route> it = routes.iterator();\n while(it.hasNext()) {\n Route route = it.next();\n System.out.println(route.toString());\n }*/\n }", "public void uptadeDB(){\n //mainDatabase.modifyStaff(this);\n }", "private void loadEmployeesFromDatabase() {\n Cursor cursor = mDatabase.getAllEmployees();\n\n if (cursor.moveToFirst()) {\n\n usernameholder= cursor.getString(0);\n emailholder= cursor.getString(1);\n usertypeholder=cursor.getInt(2);\n\n\n\n\n\n }\n }", "public void populate(){\n salesRepRepository.save(new SalesRep(\"Maddy\"));\n salesRepRepository.save(new SalesRep(\"Jegor\"));\n salesRepRepository.save(new SalesRep(\"Natalia\"));\n salesRepRepository.save(new SalesRep(\"Joao\"));\n }", "static void fillData() {\n\n try {\n // Class.forName(\"org.sqlite.JDBC\");\n connection = DriverManager.getConnection(\"jdbc:sqlite:CarServiceDatabase.db\");\n \n Statement stmt = null;\n\n stmt = connection.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * from Car_Info;\");\n\n // adding Cars to the Software store\n while (rs.next()) {\n\n String model = rs.getString(\"car_model\");\n String make = rs.getString(\"car_make\");\n String VIN = rs.getString(\"car_VIN\");\n int year = rs.getInt(\"car_year\");\n int mileage = rs.getInt(\"car_mileage\");\n String serviceDate = null;\n\n String owner = connection.createStatement().executeQuery(\"select owner_firstName from Car_Owner where owner_ID = \" + rs.getInt(\"owner_ID\")).getString(\"owner_firstName\");\n owner = owner + connection.createStatement().executeQuery(\"select owner_lastName from Car_Owner where owner_ID = \" + rs.getInt(\"owner_ID\")).getString(\"owner_lastName\");\n Cars.add(new Car(VIN, make, model, year, mileage, serviceDate, owner));\n\n }\n\n rs = stmt.executeQuery(\"SELECT * FROM Dealership;\");\n\n // adding Dealer to the Software store\n while (rs.next()) {\n String dealer_Name = rs.getString(\"dealer_name\");\n String dealer_address = rs.getString(\"dealer_address\");\n String dealer_phoneNum = rs.getString(\"dealer_phoneNum\");\n dealerships.add(new Dealership(dealer_Name, dealer_address, dealer_phoneNum));\n }\n\n rs = stmt.executeQuery(\"SELECT * FROM Service_Techs;\");\n\n // adding TECHS to the Software store\n while (rs.next()) {\n int dealer_ID = rs.getInt(\"dealer_ID\");\n String techName = rs.getString(\"tech_Name\");\n\n ServiceTechs.add(dealerships.get(dealer_ID - 1).new ServiceTech(dealer_ID, techName));\n }\n\n // adding Service_Info to the Software store\n rs = stmt.executeQuery(\"SELECT * FROM Service_Info;\");\n\n while (rs.next()) {\n String serviceDate = null;\n int techID = rs.getInt(\"tech_ID\");\n int dealershipID = rs.getInt(\"dealer_ID\");\n String carVIN = rs.getString(\"car_VIN\");\n\n String partsUsed = rs.getString(\"parts_used\");\n String serviceDesc = rs.getString(\"service_description\");\n double partsCost = rs.getDouble(\"cost_of_parts\");\n double totalCost = rs.getDouble(\"cost_of_service\");\n double laborHours = rs.getDouble(\"labor_hours\");\n\n serviceOrders.add(new ServiceOrder(carVIN, serviceDesc, serviceDate, partsUsed, techID, dealershipID,\n partsCost, totalCost, laborHours));\n\n }\n\n rs = stmt.executeQuery(\"SELECT * FROM Car_Owner;\");\n\n // adding Dealer to the Software store\n while (rs.next()) {\n String ownerFirstName = rs.getString(\"owner_firstName\");\n String ownerLastName = rs.getString(\"owner_lastName\");\n String ownerPhoneNumer = rs.getString(\"phone_num\");\n String ownerEmail = rs.getString(\"owner_email\");\n owners.add(new Owner(ownerFirstName, ownerLastName, ownerPhoneNumer, ownerEmail));\n }\n\n rs.close();\n stmt.close();\n\n } catch (Exception e) {\n Alert a = new Alert(AlertType.ERROR);\n a.setContentText(\"Something is wrong when accessing the database\");\n\n // show the dialog\n a.show();\n }\n\n }", "void go() {\n\t\tthis.conn = super.getConnection();\n\t\tcreateCustomersTable();\n\t\tcreateBankersTable();\n\t\tcreateCheckingAccountsTable();\n\t\tcreateSavingsAccountsTable();\n\t\tcreateCDAccountsTable();\n\t\tcreateTransactionsTable();\n\t\tcreateStocksTable();\n\t\tif(createAdminBanker) addAdminBanker();\n\t\tSystem.out.println(\"Database Created\");\n\n\t}", "@BeforeEach\n void setUp() {\n\n\n // repopulate the table I'm testing\n com.lukebusch.test.util.Database database = com.lukebusch.test.util.Database.getInstance();\n database.runSQL(\"cleandb.sql\");\n\n genericDao = new GenericDao( User.class );\n\n }", "public void createAll() {\n SQLFormater SQLFormaterMoods = new SQLFormater(MOODS_TABLE_NAME, ID_FIELD); // objects help to form sql strings for creating tables\n SQLFormater SQLFormaterAnswers = new SQLFormater(ANSWERS_TABLE_NAME, ID_FIELD);\n\n String[] answersTableFields = {ANSWERS_FIELD, ID_MOODS_FIELD}; // ordered fields\n String[] moodsTableFields = {MOODS_FIELD, HI_FIELD, BYBY_FIELD};\n\n SQLFormaterMoods.setNewField(MOODS_FIELD, STRING_TYPE, \"NOT NULL\"); // creating tables\n SQLFormaterMoods.setNewField(HI_FIELD, STRING_TYPE, null);\n SQLFormaterMoods.setNewField(BYBY_FIELD, STRING_TYPE, null);\n dbConnection.execute(SQLFormaterMoods.getStringToCreateDB(null));\n\n SQLFormaterAnswers.setNewField(ANSWERS_FIELD, STRING_TYPE, \"NOT NULL\");\n SQLFormaterAnswers.setNewField(ID_MOODS_FIELD, INTEGER_TYPE, null);\n String reference = \"FOREIGN KEY (\" + ID_MOODS_FIELD + \")\" +\n \" REFERENCES \" + MOODS_TABLE_NAME +\n \"(\" + ID_FIELD + \")\";\n dbConnection.execute(SQLFormaterAnswers.getStringToCreateDB(reference)); // create table with reference\n\n insertTableValues(SQLFormaterMoods, moodsTableFields, getMoodsTableValues()); // inserting ordered values into tables\n insertTableValues(SQLFormaterAnswers, answersTableFields, getAnswersTableValues());\n }", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "public static void populateDB() throws HibernateException, IOException {\n\t\tif(prev == DBMode.DB)\n\t\t\treturn;\n\t\t\n\t\t// if the db method was not last run, truncate the db before run\n\t\ttruncateDB();\n\t\t\t\n\t\tSession session = HibernateUtil.getSession().openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\n\t\t\t//////////////////////////////////////////////////// ,\n\t\t\t//// , This section is for adding Dummy Values////////\n\t\t\t//////////////////////////////////////////////////// ,\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_END_CLIENT TABLE\n\t\t\tpopulateEndClient(1, \"Accenture\", session);\n\t\t\tpopulateEndClient(2, \"Infosys\", session);\n\t\t\tpopulateEndClient(3, \"Federal Reserve\", session);\n\t\t\tpopulateEndClient(4, \"Fannie Mae\", session);\n\t\t\tpopulateEndClient(5, \"Revature\", session);\n\t\t\tpopulateEndClient(6, \"Sallie Mae\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_CLIENT TABLE\n\t\t\tpopulateClient(1, \"Accenture\", session);\n\t\t\tpopulateClient(2, \"Infosys\", session);\n\t\t\tpopulateClient(3, \"AFS\", session);\n\t\t\tpopulateClient(4, \"Hexaware\", session);\n\t\t\tpopulateClient(5, \"Revature\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_Interview_TYPE TABLE\n\t\t\tpopulateInterviewType(1, \"Phone\", session);\n\t\t\tpopulateInterviewType(2, \"Online\", session);\n\t\t\tpopulateInterviewType(3, \"On, Site\", session);\n\t\t\tpopulateInterviewType(4, \"Skype\", session);\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_CURRICULUM TABLE\n\t\t\tpopulateCurriculum(1, \"JTA\", session);\n\t\t\tpopulateCurriculum(2, \"Java\", session);\n\t\t\tpopulateCurriculum(3, \".Net\", session);\n\t\t\tpopulateCurriculum(4, \"PEGA\", session);\n\t\t\tpopulateCurriculum(5, \"DynamicCRM\", session);\n\t\t\tpopulateCurriculum(6, \"Salesforce\", session);\n\t\t\tpopulateCurriculum(7, \"Microservices\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_MARKETING_STATUS\n\t\t\tpopulateMarketingStatus(1, \"MAPPED, TRAINING\", session);\n\t\t\tpopulateMarketingStatus(2, \"MAPPED, RESERVED\", session);\n\t\t\tpopulateMarketingStatus(3, \"MAPPED, SELECTED\", session);\n\t\t\tpopulateMarketingStatus(4, \"MAPPED, CONFIRMED\", session);\n\t\t\tpopulateMarketingStatus(5, \"MAPPED, DEPLOYED\", session);\n\n\t\t\tpopulateMarketingStatus(6, \"UNMAPPED, TRAINING\", session);\n\t\t\tpopulateMarketingStatus(7, \"UNMAPPED, OPEN\", session);\n\t\t\tpopulateMarketingStatus(8, \"UNMAPPED, SELECTED\", session);\n\t\t\tpopulateMarketingStatus(9, \"UNMAPPED, CONFIRMED\", session);\n\t\t\tpopulateMarketingStatus(10, \"UNMAPPED, DEPLOYED\", session);\n\t\t\tpopulateMarketingStatus(11, \"DIRECTLY PLACED\", session);\n\t\t\tpopulateMarketingStatus(12, \"TERMINATED\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_BATCH_LOCATION\n\t\t\tpopulateBatchLocation(1, \"Revature LLC, 11730 Plaza America Drive, 2nd Floor | Reston, VA 20190\", session);\n\t\t\tpopulateBatchLocation(2, \"UMUC\", session);\n\t\t\tpopulateBatchLocation(3, \"USF\", session);\n\t\t\tpopulateBatchLocation(4, \"SkySong Innovation Center, 1475 N. Scottsdale Road, Scottsdale, AZ 85257\",\n\t\t\t\t\tsession);\n\t\t\tpopulateBatchLocation(5,\n\t\t\t\t\t\"Tech Incubator at Queens College, 65, 30 Kissena Blvd, CEP Hall 2, Queens, NY 11367\", session);\n\t\t\tpopulateBatchLocation(6, \"CUNY, SPS 119 West 31st Street, New York, NY 10001\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO BATCH\n\t\t\tpopulateBatch(1, \"1712 Dec04 AP, USF\", LocalDate.of(2017, 12, 4), LocalDate.of(2018, 2, 16), 2, 3, session);\n\t\t\tpopulateBatch(2, \"1710 Oct09 PEGA\", LocalDate.of(2017, 10, 9), LocalDate.of(2017, 12, 15), 4, 1, session);\n\t\t\tpopulateBatch(3, \"1709 Sept11 JTA\", LocalDate.of(2017, 9, 11), LocalDate.of(2017, 11, 17), 1, 1, session);\n\t\t\tpopulateBatch(4, \"1707 Jul24 Java\", LocalDate.of(2017, 7, 24), LocalDate.of(2017, 9, 29), 2, 1, session);\n\t\t\tpopulateBatch(5, \"1707 Jul10 PEGA\", LocalDate.of(2017, 7, 10), LocalDate.of(2017, 9, 15), 4, 1, session);\n\n\t\t\tpopulateBatch(6, \"1701 Jan09 Java\", LocalDate.of(2017, 1, 9), LocalDate.of(2017, 3, 17), 2, 1, session);\n\t\t\tpopulateBatch(7, \"1701 Jan30 NET\", LocalDate.of(2017, 1, 30), LocalDate.of(2017, 4, 17), 3, 1, session);\n\t\t\tpopulateBatch(8, \"1709 Sep18 Salesforce\", LocalDate.of(2017, 9, 18), LocalDate.of(2017, 12, 8), 6, 1,\n\t\t\t\t\tsession);\n\t\t\tpopulateBatch(9, \"1709 Sep25 Java AP, CUNY\", LocalDate.of(2017, 9, 25), LocalDate.of(2017, 12, 1), 2, 6,\n\t\t\t\t\tsession);\n\t\t\tpopulateBatch(10, \"1712 Dec04, 2\", LocalDate.of(2017, 12, 4), LocalDate.of(2018, 2, 9), 2, 1, session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO ASSOCIATES\n\t\t\t// populateAssociate(admin.tf_associate_seq.nextval, \"name\", \"name\", status,\n\t\t\t// batch, session);\n\n\t\t\t// 1712 Dec04 AP, USF\n\t\t\tpopulateAssociate(1, \"Frank\", \"Hind\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(2, \"Thomas\", \"Page\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(3, \"Lucas\", \"Normand\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(4, \"Jhonnie\", \"Cole\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(5, \"Ramona\", \"Reyes\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(6, \"Grace\", \"Noland\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(7, \"Casey\", \"Morton\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(8, \"Gustavo\", \"Brady\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(9, \"Glen\", \"Holloway\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(10, \"Leeroy\", \"Jenkins\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(11, \"Jeanne\", \"Watts\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(12, \"Carol\", \"Ruiz\", 1, 2, 1, 0, session);\n\n\t\t\t// 1710 Oct09 PEGA\n\t\t\tpopulateAssociate(13, \"Trevor\", \"Hampton\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(14, \"Jennie\", \"Hudson\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(15, \"David\", \"Haynes\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(16, \"Ira\", \"Mullins\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(17, \"Alexandra\", \"Mitchell\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(18, \"Bradley\", \"Harris\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(19, \"Gerardo\", \"Roy\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(20, \"Jacob\", \"Cortez\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(21, \"Kathryn\", \"Young\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(22, \"Allen\", \"Walker\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(23, \"Gustavo\", \"Reed\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(24, \"Robin\", \"Norton\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(25, \"Julia\", \"Drake\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(26, \"Joan\", \"Evans\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(27, \"Larry\", \"Holl\", 1, 2, 4, 1, session);\n\n\t\t\t// 1709 Sept11 JTA\n\t\t\tpopulateAssociate(28, \"Vito\", \"Plante\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(29, \"Crystal\", \"Couch\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(30, \"Adam\", \"Collins\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(31, \"Bert\", \"Bryant\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(32, \"Nicholas\", \"Griffin\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(33, \"Joe\", \"Cook\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(34, \"Andrew\", \"Bennet\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(35, \"Phillip\", \"Henderson\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(36, \"Gary\", \"Ward\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(37, \"Bruce\", \"Long\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(38, \"Russel\", \"Peters\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(39, \"Emily\", \"Baker\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(40, \"Jake\", \"King\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(41, \"Jamie\", \"Campbell\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(42, \"Larry\", \"Hughes\", 1, 1, 1, 2, session);\n\n\t\t\t// 1707 Jul24 Java\n\t\t\tpopulateAssociate(43, \"Carlos\", \"Adams\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(44, \"Victor\", \"Bailey\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(45, \"Harold\", \"Cartor\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(46, \"Judith\", \"Rivera\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(47, \"Maria\", \"Smith\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(48, \"Steven\", \"Simmons\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(49, \"Donna\", \"Hall\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(50, \"Samuel\", \"Price\", 7, 2, 2, 3, session);\n\t\t\tpopulateAssociate(51, \"Jean\", \"Jackson\", 7, 2, 2, 3, session);\n\t\t\tpopulateAssociate(52, \"Adam\", \"Stewart\", 4, 2, 2, 3, session);\n\t\t\tpopulateAssociate(53, \"Gary\", \"Nelson\", 4, 2, 2, 3, session);\n\t\t\tpopulateAssociate(54, \"Peter\", \"Morgan\", 4, 2, 2, 3, session);\n\n\t\t\t// 1707 Jul10 Pega\n\t\t\tpopulateAssociate(55, \"Jack\", \"Morris\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(56, \"Randy\", \"Parker\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(57, \"Justin\", \"Flores\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(58, \"Richard\", \"Gray\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(59, \"Jesse\", \"Turner\", 4, 3, 4, 4, session);\n\t\t\tpopulateAssociate(60, \"John\", \"Baker\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(61, \"Benjamin\", \"Jones\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(62, \"Todd\", \"Torres\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(63, \"Kathleen\", \"Kelly\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(64, \"Sara\", \"Long\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(65, \"Linda\", \"Russell\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(66, \"Brenda\", \"Wilson\", 10, 3, 4, 4, session);\n\t\t\tpopulateAssociate(67, \"Betty\", \"Green\", 10, 3, 4, 4, session);\n\t\t\tpopulateAssociate(68, \"Bobby\", \"Edwards\", 10, 3, 4, 4, session);\n\t\t\tpopulateAssociate(69, \"Marilyn\", \"Allens\", 10, 3, 4, 4, session);\n\n\t\t\t// batch 7\n\t\t\tpopulateAssociate(70, \"Willoughby\", \"Sherwood\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(71, \"Tomi\", \"Nikkole\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(72, \"Newt\", \"Jaki\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(73, \"Darnell\", \"Mervyn\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(74, \"Claire\", \"Connor\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(75, \"Edmonde\", \"Sora\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(76, \"Kaitlyn\", \"Abbie\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(77, \"Natsuko\", \"Lily\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(78, \"Ben\", \"Gabrielle\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(79, \"Alberta\", \"Arienne\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(80, \"Merline\", \"Thom\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(81, \"Hachirou\", \"Kasumi\", 1, 3, 6, 7, session);\n\n\t\t\t// batch 6\n\t\t\tpopulateAssociate(82, \"Leigh\", \"Jordon\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(83, \"Amity\", \"Brandi\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(84, \"Merlyn\", \"Ros\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(85, \"Primula\", \"Gyles\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(86, \"Ethel\", \"Jemima\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(87, \"Jonelle\", \"Eugenie\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(88, \"Evangelina\", \"Harlan\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(89, \"Anjelica\", \"Babs\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(90, \"Jerred\", \"Yuko\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(91, \"Cecile\", \"Colton\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(92, \"Ulla\", \"Gilbert\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(93, \"Teija\", \"Mariko\", 10, 1, 3, 6, session);\n\n\t\t\t// batch 5\n\t\t\tpopulateAssociate(94, \"Maryann\", \"Zechariah\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(95, \"Nichola\", \"Dennis\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(96, \"Githa\", \"Nyree\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(97, \"Chelsey\", \"Gwyneth\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(98, \"Jepson\", \"Orson\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(99, \"Careen\", \"Jeffery\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(100, \"Malachi\", \"Nic\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(101, \"Farran\", \"Sawyer\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(102, \"Desiree\", \"Gayelord\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(103, \"Mae\", \"Lorrie\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(104, \"Jon\", \"Hamilton\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(105, \"Marshal\", \"Parnel\", 10, 2, 2, 5, session);\n\n\t\t\t// batch 8\n\t\t\tpopulateAssociate(106, \"Ayame\", \"Shun\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(107, \"Katashi\", \"He\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(108, \"Jiahao\", \"Shiro\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(109, \"Naoko\", \"Hikaru\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(110, \"Chihiro\", \"Moriko\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(111, \"Bai\", \"Kazuo\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(112, \"Etsuko\", \"Fang\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(113, \"Hideki\", \"Qing\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(114, \"Masaru\", \"Ayako\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(115, \"Megumi\", \"Mari\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(116, \"Hiroko\", \"Hiroshi\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(117, \"Sumiko\", \"Mai\", 1, 4, 2, 8, session);\n\n\t\t\t// batch9\n\t\t\tpopulateAssociate(118, \"Kanon\", \"Bai\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(119, \"Hikaru\", \"Yuu\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(120, \"Shiori\", \"Takeshi\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(121, \"Jianhong\", \"Youta\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(122, \"Goro\", \"Bai\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(123, \"Shufen\", \"Miyu\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(124, \"Kenji\", \"He\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(125, \"Ren\", \"Hayate\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(126, \"Momoko\", \"Miki\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(127, \"Takashi\", \"Ling\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(128, \"Setsuko\", \"Yuuki\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(129, \"Megumi\", \"Kato\", 1, 5, null, 9, session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO Interview\n\t\t\t// populateInterview(admin.tf_Interview_seq.nextval, date, feedback, client,\n\t\t\t// endclient, Integertype, associd, session);\n\n\t\t\t// batch 6\n\t\t\tpopulateInterview(1, LocalDateTime.of(2017, 4, 23, 12, 0, 0), \"Good\", 2, 3, 3, 82, session);\n\t\t\tpopulateInterview(2, LocalDateTime.of(2017, 4, 23, 12, 0, 0), \"Good\", 2, 3, 3, 83, session);\n\t\t\tpopulateInterview(3, LocalDateTime.of(2017, 4, 23, 12, 0, 0), \"Good\", 2, 3, 3, 84, session);\n\t\t\tpopulateInterview(4, LocalDateTime.of(2017, 4, 24, 12, 0, 0), \"Good\", 2, 3, 3, 85, session);\n\t\t\tpopulateInterview(5, LocalDateTime.of(2017, 4, 24, 12, 0, 0), \"Good\", 2, 3, 3, 86, session);\n\t\t\tpopulateInterview(6, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 1, 87, session);\n\t\t\tpopulateInterview(7, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 1, 88, session);\n\t\t\tpopulateInterview(8, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 4, 89, session);\n\t\t\tpopulateInterview(9, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 4, 90, session);\n\t\t\tpopulateInterview(10, LocalDateTime.of(2017, 7, 18, 12, 0, 0), \"Good\", 2, 3, 1, 91, session);\n\t\t\tpopulateInterview(11, LocalDateTime.of(2017, 7, 18, 12, 0, 0), \"Good\", 2, 3, 1, 92, session);\n\t\t\tpopulateInterview(12, LocalDateTime.of(2017, 7, 18, 12, 0, 0), \"Good\", 2, 3, 1, 93, session);\n\n\t\t\t// batch5\n\t\t\tpopulateInterview(13, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 1, 94, session);\n\t\t\tpopulateInterview(14, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 4, 95, session);\n\t\t\tpopulateInterview(15, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 4, 96, session);\n\t\t\tpopulateInterview(16, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 1, 97, session);\n\t\t\tpopulateInterview(17, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 4, 98, session);\n\t\t\tpopulateInterview(18, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 1, 99, session);\n\t\t\tpopulateInterview(19, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 1, 100, session);\n\t\t\tpopulateInterview(20, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 4, 101, session);\n\t\t\tpopulateInterview(21, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 102, session);\n\t\t\tpopulateInterview(22, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 103, session);\n\t\t\tpopulateInterview(23, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 104, session);\n\t\t\tpopulateInterview(24, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 105, session);\n\n\t\t\t// batch, 4\n\t\t\tpopulateInterview(25, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 55, session);\n\t\t\tpopulateInterview(26, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 56, session);\n\t\t\tpopulateInterview(27, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 57, session);\n\t\t\tpopulateInterview(28, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 58, session);\n\t\t\tpopulateInterview(29, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 59, session);\n\t\t\tpopulateInterview(30, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 60, session);\n\t\t\tpopulateInterview(31, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 61, session);\n\n\t\t\tpopulateInterview(32, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 62, session);\n\t\t\tpopulateInterview(33, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 63, session);\n\t\t\tpopulateInterview(34, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 64, session);\n\t\t\tpopulateInterview(35, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 65, session);\n\n\t\t\tpopulateInterview(36, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 66, session);\n\t\t\tpopulateInterview(37, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 67, session);\n\t\t\tpopulateInterview(38, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 68, session);\n\t\t\tpopulateInterview(39, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 69, session);\n\n\t\t\t// batch3\n\t\t\tpopulateInterview(40, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 43, session);\n\t\t\tpopulateInterview(41, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 44, session);\n\t\t\tpopulateInterview(42, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 45, session);\n\t\t\tpopulateInterview(43, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 46, session);\n\t\t\tpopulateInterview(44, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 47, session);\n\t\t\tpopulateInterview(45, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 48, session);\n\t\t\tpopulateInterview(46, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 49, session);\n\t\t\tpopulateInterview(47, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"No Good\", 2, 2, 3, 50, session);\n\t\t\tpopulateInterview(48, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"No Good\", 2, 2, 3, 51, session);\n\t\t\tpopulateInterview(49, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 52, session);\n\t\t\tpopulateInterview(50, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 53, session);\n\t\t\tpopulateInterview(51, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 54, session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO PLACEMENT\n\t\t\t// populatePlacement(admin.tf_placement_seq.nextval, start, end, client,\n\t\t\t// endclient, assoc, session);\n\n\t\t\t// batch 6\n\t\t\tpopulatePlacement(1, LocalDate.of(2017, 4, 23), LocalDate.of(2018, 4, 23), 2, 3, 82, session);\n\t\t\tpopulatePlacement(2, LocalDate.of(2017, 4, 23), LocalDate.of(2018, 4, 23), 2, 3, 83, session);\n\t\t\tpopulatePlacement(3, LocalDate.of(2017, 4, 23), LocalDate.of(2018, 4, 23), 2, 3, 84, session);\n\t\t\tpopulatePlacement(4, LocalDate.of(2017, 4, 24), LocalDate.of(2018, 4, 23), 2, 3, 85, session);\n\t\t\tpopulatePlacement(5, LocalDate.of(2017, 4, 24), LocalDate.of(2018, 4, 23), 2, 3, 86, session);\n\t\t\tpopulatePlacement(6, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 87, session);\n\t\t\tpopulatePlacement(7, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 88, session);\n\t\t\tpopulatePlacement(8, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 89, session);\n\t\t\tpopulatePlacement(9, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 90, session);\n\t\t\tpopulatePlacement(10, LocalDate.of(2017, 7, 18), LocalDate.of(2018, 4, 23), 2, 3, 91, session);\n\t\t\tpopulatePlacement(11, LocalDate.of(2017, 7, 18), LocalDate.of(2018, 4, 23), 2, 3, 92, session);\n\t\t\tpopulatePlacement(12, LocalDate.of(2017, 7, 18), LocalDate.of(2018, 4, 23), 2, 3, 93, session);\n\n\t\t\t// batch 5\n\t\t\tpopulatePlacement(13, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 94, session);\n\t\t\tpopulatePlacement(14, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 95, session);\n\t\t\tpopulatePlacement(15, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 96, session);\n\t\t\tpopulatePlacement(16, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 97, session);\n\t\t\tpopulatePlacement(17, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 98, session);\n\t\t\tpopulatePlacement(18, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 99, session);\n\t\t\tpopulatePlacement(19, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 100, session);\n\t\t\tpopulatePlacement(20, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 101, session);\n\t\t\tpopulatePlacement(21, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 102, session);\n\t\t\tpopulatePlacement(22, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 103, session);\n\t\t\tpopulatePlacement(23, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 104, session);\n\t\t\tpopulatePlacement(24, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 105, session);\n\n\t\t\t// batch 4\n\t\t\tpopulatePlacement(25, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 55, session);\n\t\t\tpopulatePlacement(26, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 56, session);\n\t\t\tpopulatePlacement(27, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 57, session);\n\t\t\tpopulatePlacement(28, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 58, session);\n\t\t\tpopulatePlacement(29, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 59, session);\n\t\t\tpopulatePlacement(30, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 60, session);\n\t\t\tpopulatePlacement(31, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 61, session);\n\t\t\tpopulatePlacement(32, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 62, session);\n\t\t\tpopulatePlacement(33, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 63, session);\n\t\t\tpopulatePlacement(34, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 64, session);\n\t\t\tpopulatePlacement(35, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 65, session);\n\n\t\t\t// batch 3\n\n\t\t\tpopulatePlacement(36, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 43, session);\n\t\t\tpopulatePlacement(37, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 44, session);\n\t\t\tpopulatePlacement(38, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 45, session);\n\t\t\tpopulatePlacement(39, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 46, session);\n\t\t\tpopulatePlacement(40, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 47, session);\n\t\t\tpopulatePlacement(41, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 47, session);\n\t\t\tpopulatePlacement(42, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 49, session);\n\t\t\tpopulatePlacement(43, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 52, session);\n\t\t\tpopulatePlacement(44, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 53, session);\n\t\t\tpopulatePlacement(45, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 54, session);\n\n\t\t\tsession.flush();\n\t\t\ttx.commit();\n\n\t\t\tprev = DBMode.DB;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t\tthrow new IOException(\"Could not populate DB\", e);\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "private void creates() {\n \tDBPeer.fetchTableColumns();\n \tDBPeer.fetchTableRows();\n \tDBPeer.fetchTableIndexes();\n \t\n for (int i = 0; i < creates.size(); i++) {\n creates.get(i).init();\n }\n \n DBPeer.updateTableColumns();\n DBPeer.updateTableRows();\n DBPeer.updateTableIndexes();\n }", "private void connectDatabase(){\n }", "private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}", "private void updateDB() {\n }", "void populateData();", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "private static void insertListsInDataBase () throws SQLException {\n //Create object ActionsWithRole for working with table role\n ActionsCRUD<Role,Integer> actionsWithRole = new ActionsWithRole();\n for (Role role : roles) {\n actionsWithRole.create(role);\n }\n //Create object ActionsWithUsers for working with table users\n ActionsCRUD<User,Integer> actionsWithUsers = new ActionsWithUsers();\n for (User user : users) {\n actionsWithUsers.create(user);\n }\n //Create object ActionsWithAccount for working with table account\n ActionsCRUD<Account,Integer> actionsWithAccount = new ActionsWithAccount();\n for (Account account : accounts) {\n actionsWithAccount.create(account);\n }\n //Create object ActionsWithPayment for working with table payment\n ActionsCRUD<Payment,Integer> actionsWithPayment = new ActionsWithPayment();\n for (Payment payment : payments) {\n actionsWithPayment.create(payment);\n }\n }", "void db_all(Context context);", "@Override\n\tpublic void resetData() throws Exception {\n\t\tDataSource dataSource = (DataSource)context.getBean(\"dataSource\");\n\t\tConnection dbconn = dataSource.getConnection();\n\t\t\n\t\tStatement stmt = dbconn.createStatement();\n\t\t//stmt.executeUpdate(\"CREATE TABLE RENTALS(RENTAL_ID BIGINT, RENTAL_RENTALDATE TIMESTAMP, RENTAL_RENTALDAYS INTEGER,USER_ID BIGINT,MOVIE_ID BIGINT)\");\n\t\t\n\t\tstmt.executeUpdate(\"DROP TABLE ROLES IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE RENTALS IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE MOVIES IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE USERS IF EXISTS\");\n\t\tstmt.executeUpdate(\"DROP TABLE PRICECATEGORIES IF EXISTS\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE USERS(USER_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,\" +\n\t\t\t\t\"USER_EMAIL VARCHAR(255),\" +\n\t\t\t\t\"USER_FIRSTNAME VARCHAR(255),\" +\n\t\t\t\t\"USER_NAME VARCHAR(255))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE PRICECATEGORIES(PRICECATEGORY_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,\" +\n\t\t\t\t\"PRICECATEGORY_TYPE VARCHAR(255))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE MOVIES(MOVIE_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,MOVIE_RELEASEDATE TIMESTAMP,MOVIE_TITLE VARCHAR(255),MOVIE_RENTED BOOLEAN,PRICECATEGORY_FK BIGINT,CONSTRAINT FK_CATEGORY FOREIGN KEY(PRICECATEGORY_FK) REFERENCES PRICECATEGORIES(PRICECATEGORY_ID))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE RENTALS(RENTAL_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,RENTAL_RENTALDATE TIMESTAMP,RENTAL_RENTALDAYS INTEGER,USER_ID BIGINT,MOVIE_ID BIGINT,CONSTRAINT FK_USER FOREIGN KEY(USER_ID) REFERENCES USERS(USER_ID),CONSTRAINT FK_MOVIE FOREIGN KEY(MOVIE_ID) REFERENCES MOVIES(MOVIE_ID))\");\n\t\tstmt.executeUpdate(\"CREATE MEMORY TABLE ROLES(ROLE_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,ROLE_ROLENAME VARCHAR(255),USER_ID BIGINT,CONSTRAINT FK67A8EBDC52137E1 FOREIGN KEY(USER_ID) REFERENCES USERS(USER_ID))\");\n\n\t\tIDatabaseConnection connection = new DatabaseConnection(dbconn);\n\t\tDatabaseConfig config = connection.getConfig();\n\t\tconfig.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,\n\t\t\t\tnew HsqldbDataTypeFactory());\n\t\t\n\t\tInputStream stream = getClass().getResourceAsStream(\"dataset.xml\");\n\t\t\n\t\tFlatXmlDataSetBuilder builder = new FlatXmlDataSetBuilder();\n\t\tIDataSet dataSet = builder.build(stream);\n \n\t\ttry {\n\t\t\tDatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);\n\t\t} finally {\n\t\t\tconnection.close();\n\t\t}\n\t}", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "@Before\n\tpublic void setUpDB() {\n\t\tmanagerDAO = new ManagerDAO();\n\t\t// Clean the DB\n\t\tmanagerDAO.deleteAllEmployees();\n\t\tmanagerDAO.deleteAllMembers();\n\t\tmanagerDAO.deleteAllTickets();\n\t\tmanagerDAO.deleteAllSessions();\n\t\tmanagerDAO.deleteAllFilms();\n\t\tmanagerDAO.deleteAllRooms();\n\t\tmanagerDAO.deleteAllSeats();\n\t\t// Fill the DB\n\t\tFilm f1 = new Film(\"Inmersion\", \"Wim Wenders\", 12, 111, \"EE.UU.\");\n\t\tFilm f2 = new Film(\"Pacific Rim: Insurrecion\", \"Steven S. DeKnight\", 7, 110, \"EE.UU.\");\n\t\tFilm f3 = new Film(\"Leo Da Vinci\", \"Sergio Manfio\", 0, 85, \"Italia\");\n\t\tFilm f4 = new Film(\"Campeones\", \"Javier Fesser\", 7, 100, \"España\");\n\t\tFilm f5 = new Film(\"Ready Player One\", \"Steven Spielberg\", 7, 140, \"EE.UU.\");\n\n\t\tEmployee e1 = new Employee(\"e1\", \"Juan\", \"Garcia Perez\", \"e1\", 1500);\n\t\tEmployee e2 = new Employee(\"e2\", \"Maria\", \"Martin Gomez\", \"e2\", 1700);\n\t\tEmployee e3 = new Employee(\"e3\", \"Paco\", \"Perez Gomez\", \"e3\", 1300);\n\t\tEmployee e4 = new Employee(\"e4\", \"Luis\", \"Lozano Esteban\", \"e4\", 1800);\n\t\tEmployee e5 = new Employee(\"e5\", \"Andrea\", \"Hernandez Sarria\", \"e5\", 1500);\n\n\t\tRoom r1 = new Room(1, 60);\n\t\tRoom r2 = new Room(2, 70);\n\t\tRoom r3 = new Room(3, 80);\n\t\tRoom r4 = new Room(4, 60);\n\t\tRoom r5 = new Room();\n\t\tr5.setNumberSeats(60);\n\t\tr5.setRoomNumber(5);\n\n\t\tSeat se1 = new Seat(\"A3\");\n\t\tSeat se2 = new Seat(\"A4\");\n\t\tSeat se3 = new Seat(\"A5\");\n\t\tSeat se4 = new Seat(\"E10\");\n\t\tSeat se5 = new Seat(\"E9\");\n\t\tSeat se6 = new Seat(\"E8\");\n\t\tSeat se7 = new Seat(\"D5\");\n\t\tSeat se8 = new Seat(\"D6\");\n\t\tSeat se9 = new Seat(\"C7\");\n\t\tSeat seA = new Seat(\"B8\");\n\t\tSeat seB = new Seat(\"B9\");\n\t\tSeat seC = new Seat(\"B10\");\n\t\tSeat seD = new Seat(\"F3\");\n\t\tSeat seE = new Seat(\"F4\");\n\t\tSeat seF = new Seat(\"F5\");\n\n\t\tArrayList<Seat> ss1 = new ArrayList<Seat>();\n\t\tss1.add(se1);\n\t\tss1.add(se2);\n\t\tss1.add(se3);\n\n\t\tArrayList<Seat> ss2 = new ArrayList<Seat>();\n\t\tss2.add(se4);\n\t\tss2.add(se5);\n\t\tss2.add(se6);\n\n\t\tArrayList<Seat> ss3 = new ArrayList<Seat>();\n\t\tss3.add(se7);\n\t\tss3.add(se8);\n\n\t\tArrayList<Seat> ss4 = new ArrayList<Seat>();\n\t\tss4.add(se9);\n\n\t\tArrayList<Seat> ss5 = new ArrayList<Seat>();\n\t\tss5.add(seA);\n\t\tss5.add(seB);\n\t\tss5.add(seC);\n\n\t\tArrayList<Seat> ss6 = new ArrayList<Seat>();\n\t\tss6.add(seD);\n\t\tss6.add(seE);\n\t\tss6.add(seF);\n\n\t\tTicket t1 = new Ticket();\n\t\tt1.addSeats(ss1);\n\t\tTicket t2 = new Ticket();\n\t\tt2.addSeats(ss2);\n\t\tTicket t3 = new Ticket();\n\t\tt3.addSeats(ss3);\n\t\tTicket t4 = new Ticket();\n\t\tt4.addSeats(ss4);\n\t\tTicket t5 = new Ticket();\n\t\tt5.addSeats(ss5);\n\t\tTicket t6 = new Ticket();\n\t\tt6.addSeats(ss6);\n\t\n\n\t\tMember m1 = new Member(\"ariane.fernandez@opendeusto.es\", \"Ariane\", \"Fernandez\", \"ariane\", \"26-04-1997\", 0);\n\t\tMember m2 = new Member(\"unaibermejofdez@opendeusto.es\", \"Unai\", \"Bermejo\", \"unai\", \"23-08-1997\", 0);\n\t\tMember m3 = new Member(\"ander.arguinano@opendeusto.es\", \"Ander\", \"Arguinano\", \"ander\", \"26-10-1997\", 20);\n\t\tMember m4 = new Member(\"inigogc@opendeusto.es\", \"Inigo\", \"Garcia\", \"inigo\", \"10-02-1997\", 0);\n\t\tMember m5 = new Member(\"fischer.wolfgang@opendeusto.es\", \"Wolfgang \", \"Fischer\", \"wolfgang\", \"05-09-1997\", 0);\n\n\t\tm1.addTicket(t1);\n\t\tm1.addTicket(t2);\n\t\tm3.addTicket(t3);\n\t\tm4.addTicket(t5);\n\t\tm5.addTicket(t6);\n\t\tm2.addTicket(t4);\n\n\t\tSession s1 = new Session(\"S1\", \"13-04-2018\", \"17:00\", (float) 8.90);\n\t\tSession s2 = new Session(\"S2\", \"13-04-2018\", \"18:00\", (float) 8.90);\n\t\tSession s3 = new Session(\"S3\", \"13-04-2018\", \"19:00\", (float) 5.90);\n\n\t\ts1.addTicket(t1);\n\t\ts2.addTicket(t2);\n\t\ts1.addTicket(t3);\n\t\ts2.addTicket(t4);\n\t\ts3.addTicket(t5);\n\t\ts1.addTicket(t6);\n\n\t\tr1.addSession(s1);\n\t\tr2.addSession(s2);\n\t\tr3.addSession(s3);\n\n\t\tf1.addSession(s1);\n\t\tf1.addSession(s2);\n\t\tf1.addSession(s3);\n\n\t\tSession s4 = new Session(\"S4\", \"14-04-2018\", \"17:00\", (float) 8.90);\n\t\tSession s5 = new Session(\"S5\", \"14-04-2018\", \"20:00\", (float) 7.50);\n\t\tSession s6 = new Session(\"S6\", \"14-04-2018\", \"22:00\", (float) 10.90);\n\n\t\tr4.addSession(s4);\n\t\tr5.addSession(s5);\n\t\tr1.addSession(s6);\n\n\t\tf2.addSession(s4);\n\t\tf2.addSession(s5);\n\t\tf2.addSession(s6);\n\n\t\tSession s7 = new Session(\"S7\", \"15-04-2018\", \"17:00\", (float) 5.80);\n\t\tSession s8 = new Session(\"S8\", \"15-04-2018\", \"19:00\", (float) 6.60);\n\t\tSession s9 = new Session(\"S9\", \"15-04-2018\", \"22:00\", (float) 4.40);\n\n\t\tr2.addSession(s7);\n\t\tr3.addSession(s8);\n\t\tr4.addSession(s9);\n\n\t\tf3.addSession(s7);\n\t\tf3.addSession(s8);\n\t\tf3.addSession(s9);\n\n\t\tSession sA = new Session(\"S10\", \"13-04-2018\", \"16:00\", (float) 12.90);\n\t\tSession sB = new Session(\"S11\", \"13-04-2018\", \"18:00\", (float) 8.90);\n\t\tSession sC = new Session(\"S12\", \"13-04-2018\", \"20:00\", (float) 6.90);\n\n\t\tr5.addSession(sA);\n\t\tr1.addSession(sB);\n\t\tr2.addSession(sC);\n\n\t\tf4.addSession(sA);\n\t\tf4.addSession(sB);\n\t\tf4.addSession(sC);\n\n\t\tSession sD = new Session(\"S13\", \"15-04-2018\", \"16:00\", (float) 12.90);\n\t\tSession sE = new Session(\"S14\", \"15-04-2018\", \"18:00\", (float) 8.90);\n\t\tSession sF = new Session(\"S15\", \"15-04-2018\", \"20:00\", (float) 6.90);\n\n\t\tr3.addSession(sD);\n\t\tr4.addSession(sE);\n\t\tr5.addSession(sF);\n\n\t\tf5.addSession(sD);\n\t\tf5.addSession(sE);\n\t\tf5.addSession(sF);\n\t\t\n\t\ttry {\t\n\t\t\tmanagerDAO.storeFilm(f1);\n\t\t\tmanagerDAO.storeEmployee(e1);\n\t\t\tmanagerDAO.storeEmployee(e2);\n\t\t\tmanagerDAO.storeEmployee(e3);\n\t\t\tmanagerDAO.storeEmployee(e4);\n\t\t\tmanagerDAO.storeEmployee(e5);\n\t\t} catch(Exception e) {\n\t\t\t\n\t\t}\n\t}", "public void initialiserBD() {\n\n // on crée une personne avec tous les champs à vide, cela nous permettra de tester l'existence de la BD pour les futurs lancements.\n pdao.open();\n pdao.creerPersonnePremierLancement();\n pdao.close();\n\n // création des 3 listes\n Liste liste1 = new Liste(1, \"Maison\", \"La liste de ma maison\");\n Liste liste2 = new Liste(2, \"Garage\", \"La liste de mon garage\");\n Liste liste3 = new Liste(3, \"Magasin\", \"La liste de mon magasin\");\n\n // ajout des listes\n ldao.open();\n ldao.ajouterListe(liste1);\n ldao.ajouterListe(liste2);\n ldao.ajouterListe(liste3);\n ldao.close();\n\n // on ajoute 3 catégories\n CategorieDAO categorieDAO = new CategorieDAO(this);\n categorieDAO.open();\n Categorie cuisine = new Categorie(0, \"Cuisine\", \"Tous les objets de la cuisine\");\n Categorie salon = new Categorie(0, \"Salon\", \"Tous les objets du Salon\");\n Categorie chambre = new Categorie(0, \"Chambre\", \"Tous les objets de la chambre\");\n categorieDAO.addCategorie(cuisine);\n categorieDAO.addCategorie(salon);\n categorieDAO.addCategorie(chambre);\n categorieDAO.close();\n\n Date date = new Date();\n\n // Création de la classe utilitaire pour les dates\n Utils utils = new Utils(this);\n String dateSimpleDateFormat = utils.getDateSimpleDateFormat();\n SimpleDateFormat sdf = new SimpleDateFormat(dateSimpleDateFormat);\n String dateDuJour = sdf.format(date);\n\n // texte explicatif\n String explication = \"Cet objet est crée au demarrage de l'application, vous pouvez le supprimer en cliquant dessus.\";\n\n // on ajoute 6 bien pour exemple\n Bien bien1 = new Bien(1, \"Lunette\", dateDuJour, dateDuJour, \"\", \"Légèrement rayées sur le coté\", \"251\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n Bien bien2 = new Bien(2, \"Frigo\", dateDuJour, dateDuJour, \"\", \"\", \"3599\", \"\", \"\", \"\", \"\", 1, explication, \"45DG425845DA\");\n Bien bien3 = new Bien(3, \"Ordinateur\", dateDuJour, dateDuJour, \"\", \"Manque une touche\", \"1099\", \"\", \"\", \"\", \"\", 3, explication, \"515D-TGH2336\");\n Bien bien4 = new Bien(4, \"Vaisselle\", dateDuJour, dateDuJour, \"\", \"Vaisselle de Mémé\", \"6902\", \"\", \"\", \"\", \"\", 1, explication, \"\");\n Bien bien5 = new Bien(5, \"TV\", dateDuJour, dateDuJour, \"\", \"\", \"350\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n Bien bien6 = new Bien(6, \"Home cinéma\", dateDuJour, dateDuJour, \"\", \"Marque Pioneer - Une enceinte grésille un peu\", \"400\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n\n\n // dans la liste 1\n ArrayList<Integer> listeIdListe1 = new ArrayList<Integer>();\n listeIdListe1.add(1);\n\n\n bdao.open();\n\n bdao.addBien(bien1, listeIdListe1);\n bdao.addBien(bien2, listeIdListe1);\n bdao.addBien(bien3, listeIdListe1);\n bdao.addBien(bien4, listeIdListe1);\n bdao.addBien(bien5, listeIdListe1);\n bdao.addBien(bien6, listeIdListe1);\n\n bdao.close();\n }", "private void insertTestUsers() {\n\t\tinitDb();\n\t\tinsertUser(\"aaa\", \"11\");\n\t\tinsertUser(\"bbb\", \"22\");\n\t\tinsertUser(\"ccc\", \"33\");\n\t}", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "private void getDatabase(){\n\n }", "private void initTables() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement()) {\n statement.execute(INIT.CREATE_CITIES.toString());\n statement.execute(INIT.CREATE_ROLES.toString());\n statement.execute(INIT.CREATE_MUSIC.toString());\n statement.execute(INIT.CREATE_ADDRESS.toString());\n statement.execute(INIT.CREATE_USERS.toString());\n statement.execute(INIT.CREATE_USERS_TO_MUSIC.toString());\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "private void initialData() {\n\n// if (MorphiaObject.datastore.createQuery(SecurityRole.class).countAll() == 0) {\n// for (final String roleName : Arrays\n// .asList(controllers.Application.USER_ROLE)) {\n// final SecurityRole role = new SecurityRole();\n// role.roleName = roleName;\n// MorphiaObject.datastore.save(role);\n// }\n// }\n }", "@BeforeEach\n void setUp() {\n dao = new GenericDao(User.class);\n Database database = Database.getInstance();\n database.runSQL(\"cleandb.sql\");\n }", "public void generateAttributes() throws SQLException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, InstantiationException{\n ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(\"spring.xml\");\n //Get the EmployeeDAO Bean\n BasicDataDAO dataDAO = null;\n BasicData newData = null;\n \n \n if (tableName.equals(\"test\")) {\n\t\t\tdataDAO = ctx.getBean(\"testDAO\", TestDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Test(0, 99, \"Hello\", \"sample\", new Date());\n\t\t}else if (tableName.equals(\"utilisateur\")) {\n\t\t\tdataDAO = ctx.getBean(\"utilisateurDAO\", UtilisateurDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Utilisateur(0, \"handa\", \"handa-upsud\", \"admin\", 30);\n\t\t}else if (tableName.equals(\"source\")) {\n\t\t\tdataDAO = ctx.getBean(\"sourceDAO\", SourceDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Source(0, \"http\", \"srouce1\", \"haut\", \"France\", \"vertical\", 10, \"test\");\n\t\t}else if (tableName.equals(\"theme\")) {\n\t\t\tdataDAO = ctx.getBean(\"themeDAO\", ThemeDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Theme(0, \"testTheme\");\n\t\t}else if (tableName.equals(\"themeRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"themeRelationDAO\", ThemeRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new ThemeRelation(0, 1, 1);\n\t\t}else if (tableName.equals(\"version\")) {\n\t\t\tdataDAO = ctx.getBean(\"versionDAO\", VersionDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new Version(0, 1, \"url_serveur\", \"version\", new Date());\n\t\t}else if (tableName.equals(\"abonnementRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"abonnementRelationDAO\", AbonnementRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new AbonnementRelation(0, 1, 1);\n\t\t}else if (tableName.equals(\"alerteRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"alerteRelationDAO\", AlerteRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new AlerteRelation(0, 1, 1, 15, new Date(), \"sujet\", \"type\", \"statut\", \"description\");\n\t\t}else if (tableName.equals(\"blacklistageSysteme\")) {\n\t\t\tdataDAO = ctx.getBean(\"blacklistageSystemeDAO\", BlacklistageSystemeDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new BlacklistageSysteme(0, 1);\n\t\t}else if (tableName.equals(\"blacklistageUtilisateurRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"blacklistageUtilisateurRelationDAO\", BlacklistageUtilisateurRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new BlacklistageUtilisateurRelation(0, 1, 1);\n\t\t}else if (tableName.equals(\"demandeModifRelation\")) {\n\t\t\tdataDAO = ctx.getBean(\"demandeModifRelationDAO\", DemandeModifRelationDAO.class);\n\t\t\t//insert\n\t\t\tnewData = new DemandeModifRelation(0, 1, 1, new Date(), \"type\", \"statut\", \"description\");\n\t\t}\n \n \n this.insert = dataDAO.insert(newData);\n //selecById\n BasicData t = dataDAO.selectById(this.insert);\n if (t!=null) {\n\t\t\tthis.selectById = t.toString();\n\t\t}else {\n\t\t\tthis.selectById = \"rien\";\n\t\t}\n //update\n this.update = dataDAO.update(t);\n t = dataDAO.selectById(this.insert);\n if (t!=null) {\n\t\t\tthis.resultatUpdate = t.toString();\n\t\t}else {\n\t\t\tthis.resultatUpdate = \"rien\";\n\t\t}\n //selectAll\n ArrayList<? extends BasicData> alTest = dataDAO.selectAll();\n this.selectAll = alTest.size();\n if (alTest.size()==0) {\n \tthis.ligne1 = \"rien\";\n\t\t}else {\n\t\t\tthis.ligne1 = alTest.get(0).toString();\n\t\t}\n //selectWhere\n String condition = \"id > 1\";\n this.condition = condition;\n ArrayList<? extends BasicData> alTest1 = dataDAO.selectWhere(condition);\n this.selectWhere = alTest1.size();\n if (alTest1.size()==0) {\n \tthis.ligne11 = \"rien\";\n\t\t}else {\n\t\t\tthis.ligne11 = alTest1.get(0).toString();\n\t\t}\n //deleteById\n this.deleteById = 99;\n //this.deleteById = dataDAO.deleteById(insert);\n }", "private void populateTables(ArrayList<MenuItem> food, ArrayList<MenuItem> bev) throws SQLException\r\n {\r\n populateTableMenuItems(food, bev);\r\n }", "@BeforeEach\n void setUp() {\n\n Database database = Database.getInstance();\n database.runSQL(\"cleanDb.sql\");\n\n\n genericDao = new GenericDao(UserRoles.class);\n }", "private void populateFromDatabase() throws Exception {\n ResultSet results = database.select(\"AnswerOptions\", \"*\", \"optionId = \" + this.optionId);\n while (results.next()) {\n this.questionId = results.getInt(\"questionId\");\n this.option = results.getString(\"option\");\n this.position = results.getInt(\"matchingPosition\");\n }\n database.closeConnection();\n }", "@Test\n\tpublic void populatedDB() throws URISyntaxException{\n\t\tString pass;\n\t\t LoginController controller = new LoginController();\n\t\t \n\t\tpass = controller.gimmeSalt(\"PASSWORD\");\n pass = controller.hashBrowns(pass);\n\t\tdb.insertUser(\"TESTER\", pass, \"EMAIL\",666);\n\t\t\n\t\tdb.insertBusiness(\"Test1\",\"Somewhere\",7);\n\t\tdb.insertBusiness(\"Test2\",\"Somewhere\",8);\n\t\tdb.insertBusiness(\"Test3\",\"Somewhere\",9);\n\t\tlong start=12418*1000*60;\n\t\tlong end=912518*1000*60;\n\t\tdb.insertEvent(\"t1\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",1231);\n\t\t start=124118*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t2\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",674754);\n\t\t start=412418*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t3\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",241254);\n\t\tdb.insertEvent(\"t4\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",5432);\n\t\t start=1924218*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t5\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",12);\n\t\t start=124318*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t6\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",1241);\n\t\t\n\t\tdb.insertRelation(\"TESTER\",\"Test1\");\n\t\tdb.insertRelation( \"TESTER\",\"Test2\" );\n\t\tdb.insertRelation(\"TESTER\",\"Test3\");\n\t}", "private void init(){\n if(solicitudEnviadaDAO == null){\n solicitudEnviadaDAO = new SolicitudEnviadaDAO(getApplicationContext());\n }\n if(solicitudRecibidaDAO == null){\n solicitudRecibidaDAO = new SolicitudRecibidaDAO(getApplicationContext());\n }\n if(solicitudContestadaDAO == null){\n solicitudContestadaDAO = new SolicitudContestadaDAO(getApplicationContext());\n }\n if(preguntaEnviadaDAO == null){\n preguntaEnviadaDAO = new PreguntaEnviadaDAO(getApplicationContext());\n }\n if(preguntaRecibidaDAO == null){\n preguntaRecibidaDAO = new PreguntaRecibidaDAO(getApplicationContext());\n }\n if(preguntaContestadaDAO == null){\n preguntaContestadaDAO = new PreguntaContestadaDAO(getApplicationContext());\n }\n if(puntuacionRecibidaDAO == null){\n puntuacionRecibidaDAO = new PuntuacionRecibidaDAO(getApplicationContext());\n }\n }", "public void insertDummies() {\r\n\t\tinsertPersoner();\r\n\t\tinsertAnsatte();\r\n\t\tinsertEmner();\r\n\t\tinsertForfattere();\r\n\t\tinsertBoger();\r\n\t\tinsertBogEksemplare();\r\n\t\tinsertReservation();\r\n\t\tinsertLecture();\r\n\t\tinsertPlannedLectures();\r\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t\tfor (int i = 1; i <= 20; i++) {\n\t\t\tUniversidade universidade = new Universidade();\n\t\t\tuniversidade.setNome(\"UFG - Unidade \" + i);\n\t\t\tuniversidadeDAO.save(universidade);\n\t\t}\n\t\tuniversidadeDAO.flush();\n\t}", "@Override\n public void onCreate(SQLiteDatabase db){\n db.execSQL(create_User_Table);\n db.execSQL(create_Budget_Table);\n\n\n\n\n }", "public Main()\n {\n createUsers();\n createFriendships();\n createMessages();\n\n }", "@Before\n public void setUp() throws Exception {\n Context targetContext = InstrumentationRegistry.getInstrumentation()\n .getTargetContext();\n\n db = DatabaseHelper.getInstance(targetContext);\n db.deleteAllCustomerTableRecords();\n db.deleteAllLanesCustomers();\n db.deleteAllLanesPlayers();\n ServicesUtils.resetCustomers();\n\n addCustomerTest(\"a\",\"b\",\"a\");\n addCustomerTest(\"a\",\"b\",\"b\");\n addCustomerTest(\"a\",\"b\",\"c\");\n }", "@Override\n public void seedData() throws EmployeeCreationException, DepartmentCreationException {\n\n }", "public static void prepopulateBookingData() {\n // Write to the database on a worker thread (so as not to clog up the main thread)\n databaseExecutor.execute(() -> {\n BookingDao dao = dbInstance.bookingDao();\n\n // Start with a fresh database each load\n dao.deleteAllBookings();\n\n Booking stretchBooking = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking);\n\n Booking tipiBooking = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking);\n\n Booking marqueeBooking = new Booking.BookingBuilder()\n .withType(\"Marquee\")\n .withFirstName(\"Daniel\")\n .withLastName(\"Rose\")\n .withAddress(\"26 Flyway Drive TY5YYH\")\n .withCost(500)\n .withDate(LocalDate.of(2022, 1, 22))\n .withNumDays(2)\n .build();\n dao.insertBooking(marqueeBooking);\n\n Booking marqueeBooking2 = new Booking.BookingBuilder()\n .withType(\"Marquee\")\n .withFirstName(\"Daniel\")\n .withLastName(\"Rose\")\n .withAddress(\"26 Flyway Drive TY5YYH\")\n .withCost(500)\n .withDate(LocalDate.of(2022, 1, 22))\n .withNumDays(2)\n .build();\n dao.insertBooking(marqueeBooking2);\n\n Booking tipiBooking2 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking2);\n\n Booking tipiBooking3 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking3);\n\n Booking tipiBooking4 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking4);\n\n Booking stretchBooking2 = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking2);\n\n Booking stretchBooking3 = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking3);\n\n });\n }", "@Before\n public void createAndFillTable() {\n try {\n DBhandler dBhandler = new DBhandler(h2DbConnection);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\t@Transactional\n\n\tpublic void initCinemas() {\n\t\tvilleRepository.findAll().forEach(v->{\n\t\t\tStream.of(\"Megarama\",\"Pathé\",\"UGC\",\"MK2\").forEach(c->{\n\t\t\t\tCinema cinema=new Cinema();\n\t\t\t\tcinema.setName(c);\n\t\t\t\tcinema.setNombreSalles(3+(int) (Math.random()*7));\n\t\t\t\tcinema.setVille(v);\n\t\t\t\t\n\t\t\t cinemaRepository.save(cinema);\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t});\n\t}", "@Test\r\n public void testloadExpenses_1() {\n fancyDatabase = new MyDatabase();\r\n expenseRepository = new ExpenseRepository(fancyDatabase);\r\n expenseRepository.loadExpenses();\r\n assertEquals(0,expenseRepository.getExpenses().size());\r\n }", "public void doEverything() throws isisicatclient.IcatException_Exception {\n DropEverything();\r\n //Create the super admin group - edit the search string.\r\n CreateFacilityAdmins(\"User[name='uows/13574']\");\r\n //Create the public tables and steps\r\n CreatePublicTables();\r\n CreatePublicSteps();\r\n \r\n //Create lower powered data ingestors - (does not add anyone to this group)\r\n CreateDataIngestors();\r\n \r\n //Create rules for instrument scientists\r\n CreateInstumentScientistRules();\r\n \r\n //Create rules for investigators on their own data\r\n CreateInvestigationUserRules();\r\n CreateCoInvestigatorRules();\r\n CreatePIDelegationRules();\r\n \r\n //Create public data rules\r\n CreatePublicUmembargoedDataRules();\r\n CreatePublicCalibrationRules();\r\n \r\n //Create rules to make DOI-ed data readable to DOI-readers (a special web account)\r\n CreateDOIRules();\r\n \r\n //Create special rules for public subsets of data\r\n CreateSimpleDataBaseRules(\"Disordered Materials Published Data\");\r\n \r\n \r\n System.out.println(\"Done\");\r\n\r\n }", "@PostConstruct\n\t@Transactional\n\tpublic void fillData() {\n\t\n\t\tBookCategory progromming1 = new BookCategory(1,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming2 = new BookCategory(2,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming3 = new BookCategory(3,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming4 = new BookCategory(4,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming5 = new BookCategory(5,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming6 = new BookCategory(6,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming7 = new BookCategory(7,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming8 = new BookCategory(8,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming9 = new BookCategory(9,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming10 = new BookCategory(10,\"Programming\",new ArrayList<Book>());\n\t\t\n\n\t\t\n\t\tbookCategoryRepository.save(progromming1);\n\t\tbookCategoryRepository.save(programming2);\n\t\tbookCategoryRepository.save(programming3);\n\t\tbookCategoryRepository.save(programming4);\n\t\tbookCategoryRepository.save(programming5);\n\t\tbookCategoryRepository.save(programming6);\n\t\tbookCategoryRepository.save(programming7);\n\t\tbookCategoryRepository.save(programming8);\n\t\tbookCategoryRepository.save(programming9);\n\t\tbookCategoryRepository.save(programming10);\n\t\t\n\t\tBook java = new Book(\n\t\t\t\t(long) 1,\"text-100\",\"Java Programming Language\",\n\t\t\t\t \"Master Core Java basics\",\n\t\t\t\t 754,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogromming1\n\t\t);\n\t\tBook kotlin = new Book(\n\t\t\t\t(long) 2,\"text-101\",\"Kotlin Programming Language\",\n\t\t\t\t \"Learn Kotlin Programming Language\",\n\t\t\t\t 829,\n\t\t\t\t \"assets/images/books/text-102.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming2\n\t\t);\n\t\tBook python = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Python 9\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 240,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming3\n\t\t);\n\t\tBook cShap = new Book(\n\t\t\t\t(long) 4,\"text-103\",\"C#\",\n\t\t\t\t \"Learn C# Programming Language\",\n\t\t\t\t 490,\n\t\t\t\t \"assets/images/books/text-101.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming4\n\t\t);\n\t\tBook cpp = new Book(\n\t\t\t\t(long) 5,\"text-104\",\"C++\",\n\t\t\t\t \"Learn C++ Language\",\n\t\t\t\t 830,\n\t\t\t\t \"assets/images/books/text-110.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming5\n\t\t);\n\t\tBook dataStru = new Book(\n\t\t\t\t(long) 6,\"text-105\",\"Data Structure 3\",\n\t\t\t\t \"Learn Data Structures\",\n\t\t\t\t 560,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming6\n\t\t);\n\t\tBook cprog = new Book(\n\t\t\t\t(long) 7,\"text-106\",\"C Programming\",\n\t\t\t\t \"Learn C Language\",\n\t\t\t\t 695,\n\t\t\t\t \"assets/images/books/text-100.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming7\n\t\t);\n\t\tBook crushInterview = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Coding Interview\",\n\t\t\t\t \"Crushing the Coding interview\",\n\t\t\t\t 600,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\t\tBook desing = new Book(\n\t\t\t\t(long) 859,\"text-102\",\"Design Parttens\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 690,\n\t\t\t\t \"assets/images/books/text-105.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming9\n\t\t);\n\t\tBook machineLearn = new Book(\n\t\t\t\t(long) 9,\"text-102\",\"Python 3\",\n\t\t\t\t \"Learn Python Machine Learning with Python\",\n\t\t\t\t 416,\n\t\t\t\t \"assets/images/books/text-107.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming10\n\t\t);\n\t\tBook apiJava = new Book(\n\t\t\t\t(long) 10,\"text-102\",\"Practical API Design\",\n\t\t\t\t \"Java Framework Architect\",\n\t\t\t\t 540,\n\t\t\t\t \"assets/images/books/text-108.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\tbookRepository.save(java);\n\tbookRepository.save(kotlin);\n\tbookRepository.save(python);\n\tbookRepository.save(cpp);\n\tbookRepository.save(cprog);\n\tbookRepository.save(crushInterview);\n\tbookRepository.save(cShap);\n\tbookRepository.save(dataStru);\n\tbookRepository.save(desing);\n\tbookRepository.save(machineLearn);\n\tbookRepository.save(apiJava);\n\n\t}", "@Override\r\n\tpublic void onCreate(SQLiteDatabase db) {\r\n\t\t// Log.i(\"DBHelper:\", \"OnCreate() \");\r\n\t\tdb.beginTransaction();\r\n\t\ttry {\r\n\t\t\tdb.execSQL(QUESTION_CREATE);\r\n\t\t\tdb.execSQL(TOPIC_CREATE);\r\n\t\t\tdb.execSQL(CHOICE_CREATE);\r\n\t\t\tdb.execSQL(EXAM_CREATE);\r\n\t\t\tdb.execSQL(QUESTIONEXAM_CREATE);\r\n\t\t\tdb.setTransactionSuccessful();\r\n\t\t} finally {\r\n\t\t\tdb.endTransaction();\r\n\t\t}\r\n\r\n\t\t// import du lieu cho Questions, Topics & Choices\r\n\t\tCommonDAL common = new CommonDAL(db);\r\n\t\tcommon.importDataFromResource();\r\n\t\t// Main.getCommonDAL().importDataFromResource();\r\n\r\n\t\t// String strURL = context.getString(R.string.url_questions);\r\n\t\t// common.importDataFromURL(context, strURL);\r\n\t}", "@Before\n\tpublic void setup()\n\t{\n\t\tEbean.execute(Ebean.createCallableSql(dropDdl));\n\t\tEbean.execute(Ebean.createCallableSql(createDdl));\n\n\t\tpr1 = new Province();\n\t\tpr1.provinceId = 1;\n\t\tpr1.abbreviation = \"P1\";\n\t\tpr1.save();\n\n\t\tc1 = new City();\n\t\tc1.cityId = 11;\n\t\tc1.cityParentId = 1;\n\t\tc1.cityName = \"Fake1\";\n\t\tc1.province = pr1;\n\t\tc1.save();\n\n\t\tpr2 = new Province();\n\t\tpr2.provinceId = 2;\n\t\tpr2.abbreviation = \"P2\";\n\t\tpr2.save();\n\n\t\tc2 = new City();\n\t\tc2.cityId = 22;\n\t\tc2.cityParentId = 2;\n\t\tc2.cityName = \"Fake2\";\n\t\tc2.province = pr2;\n\t\tc2.save();\n\n\t\tsetupDelegate();\n\n\t}", "@EventListener(ApplicationReadyEvent.class)\n\tpublic void loadData() {\n\t\tList<AppUser> allUsers = appUserRepository.findAll();\n\t\tList<Customer> allCustomers = customerRepository.findAll();\n\t\tList<Part> allPArts = partRepository.findAll();\n\n\t\tif (allUsers.size() == 0 && allCustomers.size() == 0 && allPArts.size() == 0) {\n\t\t\tSystem.out.println(\"Pre-populating the database with test data\");\n\n\t\t\tResourceDatabasePopulator resourceDatabasePopulator = new ResourceDatabasePopulator(\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t\"UTF-8\",\n\t\t\t\tnew ClassPathResource(\"data.sql\"));\n\t\t\tresourceDatabasePopulator.execute(dataSource);\n\t\t}\n\t\tSystem.out.println(\"Application successfully started!\");\n\t}", "@Override\r\n public void onCreate(SQLiteDatabase db)\r\n {\r\n db.execSQL(DB_ADMIN);\r\n db.execSQL(DB_QUEST_FIELD);\r\n db.execSQL(DB_QUEST_RADIO);\r\n db.execSQL(DB_QUEST_CHECK);\r\n db.execSQL(DB_EMOCA_TIME);\r\n db.execSQL(DB_EMOCA_SRC);\r\n db.execSQL(DB_EMOCA_REPLAY);\r\n db.execSQL(DB_EMOCA_MARKS);\r\n db.execSQL(DB_EMOCA_SCORE);\r\n }", "public FillResult callFillService(FillRequest request) throws DataAccessException {\n FillResult fillResult;\n Database database = new Database();\n Connection conn = null;\n boolean doCommit = false;\n\n try {\n conn = database.openConnection();\n UserDAO userDAO = new UserDAO(conn);\n User user = userDAO.find(request.getUsername());\n\n if (user == null) {\n throw new Exception(\"Error: cannot find user in the database\");\n }\n\n PersonDAO personDAO = new PersonDAO(conn);\n personDAO.clear(request.getUsername());\n\n EventDAO eventDAO = new EventDAO(conn);\n eventDAO.clear(request.getUsername());\n\n //create person for logged in user\n Person person = new Person(user.getPersonID(), user.getUsername(), user.getFirstName(), user.getLastName(), user.getGender(), null, null, null);\n createPerson(person, conn);\n people.add(person);\n\n int randomBirthYear = RandomDataUtils.getRandomNumber(1950, 2021);\n person.setBirthYear(randomBirthYear);\n person.setGeneration(0);\n\n createEvents(person, randomBirthYear,false, conn);\n\n //NEED TO CREATE GENERATIONS AND EVENTS HERE\n Person currPerson = null;\n for (int i = 1; i <= request.getGenerations(); i++) {\n for (int j = 0; j < people.size(); j++) {\n currPerson = people.get(j);\n if (currPerson.getGeneration() == i - 1) {\n Person mom = new Person(StringUtil.getRandomPersonID(conn), user.getUsername(),\n RandomDataUtils.getInstance().getRandomFemaleName(),\n RandomDataUtils.getInstance().getRandomSurname(),\n \"f\", null, null, null);\n mom.setBirthYear(RandomDataUtils.getRandomNumber(currPerson.getBirthYear() - 40, currPerson.getBirthYear() - 20));\n mom.setGeneration(i);\n\n Person dad = new Person(StringUtil.getRandomPersonID(conn), user.getUsername(),\n RandomDataUtils.getInstance().getRandomMaleName(),\n currPerson.getLastName(), \"m\", null, null, mom.getPersonID());\n dad.setBirthYear(RandomDataUtils.getRandomNumber(mom.getBirthYear() - 4, mom.getBirthYear() + 4));\n dad.setGeneration(i);\n mom.setSpouseID(dad.getPersonID());\n\n createPerson(mom, conn);\n people.add(mom);\n\n createPerson(dad, conn);\n people.add(dad);\n\n createEvents(mom, mom.getBirthYear(), true, conn);\n createEvents(dad, dad.getBirthYear(), true, conn);\n\n createMarriageEvent(mom, dad, conn);\n\n currPerson.setMotherID(mom.getPersonID());\n currPerson.setFatherID(dad.getPersonID());\n\n personDAO.update(currPerson);\n }\n }\n }\n\n doCommit = true;\n fillResult = new FillResult(\"Successfully added \" + people.size() + \" persons and \" + events.size() + \" events to the database.\", true);\n }\n catch (Exception e) {\n doCommit = false;\n fillResult = new FillResult(\"Error: Could not fill the database\", false);\n }\n finally {\n try {\n database.closeConnection(doCommit);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n return fillResult;\n }", "@Before\n public void fillSomeDataIntoOurDb() {\n entityManager.persist(user);\n }", "private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n dbHelper = new DBHelper(activity);\n inputValidation = new InputValidation(activity);\n progress = new ProgressDialog(activity);\n user=new User();\n }", "void setDataFromDBContent() {\n\n }", "private void populateExpenses() {\n\n List<ExpenseCategory> expenseCategories = expenseCategoryRepository.findAll();\n //todo this isn't null safe fix it\n Payee payee = payeeRepository.findByName(\"Tom\").get(0);\n\n for (int i = 0; i < 10; i++) {\n expenseRepository.save(new Expense(\n new Date(),\n expenseCategories.get(i),\n getRandomBigDecimal(),\n payee,\n \"this is a note about the expense\"\n ));\n\n }\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void initObjects() {\n listUsers = new ArrayList<>();\n usersRecyclerAdapter = new UsersRecyclerAdapter(listUsers,UsersListActivity.this);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerViewUsers.setLayoutManager(mLayoutManager);\n recyclerViewUsers.setItemAnimator(new DefaultItemAnimator());\n recyclerViewUsers.setHasFixedSize(true);\n recyclerViewUsers.setAdapter(usersRecyclerAdapter);\n\n databaseHelper = new HomeDatabaseHelper(activity);\n Intent extras = getIntent();\n emailFromIntent = extras.getStringExtra(\"EMAIL\");\n textViewRole = this.findViewById(R.id.textViewName);\n textViewRole.setText(emailFromIntent);\n getDataFromSQLite();\n }", "private static Callback prepopulateDatabase(){\n return new Callback() {\n @Override\n public void onCreate(@NonNull SupportSQLiteDatabase db) {\n super.onCreate(db);\n\n ContentValues contentValuesTartampion = new ContentValues();\n contentValuesTartampion.put(\"name\",\"Projet Tartampion\");\n contentValuesTartampion.put(\"color\",0xFFEADAD1);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesTartampion);\n\n ContentValues contentValuesLucidia = new ContentValues();\n contentValuesLucidia.put(\"name\",\"Projet Lucidia\");\n contentValuesLucidia.put(\"color\",0xFFB4CDBA);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesLucidia);\n\n ContentValues contentValuesCircus = new ContentValues();\n contentValuesCircus.put(\"name\",\"Projet Circus\");\n contentValuesCircus.put(\"color\",0xFFA3CED2);\n db.insert(\"Project\", OnConflictStrategy.IGNORE,contentValuesCircus);\n\n }\n };\n }", "public void generateDB() {\n\t\t// Database tables creation\n\t\tcreateTables();\n\n\t\t// Try catch estructure in case there is an exception during the data\n\t\t// insertion\n\t\ttry {\n\t\t\t// Create an admin user\n\t\t\tadminUser = new User(\"admin\", \"1234\", \"admin\", \"admin\", \"admin\", 1);\n\n\t\t\t// Create some default players\n\t\t\tString p1DateString = \"1988-05-12\";\n\t\t\tString p2DateString = \"1985-02-05\";\n\t\t\tString p3DateString = \"1987-06-24\";\n\t\t\tString p4DateString = \"1992-02-05\";\n\t\t\tDate p1Date = sdf.parse(p1DateString);\n\t\t\tDate p2Date = sdf.parse(p2DateString);\n\t\t\tDate p3Date = sdf.parse(p3DateString);\n\t\t\tDate p4Date = sdf.parse(p4DateString);\n\t\t\tp1 = new Player(\"Marcelo\", \"Vieira\", p1Date, 174);\n\t\t\tp2 = new Player(\"Cristiano\", \"Ronaldo\", p2Date, 185);\n\t\t\tp3 = new Player(\"Lionel\", \"Messi\", p3Date, 170);\n\t\t\tp4 = new Player(\"Neymar\", \"Silva\", p4Date, 175);\n\n\t\t\t// Create some default teams\n\t\t\tString t1DateString = \"1902-03-6\";\n\t\t\tString t2DateString = \"1985-02-05\";\n\t\t\tDate t1Date = sdf.parse(t1DateString);\n\t\t\tDate t2Date = sdf.parse(t2DateString);\n\t\t\tList<Player> t1Players = formatPlayers(getPlayersByTeamId(REAL_MADRID));\n\t\t\tList<Player> t2Players = formatPlayers(getPlayersByTeamId(BARCELONA));\n\t\t\tt1 = new Team(t1Players, \"Real Madrid C.F.\", \"Zinedine Zidane\", \"Madrid\", t1Date);\n\t\t\tt2 = new Team(t2Players, \"FC Barcelona\", \"Luis Enrique\", \"Barcelona\", t2Date);\n\n\t\t\t// Create some default stats\n\t\t\ts1 = new Stats(1, 1, 6, 15);\n\t\t\ts2 = new Stats(3, 1, 8, 18);\n\n\t\t\t// Create some default matches\n\t\t\tString m1DateString = \"2017-01-20\";\n\t\t\tString m2DateString = \"2017-03-06\";\n\t\t\tDate m1Date = sdf.parse(m1DateString);\n\t\t\tDate m2Date = sdf.parse(m2DateString);\n\t\t\tm1 = new Match(t2, t1, s1, m1Date, \"Alfonso Alvarez Izq\");\n\t\t\tm2 = new Match(t1, t2, s2, m2Date, \"Carlos Clos Gomez\");\n\n\t\t\t// Fill the database tables only if they are empty\n\t\t\tif (!usersFilled()) {\n\t\t\t\tinsertUser(adminUser);\n\t\t\t}\n\t\t\tif (!playersFilled()) {\n\t\t\t\tinsertPlayer(p1, REAL_MADRID);\n\t\t\t\tinsertPlayer(p2, REAL_MADRID);\n\t\t\t\tinsertPlayer(p3, BARCELONA);\n\t\t\t\tinsertPlayer(p4, BARCELONA);\n\t\t\t}\n\t\t\tif (!teamsFilled()) {\n\t\t\t\tinsertTeam(t1);\n\t\t\t\tinsertTeam(t2);\n\t\t\t}\n\t\t\tif (!matchesFilled() && !statsFilled()) {\n\t\t\t\tinsertStat(s1);\n\t\t\t\tinsertMatch(m1);\n\t\t\t\tinsertStat(s2);\n\t\t\t\tinsertMatch(m2);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void setupUsersInRoomDB() {\n Log.d(TAG, \"setupUsersInRoomDB: start to setup list of 200 user\");\n userList = new ArrayList<>();\n int j = 0;\n for (int i = 0; i < 200; i++) {\n switch (j) {\n case 0:\n Log.d(TAG, \"setupUsersInRoomDB: case 0 set the user with image one\");\n userList.add(new User(\"user\" + i, getImageOne()));\n j++;\n break;\n case 1:\n userList.add(new User(\"user\" + i, getImageTwo()));\n j++;\n break;\n case 2:\n userList.add(new User(\"user\" + i, getImageThree()));\n j = 0;\n break;\n }\n }\n\n db.userDao().insertListOfUser(userList);\n Log.d(TAG, \"setupUsersInRoomDB: insert list of users in room database\");\n Shared.sharedSave(MainActivity.this, \"usersdb\", USERS_EXIST);\n Toast.makeText(getApplicationContext(), \"finish set database\", Toast.LENGTH_LONG).show();\n }", "public void setUp() {\n deleteTheDatabase();\n }", "public void setUp() {\n deleteTheDatabase();\n }", "public static void main(String[] args) throws Exception {\n\t\tdbManager = new SQLiteManager();\n\t\tdbManager.connect();\n\t\tproductManager = dbManager.getProductManager();\n\t\tworkerManager = dbManager.getWorkerManager();\n\t\tcomponentManager = dbManager.getComponentManager();\n\t\tpharmacyManager = dbManager.getPharmacyManager();\n\t\tcontractWorkerManager = dbManager.getContractWorkerManager();\n\t\tcontractPharmacyManager = dbManager.getContractPharmacyManager();\n\t\tdbManager.createTables();\n\t\tuserManager = new JPAUserManager();\n\t\tuserManager.connect();\n\t\t// To initialize the bufferedReader\n\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.println(\"Welcome to our data base!\");\n\t\t// System.out.println(\"Do you want to create the tables?\");\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"What do you want to do?\");\n\t\t\tSystem.out.println(\"1. Create roles\");\n\t\t\tSystem.out.println(\"2. Create a new user\");\n\t\t\tSystem.out.println(\"3. Login\");\n\t\t\tSystem.out.println(\"0. Exit\");\n\t\t\tInteger choice = new Integer(0);\n\t\t\tboolean wrongtext = false;\n\t\t\tdo {\n\t\t\t\tSystem.out.println(\"Introduce the number of the option you would like to choose: \");\n\t\t\t\ttry {\n\t\t\t\t\tchoice = Integer.parseInt(reader.readLine());\n\t\t\t\t\twrongtext = false;\n\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\twrongtext = true;\n\t\t\t\t\tSystem.out.println(\"It's not a int, please enter a int.\");\n\t\t\t\t}\n\t\t\t} while (choice < 0 || choice > 3 || wrongtext);\n\t\t\tswitch (choice) {\n\t\t\tcase 1:\n\t\t\t\tnewRole();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tnewUser();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tlogin();\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\t\tdbManager.disconnect();\n\t\t\t\tuserManager.disconnect();\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}", "public void instalarBaseDatos()\r\n\t{\r\n\t\tString nombrebuscado = \"information_schema\";\r\n\t\tArrayList parametrosbd = parametrosConectorBaseDatos();\r\n\t\tif(parametrosbd != null)\r\n\t\t{\r\n\t\t\tif(parametrosbd.size()>0)\r\n\t\t\t{\r\n\t\t\t\tnombrebuscado =(String)parametrosbd.get(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString nombrebd = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector(\"information_schema\");\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tnombrebd = CrearBD.buscarBaseDatos(nombrebuscado, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(nombrebd == null)\r\n\t\t{\r\n\t\t\tint numerotablascreadas = 0;\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conectora = new Conector(\"information_schema\");\r\n\t\t\t\tconectora.iniciarConexionBaseDatos();\r\n\t\t\t\tCrearBD.crearBaseDatos(nombrebuscado, conectora);\r\n\t\t\t\tconectora.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 1; i < 20; i++) \r\n\t\t\t\t{\r\n\t\t\t\t\tString nombretabla = i+\".sql\";\r\n\t\t\t\t\tString contenidotabla = ejecutarCodigoSQLtablas(nombretabla);\r\n\t\t\t\t\tif(!contenidotabla.equalsIgnoreCase(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tConector conectorb = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorb.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(contenidotabla, conectorb);\r\n\t\t\t\t\t\tconectorb.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tnumerotablascreadas++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tConector conectorg = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorg.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(\"DROP DATABASE \"+nombrebuscado, conectorg);\r\n\t\t\t\t\t\tconectorg.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el archivo \"+nombretabla,\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numerotablascreadas == 19)\r\n\t\t\t\t{\r\n\t\t\t\t\tejecutarCodigoSQLdatos(nombrebuscado);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@PostConstruct\n\tpublic void init() {\n\t\t/*\n\t\t * Esta parte se usó para añadir alumnos, senseis y cursos de prueba cuando la\n\t\t * base de datos usaba create-drop, ahora que los datos son persitentes no es\n\t\t * necesario, dejo aqui esta parte del código por si os fueran de utilidad para\n\t\t * realizar algunas pruebas durante las correcciones.\n\t\t * \n\t\t * Alumno a = new Alumno(\"Jorge\", \"Garrido\", \"Rodríguez\", \"grod@gmail.com\",\n\t\t * \"20072517A\", \"651666999\", LocalDate.of(1997, 04, 02), \"Cádiz\", 11550,\n\t\t * \"Chipiona\", \"Avd/Almería 74\", \"\", \"Marrón-Negro\", LocalDate.now(), \"Si\",\n\t\t * \"Alergia estacional\"); Alumno b = new Alumno(\"Sara\", \"Clarke\", \"Swuch\",\n\t\t * \"clarkswuch@gmail.com\", \"00055521J\", \"000555444\", LocalDate.of(1999, 05, 19),\n\t\t * \"Cádiz\", 12550, \"Jerez\", \"Calle fino\", \"\", \"Azul\", LocalDate.now(), \"Si\",\n\t\t * \"\"); Alumno c = new Alumno(\"Antonio\", \"Peinado\", \"Rodríguez\",\n\t\t * \"navalrod@gmail.com\", \"01247857H\", \"651666999\", LocalDate.of(1998, 05, 19),\n\t\t * \"Cádiz\", 11550, \"Chipiona\", \"calle girasol,20\", \"\", \"Blanco\",\n\t\t * LocalDate.now(), \"No\", \"Asma\"); Alumno d = new Alumno(\"Marina\", \"Figueroa\",\n\t\t * \"Flores\", \"navalrod@gmail.com\", \"57489624G\", \"651666999\", LocalDate.of(1994,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"AVD/Rosaleda sn\", \"\", \"Marrón\",\n\t\t * LocalDate.now(), \"No\", \"\"); Alumno e = new Alumno(\"Daniel\", \"Villanueva\",\n\t\t * \"Garcia\", \"navalrod@gmail.com\", \"3333333E\", \"651666999\", LocalDate.of(1988,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"Avd/Miguel Cervantes, 52\", \"\", \"Negro\",\n\t\t * LocalDate.now(), \"Si\", \"\"); Alumno f = new Alumno(\"Lorena\", \"Cespedes\",\n\t\t * \"Roman\", \"navalrod@gmail.com\", \"2222222D\", \"651666999\", LocalDate.of(1989,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"Avd/Andalucía,15\", \"\", \"Amarillo\",\n\t\t * LocalDate.now(), \"Si\", \"\"); Alumno g = new Alumno(\"Sergio\", \"Arques\",\n\t\t * \"Tubio\", \"navalrod@gmail.com\", \"1111111C\", \"651666999\", LocalDate.of(1996,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"calle/ Castaño, 10\", \"\", \"Verde\",\n\t\t * LocalDate.now(), \"No\", \"\"); Alumno h = new Alumno(\"Elon\", \"Musk\", \"Ramirez\",\n\t\t * \"navalrod@gmail.com\", \"0000000B\", \"651666999\", LocalDate.of(2004, 05, 19),\n\t\t * \"Cádiz\", 11550, \"Chipiona\", \"Avd/Neptuno, 7\", \"\", \"Blanco-Amarillo\",\n\t\t * LocalDate.now(), \"No\", \"\");\n\t\t * \n\t\t * alumnoServicio.save(a); alumnoServicio.save(b); alumnoServicio.save(c);\n\t\t * alumnoServicio.save(d); alumnoServicio.save(e); alumnoServicio.save(f);\n\t\t * alumnoServicio.save(g); alumnoServicio.save(h);\n\t\t * \n\t\t * Curso nuevoA = new Curso(2021, \"Juveniles\", 25.00); Curso nuevoB = new\n\t\t * Curso(2021, \"Alevines\", 25.00); Curso nuevoC = new Curso(2021, \"Adultos\",\n\t\t * 30.00);\n\t\t * \n\t\t * cursoServicio.save(nuevoA); cursoServicio.save(nuevoB);\n\t\t * cursoServicio.save(nuevoC);\n\t\t * \n\t\t * Sensei sa = new Sensei(\"Jose María\", null, null, null, null, null, null,\n\t\t * null, 0, null, null, null, \"Negro 1 DAN\", 1150.00); Sensei sb = new\n\t\t * Sensei(\"Ramón\", null, null, null, null, null, null, null, 0, null, null,\n\t\t * null, \"Negro 5 DAN\", 1150.00); Sensei sc = new Sensei(\"Abraham\", null, null,\n\t\t * null, null, null, null, null, 0, null, null, null, \"Negro 3 DAN\", 1150.00);\n\t\t * \n\t\t * senseiServicio.save(sa); senseiServicio.save(sb); senseiServicio.save(sc);\n\t\t * \n\t\t * sa.addCurso(nuevoA); cursoServicio.edit(nuevoA);\n\t\t * \n\t\t * sb.addCurso(nuevoB); cursoServicio.edit(nuevoB);\n\t\t * \n\t\t * sc.addCurso(nuevoC); cursoServicio.edit(nuevoC);\n\t\t * \n\t\t * nuevoC.addAlumno(a); alumnoServicio.edit(a);\n\t\t * \n\t\t * nuevoA.addAlumno(b); alumnoServicio.edit(b);\n\t\t * \n\t\t * nuevoB.addAlumno(c); alumnoServicio.edit(c);\n\t\t * \n\t\t * nuevoC.addAlumno(d); alumnoServicio.edit(d);\n\t\t * \n\t\t * nuevoC.addAlumno(e); alumnoServicio.edit(e);\n\t\t * \n\t\t * nuevoA.addAlumno(f); alumnoServicio.edit(f); nuevoA.addAlumno(g);\n\t\t * alumnoServicio.edit(g);\n\t\t * \n\t\t * nuevoA.addAlumno(h); alumnoServicio.edit(h);\n\t\t */\n\t}", "public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }", "public void populate() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tLOGGER.info(\"Entering into populate method\");\n\t\t\tsetZoneIdpk(null);\n\t\t\tsetZoneDescPk(null);\n\t\t\tsetZoneDescLocalPk(null);\n\t\t\tsetZoneDescription(null);\n\t\t\tsetZoneDescriptionLocal(null);\n\t\t\tzones = zoneMasterService.getZoneList(getZoneCode());\n\t\t\tif (zones.size() > 0) {\n\t\t\t\tif (zones.get(0).getIsactive().equalsIgnoreCase(Constants.Yes)) {\n\t\t\t\t\tsetDynamicLabelForActivateDeactivate(Constants.DEACTIVATE);\n\t\t\t\t\tsetRenderEditButton(true);\n\n\t\t\t\t} else if (zones.get(0).getIsactive().equalsIgnoreCase(Constants.D)) {\n\t\t\t\t\tsetDynamicLabelForActivateDeactivate(Constants.ACTIVATE);\n\t\t\t\t\tsetRenderEditButton(true);\n\n\t\t\t\t} else if (zones.get(0).getIsactive().equalsIgnoreCase(Constants.U)) {\n\t\t\t\t\tsetDynamicLabelForActivateDeactivate(Constants.DELETE);\n\t\t\t\t\tsetRenderEditButton(true);\n\n\t\t\t\t}\n\t\t\t\tsetCreatedBy(zones.get(0).getCreatedBy());\n\t\t\t\tsetCreatedDate(zones.get(0).getCreatedDate());\n\t\t\t\tsetZoneIdpk(zones.get(0).getZoneId());\n\t\t\t\tsetIsActive(zones.get(0).getIsactive());\n\t\t\t\tzoneDescriptionList = zoneMasterService.getZoneDescriptionList(zones.get(0).getZoneId());\n\t\t\t\tfor (ZoneMasterDesc zoneMasterDesc : zoneDescriptionList) {\n\t\t\t\t\tif (zoneMasterDesc.getLanguageType().getLanguageId().toString().equals(Constants.ENGLISH_LANGUAGE_ID)) {\n\t\t\t\t\t\tsetZoneDescPk(zoneMasterDesc.getZoneDescId());\n\t\t\t\t\t\tsetZoneDescription(zoneMasterDesc.getZoneDescription());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetZoneDescLocalPk(zoneMasterDesc.getZoneDescId());\n\t\t\t\t\t\tsetZoneDescriptionLocal(zoneMasterDesc.getZoneDescription());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tLOGGER.info(\"Exit into populate method\");\n\t\t\t\n\t\t} catch(NullPointerException ne){\n\t\tLOGGER.info(\"ne.getMessage():::::::::::::::::::::::::::::::\"+ne.getMessage());\n\t\t setErrorMessage(\"Method Name::populate\"); \n\t\t RequestContext.getCurrentInstance().execute(\"nullPointerId.show();\");\n\t\t return; \n}catch(Exception exception){\n LOGGER.info(\"exception.getMessage():::::::::::::::::::::::::::::::\"+exception.getMessage());\n setErrorMessage(exception.getMessage()); \n RequestContext.getCurrentInstance().execute(\"error.show();\");\n return; \n}\n\t\t\n\t}", "private void fillRoleTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n PreparedStatement ps = connection.prepareStatement(INIT.FILL_ROLES.toString())) {\n ResultSet rs = statement.executeQuery(INIT.GET_ALL_ROLES.toString());\n if(!rs.next()) {\n connection.setAutoCommit(false);\n ps.setString(1, \"user\");\n ps.setString(2, \"No permissions\");\n ps.addBatch();\n ps.setString(1, \"moderator\");\n ps.setString(2, \"Some permissions\");\n ps.addBatch();\n ps.setString(1, \"admin\");\n ps.setString(2, \"All permissions\");\n ps.addBatch();\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "@Before\n\tpublic void setup() {\n\t\tdatabase = new DatabaseLogic();\n\t}", "@Before\n public void setUp() {\n //clearDbData();//having some trouble\n }", "@Override\n\tpublic void initDemoDB() {\n\t}", "private void insertAllRecords(SQLiteDatabase db) {\n ContentValues cv = new ContentValues();\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_ANIMAL_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"GOAT\");\n db.insert(TABLE_ANIMAL_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"SHEEP\");\n db.insert(TABLE_ANIMAL_TYPE, null, cv);\n cv.clear();\n\n //M2 : Aquisation Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_AQUISATION, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"BY PURCHASE\");\n db.insert(TABLE_AQUISATION, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"BY BIRTH\");\n db.insert(TABLE_AQUISATION, null, cv);\n cv.clear();\n\n //M3 : Breed Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n cv.put(KEY_ANIMAL_TYPE, 0);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n // TYPE 1\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"OSMANABADI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"SIROHI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"JAMNAPARI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"BEETAL\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 5);\n cv.put(KEY_FIELD, \"MARWARI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 6);\n cv.put(KEY_FIELD, \"BARBARI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 7);\n cv.put(KEY_FIELD, \"BOER\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 8);\n cv.put(KEY_FIELD, \"MADGYAL\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 9);\n cv.put(KEY_FIELD, \"TALICHERI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n // TYPE 2\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"GADDI\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"MERINO\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"DORSET\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"BARBARI\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n\n //M4 : Purpose Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"FOR BREEDING\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"FOR SALE\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"FOR EID\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n\n //M5 : Release Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"BY SALE\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"BY DEATH\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"BY CULLING\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n\n //M6 : Months Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"1\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"2\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"3\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"6\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 5);\n cv.put(KEY_FIELD, \"9\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 6);\n cv.put(KEY_FIELD, \"12\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n\n //M7 : Vaccine Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_VACCINE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"PPR\");\n db.insert(TABLE_VACCINE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"ETV\");\n db.insert(TABLE_VACCINE, null, cv);\n cv.clear();\n\n //M9 : Expense Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"SHED\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"ELECTRICITY\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"LABOUR\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"TELEPHONE\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 5);\n cv.put(KEY_FIELD, \"ANIMAL PURCHASE\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 6);\n cv.put(KEY_FIELD, \"WATER\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n\n //M10 : Income Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"ANIMAL SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"MILK SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"FODDER SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"MANURE SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n\n //M11 : Action Feed Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_ACTION_FEED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"ADD STOCK\");\n db.insert(TABLE_ACTION_FEED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"FEED ANIMALS\");\n db.insert(TABLE_ACTION_FEED, null, cv);\n cv.clear();\n\n //M12 : Action Feed Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"DRY\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"GREEN\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"CONCENTRATED MIXTURE\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n\n //M13 : Action Milk Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_ACTION_MILK, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"PRODUCTION\");\n db.insert(TABLE_ACTION_MILK, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"SALES\");\n db.insert(TABLE_ACTION_MILK, null, cv);\n cv.clear();\n }", "public void initialize()\r\n\t{\r\n\t\tdatabaseHandler = DatabaseHandler.getInstance();\r\n\t\tfillPatientsTable();\r\n\t}", "@Override\n public void run() {\n addDelay();\n\n AppDatabase appDatabase = AppDatabase.getInstance(appContext, executors);\n\n List<WeatherEntry> weathers = DataGenerator.generateWeathers();\n\n Log.d(TAG, \"Codelab AppDatabase insertAll - begin\");\n\n insertAll(appDatabase, weathers);\n\n // notify that the database was created and it's ready to be used\n appDatabase.setDatabaseCreated();\n }", "@PostConstruct\n public void init() {\n entradas = entradaFacadeLocal.findAll();\n salidas = salidaFacadeLocal.findAll();\n inventarios = inventarioFacadeLocal.leerTodos();\n }", "public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }", "private void initData() throws Exception {\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n createOrganizationRoles(dm);\n createPaymentTypes(dm);\n createUserRoles(dm);\n supplier = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroupSup = new UserGroup();\n defaultGroupSup.setOrganization(supplier);\n defaultGroupSup.setIsDefault(true);\n defaultGroupSup.setName(\"default\");\n dm.persist(defaultGroupSup);\n technologyProvider = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER);\n UserGroup defaultGroupTP = new UserGroup();\n defaultGroupTP.setOrganization(technologyProvider);\n defaultGroupTP.setIsDefault(true);\n defaultGroupTP.setName(\"default\");\n dm.persist(defaultGroupTP);\n tpAndSup = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER,\n OrganizationRoleType.SUPPLIER);\n supplierAdminUser = Organizations.createUserForOrg(dm, supplier,\n true, \"admin\");\n supplier2 = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroup = new UserGroup();\n defaultGroup.setOrganization(supplier2);\n defaultGroup.setIsDefault(true);\n defaultGroup.setName(\"default\");\n dm.persist(defaultGroup);\n UserGroup defaultGroupTpAndSp = new UserGroup();\n defaultGroupTpAndSp.setOrganization(tpAndSup);\n defaultGroupTpAndSp.setIsDefault(true);\n defaultGroupTpAndSp.setName(\"default\");\n dm.persist(defaultGroupTpAndSp);\n Organizations.createUserForOrg(dm, supplier2, true, \"admin\");\n customer = Organizations.createCustomer(dm, supplier);\n UserGroup defaultGroup1 = new UserGroup();\n defaultGroup1.setOrganization(customer);\n defaultGroup1.setIsDefault(true);\n defaultGroup1.setName(\"default\");\n dm.persist(defaultGroup1);\n customer2 = Organizations.createCustomer(dm, supplier2);\n customerUser = Organizations.createUserForOrg(dm, customer,\n true, \"admin\");\n OrganizationReference onBehalf = new OrganizationReference(\n supplier, customer,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, supplier2,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier,\n technologyProvider,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, tpAndSup,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n return null;\n }\n });\n }", "public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu dragos@yahoo.com 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea ademirea@gmail.com 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean radusoro@gmail.com 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu andreibraso@gmail.com 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu radu@gmail.com 022256926 orange 10/08/2010\");\n }", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(getActivity());\n }", "public boolean initializeDatabase() {\n try {\n initializeCategory();\n initializeExpense();\n initializeIncome();\n initializeBalance();\n initializeUser();\n } catch (Throwable t) {\n\n System.out.println(t.getMessage());\n return false;\n }\n return true;\n }", "public MyApp()\n { \n \ttry{\n \t\tURI uri = URI.create(path.Path());\n\t \tDatabase sqliteDB = DatabaseFactory.create(uri);\n\t \t\n\t\t \tStatement cu = sqliteDB.createStatement(statement.CreateUser());\t\t\t\t\n\t\t \tcu.prepare();\n\t\t \tcu.execute();\n\t\t \tcu.close();\n\t\t\t\t\n\t\t\t\tStatement cp = sqliteDB.createStatement(statement.CategoriaProducto());\t\t\t\t\n\t\t\t\tcp.prepare();\n\t\t\t\tcp.execute();\n\t\t\t\tcp.close();\n\t\t\t\t\n\t\t\t\tStatement cpt = sqliteDB.createStatement(statement.TemporadaCategoriaProducto());\t\t\t\t\n\t\t\t\tcpt.prepare();\n\t\t\t\tcpt.execute();\n\t\t\t\tcpt.close();\n\t\t\t\t\n\t\t\t\tStatement p = sqliteDB.createStatement(statement.Producto());\t\t\t\t\n\t\t\t\tp.prepare();\n\t\t\t\tp.execute();\n\t\t\t\tp.close();\n\t\t\t\t\n\t\t\t\tStatement pt = sqliteDB.createStatement(statement.TemporadaProducto());\t\t\t\t\n\t\t\t\tpt.prepare();\n\t\t\t\tpt.execute();\n\t\t\t\tpt.close();\n\t\t\t\t\n\t\t\t\tStatement cm = sqliteDB.createStatement(statement.Municipio());\t\t\t\t\n\t\t\t\tcm.prepare();\n\t\t\t\tcm.execute();\n\t\t\t\tcm.close();\n\t\t\t\t\n\t\t\t\tStatement cmt = sqliteDB.createStatement(statement.TemporadaMunicipio());\t\t\t\t\n\t\t\t\tcmt.prepare();\n\t\t\t\tcmt.execute();\n\t\t\t\tcmt.close();\n\t\t\t\t\n\t\t\t\tStatement ce = sqliteDB.createStatement(statement.Establecimiento());\t\t\t\t\n\t\t\t\tce.prepare();\n\t\t\t\tce.execute();\n\t\t\t\tce.close();\n\t\t\t\t\n\t\t\t\tStatement cet = sqliteDB.createStatement(statement.TemporadaEstablecimiento());\t\t\t\t\n\t\t\t\tcet.prepare();\n\t\t\t\tcet.execute();\n\t\t\t\tcet.close();\n\t\t\t\t\n\t\t\t\tStatement cpr = sqliteDB.createStatement(statement.Presentacion());\t\t\t\t\n\t\t\t\tcpr.prepare();\n\t\t\t\tcpr.execute();\n\t\t\t\tcpr.close();\n\t\t\t\t\n\t\t\t\tStatement cprt = sqliteDB.createStatement(statement.TemporadaPresentacion());\t\t\t\t\n\t\t\t\tcprt.prepare();\n\t\t\t\tcprt.execute();\n\t\t\t\tcprt.close();\n\t\t\t\t\n\t\t\t\tStatement cpf = sqliteDB.createStatement(statement.ProductoFiltrado());\t\t\t\t\n\t\t\t\tcpf.prepare();\n\t\t\t\tcpf.execute();\n\t\t\t\tcpf.close();\n\t\t\t\t\n\t\t\t\tStatement cpft = sqliteDB.createStatement(statement.TemporadaProductoFiltrado());\t\t\t\t\n\t\t\t\tcpft.prepare();\n\t\t\t\tcpft.execute();\n\t\t\t\tcpft.close();\n\t\t\t\t\n\t\t\t\tStatement cb = sqliteDB.createStatement(statement.Busqueda());\t\t\t\t\n\t\t\t\tcb.prepare();\n\t\t\t\tcb.execute();\n\t\t\t\tcb.close();\n\t\t\t\t\n\t\t\t\tStatement cbt = sqliteDB.createStatement(statement.TemporadaBusqueda());\t\t\t\t\n\t\t\t\tcbt.prepare();\n\t\t\t\tcbt.execute();\n\t\t\t\tcbt.close();\n\t\t\t\t\n\t\t\t\tStatement cf = sqliteDB.createStatement(statement.Favorito());\t\t\t\t\n\t\t\t\tcf.prepare();\n\t\t\t\tcf.execute();\n\t\t\t\tcf.close();\n\t\t\t\t\n\t\t\t\tStatement cftu = sqliteDB.createStatement(statement.TemporalUser());\t\t\t\t\n\t\t\t\tcftu.prepare();\n\t\t\t\tcftu.execute();\n\t\t\t\tcftu.close();\n\t\t\t\t\n\t\t\t\tStatement clc = sqliteDB.createStatement(statement.ListaCompras());\t\t\t\t\n\t\t\t\tclc.prepare();\n\t\t\t\tclc.execute();\n\t\t\t\tclc.close();\n\t\t\t\t\n\t\t\t\tStatement crc = sqliteDB.createStatement(statement.RutaCompras());\t\t\t\t\n\t\t\t\tcrc.prepare();\n\t\t\t\tcrc.execute();\n\t\t\t\tcrc.close();\n\t\t\t\t\n\t\t\t\tStatement cpc = sqliteDB.createStatement(statement.ProductoCompras());\t\t\t\t\n\t\t\t\tcpc.prepare();\n\t\t\t\tcpc.execute();\n\t\t\t\tcpc.close();\n\t\t\t\t\n\t\t\tsqliteDB.close();\n\t \t\n \t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}finally{\n \t//Llamar SplashScreen\n \tsplashScreen = new SplashScreen();\n \t\n \t\n \t\n // Push a screen onto the UI stack for rendering.\n //pushScreen(new MyScreen());\n \tpushScreen(splashScreen);\n\t\t}\n }", "DataBase createDataBase();", "public static void populate() throws IOException, Exception {\n\n EntityManager em = emf.createEntityManager();\n facade.fillingUpDBWithEquipments(facade.getEquipmentDTOsFromAPI(jsonReader));\n Player player1 = new Player(\"Nikolaj\", \"Hamster16\");\n Player DM = new Player(\"Cathrine\", \"Portraet11\");\n Player player2 = new Player(\"Jens\", \"Skeletor69\");\n AbillityScores abiSco11 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco12 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco13 = new AbillityScores(18, 8, 14, 12, 14, 10);\n Random randi = new Random(0);\n Skills skils1 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils2 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils3 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Character ch1 = new Character(5, 150, 85, 10, 30, \"Damascus\", \"He was a valiant paladin.\", \"orc\", \"paladin\", abiSco11, skils1);\n Character ch2 = new Character(5, 104, 85, 17, 60, \"Heidi\", \"He was a valiant druid.\", \"human\", \"druid\", abiSco12, skils2);\n Character ch3 = new Character(5, 160, 85, 17, 30, \"Varanoth\", \"He was a valiant fighter.\", \"orc\", \"fighter\", abiSco13, skils3);\n Equipment e1 = em.find(Equipment.class, \"club\");\n Equipment e2 = em.find(Equipment.class, \"candle\");\n Equipment e3 = em.find(Equipment.class, \"camel\");\n Equipment e4 = em.find(Equipment.class, \"bucket\");\n ch1.addInventory(new Inventory(e1, 1));\n ch2.addInventory(new Inventory(e2, 1));\n ch2.addInventory(new Inventory(e3, 1));\n ch3.addInventory(new Inventory(e4, 1));\n e1.addInventory(ch1.getInventories().get(0));\n e2.addInventory(ch2.getInventories().get(0));\n e3.addInventory(ch2.getInventories().get(1));\n e4.addInventory(ch3.getInventories().get(0));\n //ch1.getInventory().addEquipmentAndQty(equipment, 1);\n try {\n em.getTransaction().begin();\n Role playerRole = new Role(\"player\");\n Role DMRole = new Role(\"dungeonmaster\");\n player1.addRole(playerRole);\n DM.addRole(DMRole);\n player2.addRole(playerRole);\n //both.addRole(DMRole); // MAN KAN GODT HAVE BEGGE ROLLER CATHRINE !!!\n em.persist(playerRole);\n em.persist(DMRole);\n //em.persist(equipment);\n player1.addCharacter(ch1);\n player1.addCharacter(ch2);\n player2.addCharacter(ch3);\n //em.persist(ch1);\n em.persist(player1);\n em.persist(DM);\n em.persist(player2);\n em.getTransaction().commit();\n System.out.println(\"\");\n } finally {\n em.close();\n }\n }", "public static void main(String[] args) {\n try (Connection connection = ConnectorDB.getConnection();\n Statement statement = connection.createStatement()) {\n dropTablesFromDatabase(statement);\n createTablesInDatabase(statement);\n addObjectsInList();\n insertListsInDataBase();\n } catch (SQLException e) {\n System.out.println(\"Error connection/sql query\" + e);\n e.printStackTrace();\n }\n }", "public void onCreateDummy(SQLiteDatabase db) {\r\n\t\ttry\t{ \r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\tdb.execSQL(\"insert into [department] values(106, '', 'Med-Rheuma', 'Medicine-Rheumatology'), \" +\r\n\t\t\t\t\t\" (107, '', 'Med-Neuro', 'Medicine-Neurology'), \" +\r\n\t\t\t\t\t\" (131, '', 'Opthal', 'Opthalmology'), \" +\r\n\t\t\t\t\t\" (133, '', 'FaMed', 'Family Medicine'), \" +\r\n\t\t\t\t\t\" (136, '', 'ENT-HNS', 'ENT-HNS'), \" +\r\n\t\t\t\t\t\" (153, '', 'Anesthesia', 'Anesthesia')\");\r\n\t\t\t*/\r\n\t\t\tdb.execSQL(\"insert into [patient] values(1, 'Cosare', 'Alvin', 'Ceniza', 'M', '1994-08-27', 'Cool Street', 'Davao', 'Davao', '8000', 0, null), \" +\r\n\t\t\t\t\t\"(2, 'Adante', 'Jessie', 'Boi', 'M', '1992-12-13', 'That Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(3, 'Ipong', 'Jose Martin', 'dela Rosa', 'M', '1994-08-29', 'The Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(4, 'Adande', 'Jek', 'Portree', 'M', '1990-05-17', 'Wew Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(5, 'Ryan', 'Caleb', 'Kaka', 'M', '1987-09-12', 'Super Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(6, 'Izmailova', 'Sabine', 'Vaike', 'F', '1983-05-21', 'Dark Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(7, 'Alekseyeva', 'Chariton', 'Sirguvere', 'M', '1992-06-21', 'That Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(8, 'Vinogradov', 'Jaroslav', 'Tammemae', 'M', '1981-02-12', 'That Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(9, 'Nevzorova', 'Valeriya', 'Purila', 'F', '1984-12-16', 'That Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(10, 'Kikoku', 'Koku', 'Shimasaki', 'F', '1983-11-02', 'That Street', 'Davao', 'Davao', '8000', null, null), \" +\r\n\t\t\t\t\t\"(11, 'Ricci', 'Massimo', 'Piazza', 'M', '1986-12-04', 'Corsagna', 'Bologna', 'Bologna', '8000', null, null), \" +\r\n\t\t\t\t\t\"(12, 'Bordeaux', 'Rabican', 'Bellefeuille', 'M', '1991-10-13', 'Boulevard de Prague', 'Nimes', 'Nimes', '25223', null, null), \" +\r\n\t\t\t\t\t\"(1000000, 'Montelibano', 'Julie', 'Himo', 'f', '2007-07-07', 'Commonal', 'Davao City', 'Davao del Sur', '8000', null, null), \" +\r\n\t\t\t\t\t\"(1000001, 'Diamona', 'Francis', 'Garong', 'm', '2003-04-30', 'Tuban', 'Davao City', 'Davao del Sur', '8000', null, null), \" +\r\n\t\t\t\t\t\"(1086278, 'Sarael', 'Val', 'Teofilo', 'm', '1974-10-08', '#250 BLK III SIR', 'Davao City', 'Davao del Sur', '8000', null, null), \" +\r\n\t\t\t\t\t\"(1158851, 'Satinitigan', 'Val', 'Repalda', 'f', '2004-02-14', 'KM. 13, ZONE II', 'Davao City', 'Davao del Sur', '8000', null, null), \" +\r\n\t\t\t\t\t\"(1234567, 'Sayman', 'Val Anthony', 'Garong', 'm', '2006-07-19', 'Kabacan Ecoland', 'Davao City', 'Davao del Sur', '8000', null, null)\");\r\n\t\t /*db.execSQL(\"INSERT INTO 'doctor' ('personnel_id','license_no','dept_id','name_last','name_first','name_middle') \" +\r\n\t\t\t\t\" VALUES (100022,'1234560',133,'Aquino','Aljun','Galaura'), \" +\r\n\t\t\t\t\"\t(100027,'1234567',133,'Gaurino','Marc','Gonzales'), \" +\r\n\t\t\t\t\"\t(100040,'1234568',133,'Caralos','Rex Arnold','Mesiona'), \" +\r\n\t\t\t\t\t\"\t(100054,'1234569',131,'Chin','Elizabeth May','Tan') \" );*/\r\n\t\t\t/*\r\n\t\t\t * db.execSQL(\"INSERT INTO doctor values(100055, '0117236', 133, 'ESPA￑OLA', 'SEURINANE SEAN', 'BORRA', '97ffcb8e6d1014d2752cadd03b1ac6ca8b4a63d0', '28b0f836cc41361b90ce15a7a28ac8b3a9363f5b', 'm', '1981-05-12', '121.97.45.242')\");\r\n\t\t\t */\r\n\t\t\tdb.execSQL(\"insert into [encounter] (encounter_id, pid, type_patient,message_complaint, date_encountered,official_receipt_nr,is_confidential)\" + \r\n\t\t\t\t\t\t\" values(1, 1, 'In-Patient', 'Fever', '2012-07-01 00:00:00.000',null,null),\" +\r\n\t\t\t\t\t\t\"(2, 2, 'In-Patient', 'Headache', '2013-06-02 00:08:00.000',null,null),\" +\r\n\t\t\t\t\t\t\"(3, 1, 'In-Patient', 'Stomach ache', '2014-01-03 00:00:00.000',null,null),\" +\r\n\t\t\t\t\t\t\"(4, 1, 'In-Patient', 'Flu', '2014-05-12 00:00:00.000',null,null),\" +\r\n\t\t\t\t\t\t\"(5, 1, 'In-Patient', 'Kalibanga', '2014-05-11 00:00:00.000',null,null),\" +\r\n\t\t\t\t\t\t\"(2008000000, 1000000, 'Inpatient from ER',null, '2009-02-09 11:47:00.000',null,null),\" +\r\n\t\t\t\t\t\t\"(2008000001, 1000000, 'OPD',null, '2008-11-24 16:05:43.000',null,null),\" +\r\n\t\t\t\t\t\t\"(2008000002, 1000000, 'OPD',null, '2008-12-24 08:07:43.000',null,null)\");\r\n\t\t\tdb.execSQL(\"insert into doctor_encounter (personnel_id,encounter_id) values ('0117236',2),('0117236',2),('0117236',3)\");\r\n\t\t\tdb.execSQL(\"insert into [client] values(1, '06778975-75e3-4da2-9e1e-866b222e0fa6')\");\r\n\t\t\t/*db.execSQL(\"INSERT INTO 'reason' ('reason_id','name_reason') \" +\r\n\t\t\t\t\" VALUES (1,'Surgery'), \" + \r\n\t\t\t\t\" (2,'Dialysis'), \" +\r\n\t\t\t\t\"\t(3,'ER')\"); \r\n\t\t\tdb.execSQL(\"INSERT INTO lab_request ('request_id',encounter_id,personnel_id,date_requested) VALUES (1,1,100055,'2011-01-01 00:00:00'),(2,1,100055,'2011-02-01 00:00:00')\");\r\n\t\t\tdb.execSQL(\"INSERT INTO lab_result ('result_id','request_id','date_received','name_test','message_hl7','name_patho') \" + \r\n\t\t\t\t\t\"VALUES(1,1,'2011-01-01 00:00:00','asd','asd','asd'), \" + \r\n\t\t\t\t\t\"(2,1,'2011-01-01 00:00:00','asd','asd','asd')\");\r\n\t\t\tdb.execSQL(\"INSERT INTO 'referral' ('referral_id','encounter_id','dept_id','reason_id','date_referred') \" + \r\n\t\t\t\t\" VALUES (1,1,107,1,'2013-06-02 00:12:00' ), \" + \r\n\t\t\t\t\" (2,2,131,2,'2013-08-10 12:12:00' ), \" + \t\r\n\t\t\t\t\" (3,3,136,3,'2014-02-20 07:08:00' ) \" );\r\n\t\t\tdb.execSQL(\"INSERT INTO 'notes' ('notes_id','encounter_id','title','body','date_created','sync') \" + \r\n\t\t\t\t\t\" VALUES ('1',1,'First Encounter','Encountered for the first time','2013-06-02 00:12:00',0 ), \" + \r\n\t\t\t\t\t\" ('2',2,'Second Encounter','Encountered for the first time','2013-08-10 12:12:00',0 ), \" + \t\r\n\t\t\t\t\t\" ('3',3,'Third Encounter','Encountered for the first time','2014-02-20 07:08:00',0 ) \" );*/\r\n\t\t\tLog.d(\"DatabaseHandler\",\"onCreateDummy successful\");\r\n\t\t\t\r\n\t\t} catch (SQLException se) {\r\n\t\t\tLog.d(\"onCreateDummy SQLException\",Log.getStackTraceString(se));\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.d(\"onCreateDummy Exception\",Log.getStackTraceString(e));\r\n\t\t} finally {\r\n\t\t\tdb.close();\r\n\t\t}\r\n\t}", "@Override\n public void onCreate(SQLiteDatabase db) {\n for(int i = 0; i < this.dbTables.length; i++){\n db.execSQL(this.dbTables[i]);\n }\n }", "public void loadAllUserData(){\n\n }", "@BeforeEach\n\tpublic void cadastrar() {\n\t\tescola = new Escola( null, \"Test School\", true);\n\t\tdiretor = new Diretor(escola, \"Rodrigo\", 1000, new GregorianCalendar(1998, Calendar.APRIL, 2));\n\t\t\n\t\t\n\t\tSala sala1 = new Sala(301, 20);\n\t\tSala sala2 = new Sala(304, 40);\n\t\t\n\t\tescola.addSala(sala1);\n\t\tescola.addSala(sala2);\n\t\t\n\t\tProfessor prof1 = new Professor(\"Barcelos\", Formacao.MESTRADO);\n\t\tProfessor prof2 = new Professor(\"Salvio\" , Formacao.ESPECIALIZACAO);\n\t\t\n\t\tList<Professor> professores = new ArrayList<>();\n\t\tprofessores.add(prof1);\n\t\tprofessores.add(prof2);\n\t\t\n\t\tescola.setProfessores(professores);\n\t\t\n\t\ttry {\n\t\t\t//escolaDao.cadastrar(escola);\n\t\t\tdiretorDao.cadastrar(diretor);\n\t\t\tdiretorDao.commit();\n\t\t} catch (CommitException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Falha no teste\");\n\t\t}\n\t}", "private void setupAllMafiosis()\n {\n }" ]
[ "0.66403776", "0.6313942", "0.6256737", "0.62383276", "0.6193666", "0.6185827", "0.61647034", "0.6160671", "0.61441195", "0.6107724", "0.6103242", "0.609644", "0.6088091", "0.6076953", "0.6058348", "0.6052191", "0.6043196", "0.59964085", "0.5981998", "0.59719", "0.59663534", "0.59562916", "0.5956278", "0.59396", "0.59310204", "0.59061944", "0.5890621", "0.5874499", "0.5856921", "0.58567315", "0.5848625", "0.58467424", "0.5844788", "0.582241", "0.5820555", "0.58041704", "0.5797591", "0.5797459", "0.57971066", "0.5763557", "0.5739944", "0.57355624", "0.57347023", "0.5729188", "0.5728516", "0.57284397", "0.56957203", "0.56776685", "0.5676156", "0.56732774", "0.5667672", "0.56620026", "0.5660566", "0.5656325", "0.56485087", "0.5642573", "0.5638665", "0.56297654", "0.56236976", "0.56235343", "0.5622464", "0.562171", "0.56214476", "0.56212986", "0.561767", "0.5617454", "0.5607476", "0.5604905", "0.5604372", "0.55999565", "0.5580867", "0.5578852", "0.5578852", "0.556837", "0.556696", "0.5564284", "0.5564082", "0.5561842", "0.5555503", "0.5548292", "0.5541056", "0.5538665", "0.5535752", "0.5531017", "0.5528673", "0.5525487", "0.5523666", "0.5513436", "0.5511835", "0.55105877", "0.5509495", "0.5508049", "0.5499841", "0.5498829", "0.549584", "0.5495437", "0.5495419", "0.5493404", "0.549212", "0.5489213", "0.5486634" ]
0.0
-1
TODO: Make this class abstract to minimize code duplication for Whisper/Shout/etc.
@Override public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException { boolean specified_targets = false; boolean specified_talker = false; for (aH.Argument arg : aH.interpret(scriptEntry.getArguments())) { // Default target is the attached Player, if none specified otherwise. if (arg.matchesPrefix("target, targets, t")) { if (arg.matchesArgumentList(dEntity.class)) scriptEntry.addObject("targets", arg.asType(dList.class)); specified_targets = true; } else if (arg.matches("no_target")) scriptEntry.addObject("targets", Element.FALSE); // Default talker is the attached NPC, if none specified otherwise. else if (arg.matchesPrefix("talker, talkers")) { if (arg.matchesArgumentList(dEntity.class)) scriptEntry.addObject("talkers", arg.asType(dList.class)); specified_talker = true; } else scriptEntry.addObject("message", new Element(arg.raw_value)); } // Add default recipient as the attached Player if no recipients set otherwise if (!scriptEntry.hasObject("targets") && scriptEntry.hasPlayer() && !specified_targets) scriptEntry.defaultObject("targets", scriptEntry.getPlayer()); // Add default talker as the attached NPC if no recipients set otherwise if (!scriptEntry.hasObject("talkers") && scriptEntry.hasNPC() && !specified_talker) scriptEntry.defaultObject("talkers", new dList(scriptEntry.getNPC().identify())); // Verify essential fields are set if (!scriptEntry.hasObject("targets")) throw new InvalidArgumentsException("Must specify valid targets!"); if (!scriptEntry.hasObject("talkers")) throw new InvalidArgumentsException("Must specify valid talkers!"); if (!scriptEntry.hasObject("message")) throw new InvalidArgumentsException("Must specify a message!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onWhisper(TwitchUser sender, TwitchMessage message);", "protected boolean processWhisper(String username, String titles, int rating, int gameNumber, String message){return false;}", "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "public abstract void stickerMessage(Message m);", "public abstract void audioMessage(Message m);", "private boolean handleWhisper(String line){\n if (line.indexOf(\"whispers: \") == -1)\n return false;\n \n Matcher matcher = WHISPER_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String ratingString = matcher.group(3);\n String gameNumberString = matcher.group(4);\n String message = matcher.group(5);\n\n int rating = (ratingString != null) && !ratingString.equals(\"----\") ? Integer.parseInt(ratingString) : -1;\n int gameNumber = Integer.parseInt(gameNumberString);\n\n if (!processWhisper(username, titles, rating, gameNumber, message))\n processLine(line);\n\n return true;\n }", "protected boolean processShout(String username, String titles, String message){return false;}", "@Override\n public String speak()\n {\n return \"peep\";\n }", "@Override\n\tpublic String speak() {\n\t\treturn null;\n\t}", "protected boolean processTShout(String username, String titles, String message){return false;}", "protected boolean processCShout(String username, String titles, String message){return false;}", "public void talk() {\n\n\t}", "@Override\n public String speak()\n {\n return \"Neigh\";\n }", "@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "void onAction(TwitchUser sender, TwitchMessage message);", "public Speak()\r\n {\r\n super( \"Speak\", \"Begin a conversation.\", \"p\" );\r\n }", "@Override\n\tpublic void canSpeak() {\n\t\t\n\t}", "public interface VKHanlerInterface {\n public void onGetIncomingMessage(LoopMessage msg);\n public void onGetOutgoingMessage(LoopMessage msg);\n public void onTypingMessageInDialog(int userId); //приходит примерно раз в пять секунд\n public void onTypingMessageInChat(int userId, int chatId);\n public void onMessageDelete(int messageId);\n\n //-------- нечто странное и не реализованное пока --------------------\n public void onMessageFlagsReplace(int messageId);\n public void onMessageFlagsSet();\n public void onMessageFlagsReset();\n //-------------------------------------------------\n\n public void onChatEdit(int chatId, boolean selfEdit);\n\n public void onFriendOnline(int userId);\n public void onFriendOffline(int userId, boolean away ); //away - оффлайн по таймауту\n public void onCall(int userId, int chatId); //не реализовано\n}", "EmoteTransmitter getEmoteTransmitter();", "public abstract void talk();", "@Override\n\tpublic void process(MessageStream<ServerMessage> message)\n\t{\n\t\t\n\t}", "@Override\n public void talk(Direction myDirection){\n }", "private FlyWithWings(){\n\t\t\n\t}", "public static void main(String [] args) {\n\t\tParent parent = new Parent();\n\t\tSinger singer = new Singer();\n\t\tPetOwner petOwner = new PetOwner();\n\t\tAudienceMember audMem = new AudienceMember();\n\t\tChild child = new Child();\n\t\tPet pet = new Pet();\n\n\t\t// Register listeners\n\t\tSpeakerphone speakerphone = Speakerphone.get();\n\t\tspeakerphone.addListener(audMem);\n\t\tspeakerphone.addListener(child);\n\t\tspeakerphone.addListener(pet);\n\n\t\t// Send messages!\n\t\tspeakerphone.shoutMessage(parent);\n\t\tspeakerphone.shoutMessage(petOwner, pet.getClass()); \n\t\tspeakerphone.shoutMessage(singer);\n\t}", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n protected void prepareHandshakeMessageContents() {\n }", "protected boolean processChannelTell(String username, String titles, int channelNumber, String message){return false;}", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "public interface GetRandomPlaylistInterface {\n void responseReceived(GetRandomPlaylistResponse response);\n void onFailure();\n\n enum GetRandomPlaylistMessageType{\n FAILED,\n SUCCESS\n }\n\n class RandomPlaylistMessage extends MyMessage {\n public RandomPlaylistMessage randomPlaylistMessage;\n public boolean isAuthentic;\n public RandomPlaylistMessage(){\n type= MyMessageType.RANDOM_PLAYLIST;\n }\n }\n}", "protected void emit(Player p, String message) {\n }", "protected abstract TMessage prepareMessage();", "protected boolean processPersonalTell(String username, String titles, String message){return false;}", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.516 -0500\", hash_original_method = \"C8C31043DDFE26EC3BE146F1B2B418E3\", hash_generated_method = \"4278121A770EE39DDEB6E37D007DBBC8\")\n \npublic void sendMessage(int what) {\n Message msg = Message.obtain();\n msg.what = what;\n sendMessage(msg);\n }", "private HeartBeatMessage() {\n initFields();\n }", "@Override\n protected void sink(Message message) {\n }", "public interface IRing extends ISignal {\n void postpound(Context context);\n void sendMessage();\n String getMelody();\n long getTurnOffTime();\n boolean isDeleteAfterUsing();\n boolean isOnState();\n boolean isVibrating();\n byte[] getRepeatDays();\n}", "@Override public void handleMessage(Message msg) {\n super.handleMessage(msg);\n byte[] byteArray = (byte[]) msg.obj;\n int length = msg.arg1;\n byte[] resultArray = length == -1 ? byteArray : new byte[length];\n for (int i = 0; i < byteArray.length && i < length; ++i) {\n resultArray[i] = byteArray[i];\n }\n String text = new String(resultArray, StandardCharsets.UTF_8);\n if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_WRITE) {\n Log.i(TAG, \"we just wrote... [\" + length + \"] '\" + text + \"'\");\n// mIncomingMsgs.onNext(text);\n } else if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_READ) {\n Log.i(TAG, \"we just read... [\" + length + \"] '\" + text + \"'\");\n Log.i(TAG, \" >>r \" + Arrays.toString((byte[]) msg.obj));\n mIncomingMsgs.onNext(text);\n sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// mReadTxt.setText(++ri + \"] \" + text);\n// if (mServerBound && mServerService.isConnected()) {\n// mServerService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// } else if (mClientBound && mClientService.isConnected()) {\n// mClientService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// }\n// mBluetoothStuff.mTalker.write();\n }\n }", "public abstract void voiceMessage(Message m);", "public interface MessageSender {\n boolean handle(Context context, MessageResponse response);\n}", "@Override\n\tpublic void talk() {\n\t\tSystem.out.println(\"黄种人-说\");\n\t}", "public interface WampRawTopicSubscriber {\n <TMessage> void event(WampFormatter<TMessage> formatter, long publicationId, TMessage details);\n <TMessage> void event(WampFormatter<TMessage> formatter, long publicationId, TMessage details, TMessage[] arguments);\n <TMessage> void event(WampFormatter<TMessage> formatter, long publicationId, TMessage details, TMessage[] arguments, TMessage argumentsKeywords);\n}", "protected boolean processSayTell(String username, String titles, int gameNumber, String message){return false;}", "public void beforeSendingeGainChatRequest();", "public interface IMessageInputStrategy{\n public abstract Message getMessage();\n}", "protected String getHurtSound()\n {\n return \"mob.spider.say\";\n }", "public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}", "void onAnything(String unformatedMessage);", "@Override\n protected boolean isPersonalTell(ChatEvent evt){\n String type = evt.getType();\n return \"tell\".equals(type) || \"say\".equals(type) || \"ptell\".equals(type);\n }", "@Override\n public void speak() {\n System.out.println(\"I'm an Aardvark, I make grunting sounds most of the time.\");\n }", "public interface TwitchApiResultListener {\r\n void receivedEmoticons(Set<Emoticon> emoticons);\r\n void receivedUsericons(List<Usericon> icons);\r\n void gameSearchResult(Set<String> games);\r\n void tokenVerified(String token, TokenInfo tokenInfo);\r\n void runCommercialResult(String stream, String text, int result);\r\n void putChannelInfoResult(int result);\r\n void receivedChannelInfo(String channel, ChannelInfo info, int result);\r\n void accessDenied();\r\n void receivedFollowers(FollowerInfo followerInfo);\r\n void newFollowers(FollowerInfo followerInfo);\r\n void receivedSubscribers(FollowerInfo info);\r\n \r\n /**\r\n * The correctly capitalized name for a user.\r\n * \r\n * @param name All-lowercase name\r\n * @param displayName Correctly capitalized name\r\n */\r\n void receivedDisplayName(String name, String displayName);\r\n}", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "@Override\n public void speak() {\n System.out.printf(\"i'm %s. I am a DINOSAURRRRR....!\\n\",this.name);\n }", "public interface Text2Speech {\n\t\n\t/**\n\t * Supported formats.\n\t */\n\tenum OutputFormat {\n\t\t/**\n\t\t * MP3 format.\n\t\t */\n\t\tMP3,\n\t\t/**\n\t\t * Ogg-vorbis format.\n\t\t */\n\t\tOGG\n\t}\n\t\n\t/**\n\t * Produce MP3 with specified phrase.\n\t * \n\t * @param phrase Some sentence.\n\t * @return MP3 stream (may be network bound, close afterwards)\n\t */\n\tInputStream synthesize(String phrase, OutputFormat fmt) throws IOException;\n}", "abstract void message(String message);", "@Override\n public void run() {\n Message message = new Message();\n message.what=1;\n handler.sendMessage(message);\n }", "public abstract void message();", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.526 -0500\", hash_original_method = \"D262961B9C2C88432C23CE1E616C0D35\", hash_generated_method = \"E58A9FC8C58B34F13DDC5C274B23CB07\")\n \npublic void sendMessage(int what, Object obj) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.obj = obj;\n sendMessage(msg);\n }", "@Override\n\tpublic void msgGotHungry() {\n\t\t\n\t}", "private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) pong = true;\n else if (buffer.getPing()) send(\"<pong/>\");\n else {\n try {\n clientController.onReceivedMessage(buffer.get());\n } catch (EmptyBufferException e) {\n System.out.println(\"[CLIENT] The buffer is empty!\");\n }\n }\n }\n\n }", "@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}", "public interface MessageProcesser {\n\n public void sendMultipleMessage();\n\n public void sendSingleMessage(int tag);\n\n public void parseMessage(String readMessage);\n}", "@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}", "void onPrivMsg(TwitchUser sender, TwitchMessage message);", "@Test\n\tpublic void testMessageFromOrcs() {\n\n\t\tfinal Messenger messenger = new Messenger();\n\t\ttestMessage(\n\t\t\t\tmessenger.messageFromOrcs(),\n\t\t\t\t\"Where there is a whip there is a way.\"\n\t\t);\n\t}", "public interface WechatNoticeProcessor {\r\n WechatNoticeProcessorType type();\r\n\r\n void process(Clazz clazz, Teacher teacher, Map<String, Object> extensionInfo, WechatType wechatType);\r\n\r\n void process(Long clazzId, Long groupId, Teacher teacher, Map<String, Object> extensionInfo, WechatType wechatType);\r\n\r\n void processWithSpecificUsers(List<User> students, Teacher teacher, Long clazzId, Map<String, Object> extensionInfo, WechatType wechatType);\r\n\r\n void processSingleUser(Long userId, Map<String, Object> extensionInfo, WechatType wechatType);\r\n\r\n void processSingleUserOpenId(Long userId, String openId, Map<String, Object> extensionInfo);\r\n\r\n void processMultiUsersMultiOpenIds(Map<Long, List<String>> user_openId_map, Map<String, Object> extensionInfo);\r\n\r\n void processWithStudents(Collection<Long> studentIds, Map<String, Object> extensionInfo, WechatType wechatType);\r\n}", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "interface MessageVisitor {\n\t/**\n\t * Methode de visite du Message\n\t * \n\t * @param message\n\t * : Message\n\t */\n\tpublic void visit(Message message);\n\n\t/**\n\t * Methode de visite du BitField\n\t * \n\t * @param bf\n\t * : BitField\n\t */\n\tpublic void visit(BitField bf);\n\n\t/**\n\t * Methode de visite du Choke\n\t * \n\t * @param c\n\t * ; Choke\n\t */\n\tpublic void visit(Choke c);\n\n\t/**\n\t * Methode de visite du Have\n\t * \n\t * @param h\n\t * : Have\n\t */\n\tpublic void visit(Have h);\n\n\t/**\n\t * Methode de visite du Interested\n\t * \n\t * @param i\n\t * : Interested\n\t */\n\tpublic void visit(Interested i);\n\n\t/**\n\t * Methode de visite du KeepAlive\n\t * \n\t * @param ka\n\t * : KeepAlive\n\t */\n\tpublic void visit(KeepAlive ka);\n\n\t/**\n\t * Methode de visite du NotInterested\n\t * \n\t * @param ni\n\t * : NotInterested\n\t */\n\tpublic void visit(NotInterested ni);\n\n\t/**\n\t * Methode de visite du Request\n\t * \n\t * @param r\n\t * : Request\n\t */\n\tpublic void visit(Request r);\n\n\t/**\n\t * Methode de visite du SendBlock\n\t * \n\t * @param sb\n\t * : SendBlock\n\t */\n\tpublic void visit(SendBlock sb);\n\n\t/**\n\t * Methode de visite du Unchoke\n\t * \n\t * @param uc\n\t * : Unchoke\n\t */\n\tpublic void visit(Unchoke uc);\n\t\n\tpublic void visit(SendRSAKey srsak);\n\t\n\tpublic void visit(SendSymmetricKey ssyk);\n}", "@Override\r\n public void handleMessage(Message msg) {\n }", "@Override\n\tpublic void msgAtKitchen() {\n\t\t\n\t}", "@Override\r\n\tpublic Node visitStreamPattern(StreamPatternContext ctx) {\n\t\treturn super.visitStreamPattern(ctx);\r\n\t}", "@Override\n public void run() {\n Message message = new Message();\n message.what = 4;\n handler.sendMessage(message);\n }", "@Override\r\n\tpublic String work() {\n\t\treturn \"This is a hammer. \";\r\n\t}", "@Override\n public String getMessage() {\n String result =\"Audio Message {\\n\";\n result +=\"\\tID: \"+ID+\"\\n\";\n result +=\"\\tBuffer Size: \"+bufferSize+\"\\n\";\n result +=\"}\";\n \n return result;\n }", "@Override\n public void handleMessage(Message message) {}", "public interface WMANotify {\n\t public void NotifyWMAResult( String number,\n String message,\n boolean success );\n}", "public interface Core {\n enum LogCollectionUploadState {\n /**\n * Delivery in progress. \n */\n InProgress(0),\n\n /**\n * Log collection upload successfully delivered and acknowledged by remote end\n * point. \n */\n Delivered(1),\n\n /**\n * Log collection upload was not delivered. \n */\n NotDelivered(2);\n\n protected final int mValue;\n\n private LogCollectionUploadState (int value) {\n mValue = value;\n }\n\n static public LogCollectionUploadState fromInt(int value) throws RuntimeException {\n switch(value) {\n case 0: return InProgress;\n case 1: return Delivered;\n case 2: return NotDelivered;\n default:\n throw new RuntimeException(\"Unhandled enum value \" + value + \" for LogCollectionUploadState\");\n }\n }\n\n public int toInt() {\n return mValue;\n }\n };\n\n /**\n * Gets the mediastreamer's factory\n */\n public org.linphone.mediastream.Factory getMediastreamerFactory();\n /**\n * Returns which adaptive rate algorithm is currently configured for future calls. \n */\n public String getAdaptiveRateAlgorithm();\n\n /**\n * Sets adaptive rate algorithm. \n */\n public void setAdaptiveRateAlgorithm(String algorithm);\n\n /**\n * Returns whether adaptive rate control is enabled. \n */\n public boolean adaptiveRateControlEnabled();\n\n /**\n * Enable adaptive rate control. \n */\n public void enableAdaptiveRateControl(boolean enabled);\n\n /**\n * Tells whether the audio adaptive jitter compensation is enabled. \n */\n public boolean audioAdaptiveJittcompEnabled();\n\n /**\n * Enable or disable the audio adaptive jitter compensation. \n */\n public void enableAudioAdaptiveJittcomp(boolean enable);\n\n /**\n * Get the DSCP field for outgoing audio streams. \n */\n public int getAudioDscp();\n\n /**\n * Set the DSCP field for outgoing audio streams. \n */\n public void setAudioDscp(int dscp);\n\n /**\n * Returns the nominal audio jitter buffer size in milliseconds. \n */\n public int getAudioJittcomp();\n\n /**\n * Sets the nominal audio jitter buffer size in milliseconds. \n */\n public void setAudioJittcomp(int milliseconds);\n\n /**\n * Use to get multicast address to be used for audio stream. \n */\n public String getAudioMulticastAddr();\n\n /**\n * Use to set multicast address to be used for audio stream. \n */\n public void setAudioMulticastAddr(String ip);\n\n /**\n * Use to get multicast state of audio stream. \n */\n public boolean audioMulticastEnabled();\n\n /**\n * Use to enable multicast rtp for audio stream. \n */\n public void enableAudioMulticast(boolean yesno);\n\n /**\n * Use to get multicast ttl to be used for audio stream. \n */\n public int getAudioMulticastTtl();\n\n /**\n * Use to set multicast ttl to be used for audio stream. \n */\n public void setAudioMulticastTtl(int ttl);\n\n /**\n * Return the list of the available audio payload types. \n */\n public PayloadType[] getAudioPayloadTypes();\n\n /**\n * Redefine the list of the available payload types. \n */\n public void setAudioPayloadTypes(PayloadType[] payloadTypes);\n\n /**\n * Gets the UDP port used for audio streaming. \n */\n public int getAudioPort();\n\n /**\n * Sets the UDP port used for audio streaming. \n */\n public void setAudioPort(int port);\n\n /**\n * Get the audio port range from which is randomly chosen the UDP port used for\n * audio streaming. \n */\n public Range getAudioPortsRange();\n\n /**\n * Returns an unmodifiable list of currently entered #LinphoneAuthInfo. \n */\n public AuthInfo[] getAuthInfoList();\n\n /**\n * Return AVPF enablement. \n */\n public AVPFMode getAvpfMode();\n\n /**\n * Enable RTCP feedback (also known as RTP/AVPF profile). \n */\n public void setAvpfMode(AVPFMode mode);\n\n /**\n * Return the avpf report interval in seconds. \n */\n public int getAvpfRrInterval();\n\n /**\n * Set the avpf report interval in seconds. \n */\n public void setAvpfRrInterval(int interval);\n\n /**\n * Get the list of call logs (past calls). \n */\n public CallLog[] getCallLogs();\n\n /**\n * Sets the database filename where call logs will be stored. \n */\n public void setCallLogsDatabaseFile(String path);\n\n /**\n * Gets the database filename where call logs will be stored. \n */\n public String getCallLogsDatabasePath();\n\n /**\n * Sets the database path where call logs will be stored for beautymirror. \n */\n public void setCallLogsDatabasePath(String path);\n\n /**\n * Gets the current list of calls. \n */\n public Call[] getCalls();\n\n /**\n * Get the number of Call. \n */\n public int getCallsNb();\n\n /**\n * Get the camera sensor rotation. \n */\n public int getCameraSensorRotation();\n\n /**\n * Gets the name of the currently assigned sound device for capture. \n */\n public String getCaptureDevice();\n\n /**\n * Sets the sound device used for capture. \n */\n public void setCaptureDevice(String devid);\n\n /**\n * Get path to the database file used for storing chat messages. \n */\n @Deprecated\n public String getChatDatabasePath();\n\n /**\n * Set the chat database path. \n */\n @Deprecated\n public void setChatDatabasePath(String path);\n\n /**\n * Returns whether chat is enabled. \n */\n public boolean chatEnabled();\n\n /**\n * Returns an list of chat rooms. \n */\n public ChatRoom[] getChatRooms();\n\n /**\n * Get a pointer on the internal conference object. \n */\n public Conference getConference();\n\n /**\n * Get the set input volume of the local participant. \n */\n public float getConferenceLocalInputVolume();\n\n /**\n * Tells whether the conference server feature is enabled. \n */\n public boolean conferenceServerEnabled();\n\n /**\n * Enable the conference server feature. \n */\n public void enableConferenceServer(boolean enable);\n\n /**\n * Get the number of participant in the running conference. \n */\n public int getConferenceSize();\n\n /**\n * Returns the LpConfig object used to manage the storage (config) file. \n */\n public Config getConfig();\n\n /**\n * Get my consolidated presence. \n */\n public ConsolidatedPresence getConsolidatedPresence();\n\n /**\n * Set my consolidated presence. \n */\n public void setConsolidatedPresence(ConsolidatedPresence presence);\n\n /**\n * Gets the current call. \n */\n public Call getCurrentCall();\n\n /**\n * Get the remote address of the current call. \n */\n public Address getCurrentCallRemoteAddress();\n\n /**\n * Get the effective video definition provided by the camera for the captured\n * video. \n */\n public VideoDefinition getCurrentPreviewVideoDefinition();\n\n /**\n * Retrieves the first list of #LinphoneFriend from the core. \n */\n public FriendList getDefaultFriendList();\n\n /**\n */\n public ProxyConfig getDefaultProxyConfig();\n\n /**\n * Sets the default proxy. \n */\n public void setDefaultProxyConfig(ProxyConfig config);\n\n /**\n * Gets the delayed timeout See linphone_core_set_delayed_timeout() for details. \n */\n public int getDelayedTimeout();\n\n /**\n * Set the in delayed timeout in seconds. \n */\n public void setDelayedTimeout(int seconds);\n\n /**\n * Gets the current device orientation. \n */\n public int getDeviceRotation();\n\n /**\n * Tells the core the device current orientation. \n */\n public void setDeviceRotation(int rotation);\n\n /**\n * Tells whether DNS search (use of local domain if the fully qualified name did\n * return results) is enabled. \n */\n public boolean dnsSearchEnabled();\n\n /**\n * Enable or disable DNS search (use of local domain if the fully qualified name\n * did return results). \n */\n public void enableDnsSearch(boolean enable);\n\n /**\n * Forces liblinphone to use the supplied list of dns servers, instead of system's\n * ones. \n */\n public void setDnsServers(String[] servers);\n\n /**\n * Forces liblinphone to use the supplied list of dns servers, instead of system's\n * ones and set dns_set_by_app at true or false according to value of servers\n * list. \n */\n public void setDnsServersApp(String[] servers);\n\n /**\n * Tells if the DNS was set by an application. \n */\n public boolean getDnsSetByApp();\n\n /**\n * Tells whether DNS SRV resolution is enabled. \n */\n public boolean dnsSrvEnabled();\n\n /**\n * Enable or disable DNS SRV resolution. \n */\n public void enableDnsSrv(boolean enable);\n\n /**\n * Retrieve the maximum available download bandwidth. \n */\n public int getDownloadBandwidth();\n\n /**\n * Sets maximum available download bandwidth This is IP bandwidth, in kbit/s. \n */\n public void setDownloadBandwidth(int bw);\n\n /**\n * Get audio packetization time linphone expects to receive from peer. \n */\n public int getDownloadPtime();\n\n /**\n * Set audio packetization time linphone expects to receive from peer. \n */\n public void setDownloadPtime(int ptime);\n\n /**\n * Returns TRUE if echo cancellation is enabled. \n */\n public boolean echoCancellationEnabled();\n\n /**\n * Enables or disable echo cancellation. \n */\n public void enableEchoCancellation(boolean val);\n\n /**\n * Get the name of the mediastreamer2 filter used for echo cancelling. \n */\n public String getEchoCancellerFilterName();\n\n /**\n * Set the name of the mediastreamer2 filter to be used for echo cancelling. \n */\n public void setEchoCancellerFilterName(String filtername);\n\n /**\n * Tells whether echo limiter is enabled. \n */\n public boolean echoLimiterEnabled();\n\n /**\n * Enables or disable echo limiter. \n */\n public void enableEchoLimiter(boolean val);\n\n /**\n * Sets expected available upload bandwidth This is IP bandwidth, in kbit/s. \n */\n public void setExpectedBandwidth(int bw);\n\n /**\n * Get the globaly set http file transfer server to be used for content type\n * application/vnd.gsma.rcs-ft-http+xml. \n */\n public String getFileTransferServer();\n\n /**\n * Globaly set an http file transfer server to be used for content type\n * application/vnd.gsma.rcs-ft-http+xml. \n */\n public void setFileTransferServer(String serverUrl);\n\n /**\n * Gets the database filename where friends will be stored. \n */\n public String getFriendsDatabasePath();\n\n /**\n * Sets the database filename where friends will be stored. \n */\n public void setFriendsDatabasePath(String path);\n\n /**\n * Retrieves the list of #LinphoneFriendList from the core. \n */\n public FriendList[] getFriendsLists();\n\n /**\n * Returns TRUE if hostname part of primary contact is guessed automatically. \n */\n public boolean getGuessHostname();\n\n /**\n * Tells #LinphoneCore to guess local hostname automatically in primary contact. \n */\n public void setGuessHostname(boolean val);\n\n /**\n * Get http proxy address to be used for signaling. \n */\n public String getHttpProxyHost();\n\n /**\n * Set http proxy address to be used for signaling during next channel connection. \n */\n public void setHttpProxyHost(String host);\n\n /**\n * Get http proxy port to be used for signaling. \n */\n public int getHttpProxyPort();\n\n /**\n * Set http proxy port to be used for signaling. \n */\n public void setHttpProxyPort(int port);\n\n /**\n * Gets the default identity SIP address. \n */\n public String getIdentity();\n\n /**\n * Get the #LinphoneImNotifPolicy object controlling the instant messaging\n * notifications. \n */\n public ImNotifPolicy getImNotifPolicy();\n\n /**\n * Gets the in call timeout See linphone_core_set_in_call_timeout() for details. \n */\n public int getInCallTimeout();\n\n /**\n * Set the in call timeout in seconds. \n */\n public void setInCallTimeout(int seconds);\n\n /**\n * Returns the incoming call timeout See linphone_core_set_inc_timeout() for\n * details. \n */\n public int getIncTimeout();\n\n /**\n * Set the incoming call timeout in seconds. \n */\n public void setIncTimeout(int seconds);\n\n /**\n * Tells whether IPv6 is enabled or not. \n */\n public boolean ipv6Enabled();\n\n /**\n * Turns IPv6 support on or off. \n */\n public void enableIpv6(boolean val);\n\n /**\n * Check whether the device is echo canceller calibration is required. \n */\n public boolean isEchoCancellerCalibrationRequired();\n\n /**\n * Indicates whether the local participant is part of a conference. \n */\n public boolean isInConference();\n\n /**\n * Tells whether there is an incoming invite pending. \n */\n public boolean isIncomingInvitePending();\n\n /**\n * Get behaviour when encryption parameters negociation fails on outgoing call. \n */\n public boolean isMediaEncryptionMandatory();\n\n /**\n * return network state either as positioned by the application or by linphone\n * itself. \n */\n public boolean isNetworkReachable();\n\n /**\n * Is signaling keep alive enabled. \n */\n public boolean keepAliveEnabled();\n\n /**\n * Enables signaling keep alive, small udp packet sent periodically to keep udp\n * NAT association. \n */\n public void enableKeepAlive(boolean enable);\n\n /**\n * Get the latest outgoing call log. \n */\n public CallLog getLastOutgoingCallLog();\n\n /**\n * Get the linphone specs value telling what functionalities the linphone client\n * supports. \n */\n public String getLinphoneSpecs();\n\n /**\n * Set the linphone specs value telling what functionalities the linphone client\n * supports. \n */\n public void setLinphoneSpecs(String specs);\n\n /**\n * Gets the url of the server where to upload the collected log files. \n */\n public String getLogCollectionUploadServerUrl();\n\n /**\n * Set the url of the server where to upload the collected log files. \n */\n public void setLogCollectionUploadServerUrl(String serverUrl);\n\n /**\n * Get the maximum number of simultaneous calls Linphone core can manage at a\n * time. \n */\n public int getMaxCalls();\n\n /**\n * Set the maximum number of simultaneous calls Linphone core can manage at a\n * time. \n */\n public void setMaxCalls(int max);\n\n /**\n * Get the media encryption policy being used for RTP packets. \n */\n public MediaEncryption getMediaEncryption();\n\n /**\n * Choose the media encryption policy to be used for RTP packets. \n */\n public void setMediaEncryption(MediaEncryption menc);\n\n /**\n * Define behaviour when encryption parameters negociation fails on outgoing call. \n */\n public void setMediaEncryptionMandatory(boolean m);\n\n /**\n * This method is called by the application to notify the linphone core library\n * when the media (RTP) network is reachable. \n */\n public void setMediaNetworkReachable(boolean value);\n\n /**\n * Tells whether the microphone is enabled. \n */\n public boolean micEnabled();\n\n /**\n * Enable or disable the microphone. \n */\n public void enableMic(boolean enable);\n\n /**\n * Get microphone gain in db. \n */\n public float getMicGainDb();\n\n /**\n * Allow to control microphone level: gain in db. \n */\n public void setMicGainDb(float level);\n\n /**\n * Get the number of missed calls. \n */\n public int getMissedCallsCount();\n\n /**\n * Returns the maximum transmission unit size in bytes. \n */\n public int getMtu();\n\n /**\n * Sets the maximum transmission unit size in bytes. \n */\n public void setMtu(int mtu);\n\n /**\n * Get the public IP address of NAT being used. \n */\n public String getNatAddress();\n\n /**\n * Set the public IP address of NAT when using the firewall policy is set to use\n * NAT. \n */\n public void setNatAddress(String addr);\n\n /**\n * Get The policy that is used to pass through NATs/firewalls. \n */\n public NatPolicy getNatPolicy();\n\n /**\n * Set the policy to use to pass through NATs/firewalls. \n */\n public void setNatPolicy(NatPolicy policy);\n\n /**\n * Get the native window handle of the video preview window. \n */\n public void getNativePreviewWindowId();\n\n /**\n * Set the native window id where the preview video (local camera) is to be\n * displayed. \n */\n public void setNativePreviewWindowId(Object id);\n\n /**\n * Get the native window handle of the video window. \n */\n public void getNativeVideoWindowId();\n\n /**\n * Set the native video window id where the video is to be displayed. \n */\n public void setNativeVideoWindowId(Object id);\n\n /**\n * This method is called by the application to notify the linphone core library\n * when network is reachable. \n */\n public void setNetworkReachable(boolean value);\n\n /**\n * Gets the value of the no-rtp timeout. \n */\n public int getNortpTimeout();\n\n /**\n * Sets the no-rtp timeout value in seconds. \n */\n public void setNortpTimeout(int seconds);\n\n /**\n * Get the wav file that is played when putting somebody on hold, or when files\n * are used instead of soundcards (see linphone_core_set_use_files()). \n */\n public String getPlayFile();\n\n /**\n * Sets a wav file to be played when putting somebody on hold, or when files are\n * used instead of soundcards (see linphone_core_set_use_files()). \n */\n public void setPlayFile(String file);\n\n /**\n * Gets the name of the currently assigned sound device for playback. \n */\n public String getPlaybackDevice();\n\n /**\n * Sets the sound device used for playback. \n */\n public void setPlaybackDevice(String devid);\n\n /**\n * Get playback gain in db before entering sound card. \n */\n public float getPlaybackGainDb();\n\n /**\n * Allow to control play level before entering sound card: gain in db. \n */\n public void setPlaybackGainDb(float level);\n\n /**\n * Returns the preferred video framerate, previously set by\n * linphone_core_set_preferred_framerate(). \n */\n public float getPreferredFramerate();\n\n /**\n * Set the preferred frame rate for video. \n */\n public void setPreferredFramerate(float fps);\n\n /**\n * Get the preferred video definition for the stream that is captured and sent to\n * the remote party. \n */\n public VideoDefinition getPreferredVideoDefinition();\n\n /**\n * Set the preferred video definition for the stream that is captured and sent to\n * the remote party. \n */\n public void setPreferredVideoDefinition(VideoDefinition vdef);\n\n /**\n * Sets the preferred video size by its name. \n */\n @Deprecated\n public void setPreferredVideoSizeByName(String name);\n\n /**\n * Get my presence model. \n */\n public PresenceModel getPresenceModel();\n\n /**\n * Set my presence model. \n */\n public void setPresenceModel(PresenceModel presence);\n\n /**\n * Get the definition of the captured video. \n */\n public VideoDefinition getPreviewVideoDefinition();\n\n /**\n * Set the video definition for the captured (preview) video. \n */\n public void setPreviewVideoDefinition(VideoDefinition vdef);\n\n /**\n * Sets the preview video size by its name. \n */\n @Deprecated\n public void setPreviewVideoSizeByName(String name);\n\n /**\n * Returns the default identity when no proxy configuration is used. \n */\n public String getPrimaryContact();\n\n /**\n * Sets the local &quot;from&quot; identity. \n */\n public void setPrimaryContact(String contact);\n\n /**\n * Same as linphone_core_get_primary_contact() but the result is a\n * #LinphoneAddress object instead of const char*. \n */\n public Address getPrimaryContactParsed();\n\n /**\n * Get provisioning URI. \n */\n public String getProvisioningUri();\n\n /**\n * Set URI where to download xml configuration file at startup. \n */\n public void setProvisioningUri(String uri);\n\n /**\n * Returns an unmodifiable list of entered proxy configurations. \n */\n public ProxyConfig[] getProxyConfigList();\n\n /**\n * Tells whether QRCode is enabled in the preview. \n */\n public boolean qrcodeVideoPreviewEnabled();\n\n /**\n * Controls QRCode enablement. \n */\n public void enableQrcodeVideoPreview(boolean val);\n\n /**\n * Gets if realtime text is enabled or not. \n */\n public boolean realtimeTextEnabled();\n\n /**\n * Get the wav file where incoming stream is recorded, when files are used instead\n * of soundcards (see linphone_core_set_use_files()). \n */\n public String getRecordFile();\n\n /**\n * Sets a wav file where incoming stream is to be recorded, when files are used\n * instead of soundcards (see linphone_core_set_use_files()). \n */\n public void setRecordFile(String file);\n\n /**\n * Get the ring back tone played to far end during incoming calls. \n */\n public String getRemoteRingbackTone();\n\n /**\n * Specify a ring back tone to be played to far end during incoming calls. \n */\n public void setRemoteRingbackTone(String ring);\n\n /**\n * Returns the path to the wav file used for ringing. \n */\n public String getRing();\n\n /**\n * Sets the path to a wav file used for ringing. \n */\n public void setRing(String path);\n\n /**\n * Tells whether the ring play is enabled during an incoming early media call. \n */\n public boolean getRingDuringIncomingEarlyMedia();\n\n /**\n * Enable or disable the ring play during an incoming early media call. \n */\n public void setRingDuringIncomingEarlyMedia(boolean enable);\n\n /**\n * Returns the path to the wav file used for ringing back. \n */\n public String getRingback();\n\n /**\n * Sets the path to a wav file used for ringing back. \n */\n public void setRingback(String path);\n\n /**\n * Gets the name of the currently assigned sound device for ringing. \n */\n public String getRingerDevice();\n\n /**\n * Sets the sound device used for ringing. \n */\n public void setRingerDevice(String devid);\n\n /**\n * Gets the path to a file or folder containing the trusted root CAs (PEM format) \n */\n public String getRootCa();\n\n /**\n * Sets the path to a file or folder containing trusted root CAs (PEM format) \n */\n public void setRootCa(String path);\n\n /**\n * Sets the trusted root CAs (PEM format) \n */\n public void setRootCaData(String data);\n\n /**\n * Media offer control param for SIP INVITE. \n */\n public boolean sdp200AckEnabled();\n\n /**\n * Control when media offer is sent in SIP INVITE. \n */\n public void enableSdp200Ack(boolean enable);\n\n /**\n * Tells whether video self view during call is enabled or not. \n */\n public boolean selfViewEnabled();\n\n /**\n * Enables or disable self view during calls. \n */\n public void enableSelfView(boolean val);\n\n /**\n * Get the DSCP field for SIP signaling channel. \n */\n public int getSipDscp();\n\n /**\n * Set the DSCP field for SIP signaling channel. \n */\n public void setSipDscp(int dscp);\n\n /**\n * This method is called by the application to notify the linphone core library\n * when the SIP network is reachable. \n */\n public void setSipNetworkReachable(boolean value);\n\n /**\n * Get the SIP transport timeout. \n */\n public int getSipTransportTimeout();\n\n /**\n * Set the SIP transport timeout. \n */\n public void setSipTransportTimeout(int timeoutMs);\n\n /**\n * Gets the list of the available sound devices. \n */\n public String[] getSoundDevicesList();\n\n /**\n * Get the path to the image file streamed when &quot;Static picture&quot; is set as the\n * video device. \n */\n public String getStaticPicture();\n\n /**\n * Set the path to the image file to stream when &quot;Static picture&quot; is set as the\n * video device. \n */\n public void setStaticPicture(String path);\n\n /**\n * Get the frame rate for static picture. \n */\n public float getStaticPictureFps();\n\n /**\n * Set the frame rate for static picture. \n */\n public void setStaticPictureFps(float fps);\n\n /**\n * Get the STUN server address being used. \n */\n public String getStunServer();\n\n /**\n * Set the STUN server address to use when the firewall policy is set to STUN. \n */\n public void setStunServer(String server);\n\n /**\n * Returns a null terminated table of strings containing the file format extension\n * supported for call recording. \n */\n public String[] getSupportedFileFormatsList();\n\n /**\n * Return the list of the available text payload types. \n */\n public PayloadType[] getTextPayloadTypes();\n\n /**\n * Redefine the list of the available payload types. \n */\n public void setTextPayloadTypes(PayloadType[] payloadTypes);\n\n /**\n * Gets the UDP port used for text streaming. \n */\n public int getTextPort();\n\n /**\n * Sets the UDP port used for text streaming. \n */\n public void setTextPort(int port);\n\n /**\n * Get the text port range from which is randomly chosen the UDP port used for\n * text streaming. \n */\n public Range getTextPortsRange();\n\n /**\n * Gets the TLS certificate. \n */\n public String getTlsCert();\n\n /**\n * Sets a TLS certificate used for TLS authentication The certificate won't be\n * stored, you have to set it after each #LinphoneCore startup. \n */\n public void setTlsCert(String tlsCert);\n\n /**\n * Gets the path to the TLS certificate file. \n */\n public String getTlsCertPath();\n\n /**\n * Sets a TLS certificate path used for TLS authentication The path will be stored\n * in the rc file and automatically restored on startup. \n */\n public void setTlsCertPath(String tlsCertPath);\n\n /**\n * Gets the TLS key. \n */\n public String getTlsKey();\n\n /**\n * Sets a TLS key used for TLS authentication The key won't be stored, you have to\n * set it after each #LinphoneCore startup. \n */\n public void setTlsKey(String tlsKey);\n\n /**\n * Gets the path to the TLS key file. \n */\n public String getTlsKeyPath();\n\n /**\n * Sets a TLS key path used for TLS authentication The path will be stored in the\n * rc file and automatically restored on startup. \n */\n public void setTlsKeyPath(String tlsKeyPath);\n\n /**\n * Retrieves the port configuration used for each transport (udp, tcp, tls). \n */\n public Transports getTransports();\n\n /**\n * Sets the ports to be used for each of transport (UDP or TCP) A zero value port\n * for a given transport means the transport is not used. \n */\n public void setTransports(Transports transports);\n\n /**\n * Retrieves the real port number assigned for each sip transport (udp, tcp, tls). \n */\n public Transports getTransportsUsed();\n\n /**\n * get tunnel instance if available \n */\n public Tunnel getTunnel();\n\n /**\n * Return the global unread chat message count. \n */\n public int getUnreadChatMessageCount();\n\n /**\n * Return the unread chat message count for all active local address. \n */\n public int getUnreadChatMessageCountFromActiveLocals();\n\n /**\n * Retrieve the maximum available upload bandwidth. \n */\n public int getUploadBandwidth();\n\n /**\n * Sets maximum available upload bandwidth This is IP bandwidth, in kbit/s. \n */\n public void setUploadBandwidth(int bw);\n\n /**\n * Set audio packetization time linphone will send (in absence of requirement from\n * peer) A value of 0 stands for the current codec default packetization time. \n */\n public int getUploadPtime();\n\n /**\n * Set audio packetization time linphone will send (in absence of requirement from\n * peer) A value of 0 stands for the current codec default packetization time. \n */\n public void setUploadPtime(int ptime);\n\n /**\n * Return the external ip address of router. \n */\n public String getUpnpExternalIpaddress();\n\n /**\n * Return the internal state of uPnP. \n */\n public UpnpState getUpnpState();\n\n /**\n * Gets whether linphone is currently streaming audio from and to files, rather\n * than using the soundcard. \n */\n public boolean getUseFiles();\n\n /**\n * Ask the core to stream audio from and to files, instead of using the soundcard. \n */\n public void setUseFiles(boolean yesno);\n\n /**\n * Indicates whether SIP INFO is used to send digits. \n */\n public boolean getUseInfoForDtmf();\n\n /**\n * Sets whether SIP INFO is to be used to send digits. \n */\n public void setUseInfoForDtmf(boolean useInfo);\n\n /**\n * Indicates whether RFC2833 is used to send digits. \n */\n public boolean getUseRfc2833ForDtmf();\n\n /**\n * Sets whether RFC2833 is to be used to send digits. \n */\n public void setUseRfc2833ForDtmf(boolean useRfc2833);\n\n /**\n */\n public String getUserAgent();\n\n /**\n * Get the path to the directory storing the user's certificates. \n */\n public String getUserCertificatesPath();\n\n /**\n * Set the path to the directory storing the user's x509 certificates (used by\n * dtls) \n */\n public void setUserCertificatesPath(String path);\n\n /**\n * Get the default policy for video. \n */\n public VideoActivationPolicy getVideoActivationPolicy();\n\n /**\n * Sets the default policy for video. \n */\n public void setVideoActivationPolicy(VideoActivationPolicy policy);\n\n /**\n * Tells whether the video adaptive jitter compensation is enabled. \n */\n public boolean videoAdaptiveJittcompEnabled();\n\n /**\n * Enable or disable the video adaptive jitter compensation. \n */\n public void enableVideoAdaptiveJittcomp(boolean enable);\n\n /**\n * Tells whether video capture is enabled. \n */\n public boolean videoCaptureEnabled();\n\n /**\n * Enable or disable video capture. \n */\n public void enableVideoCapture(boolean enable);\n\n /**\n * Returns the name of the currently active video device. \n */\n public String getVideoDevice();\n\n /**\n * Sets the active video device. \n */\n public void setVideoDevice(String id);\n\n /**\n * Gets the list of the available video capture devices. \n */\n public String[] getVideoDevicesList();\n\n /**\n * Tells whether video display is enabled. \n */\n public boolean videoDisplayEnabled();\n\n /**\n * Enable or disable video display. \n */\n public void enableVideoDisplay(boolean enable);\n\n /**\n * Get the name of the mediastreamer2 filter used for rendering video. \n */\n public String getVideoDisplayFilter();\n\n /**\n * Set the name of the mediastreamer2 filter to be used for rendering video. \n */\n public void setVideoDisplayFilter(String filtername);\n\n /**\n * Get the DSCP field for outgoing video streams. \n */\n public int getVideoDscp();\n\n /**\n * Set the DSCP field for outgoing video streams. \n */\n public void setVideoDscp(int dscp);\n\n /**\n * Returns TRUE if either capture or display is enabled, TRUE otherwise. \n */\n public boolean videoEnabled();\n\n /**\n * Returns the nominal video jitter buffer size in milliseconds. \n */\n public int getVideoJittcomp();\n\n /**\n * Sets the nominal video jitter buffer size in milliseconds. \n */\n public void setVideoJittcomp(int milliseconds);\n\n /**\n * Use to get multicast address to be used for video stream. \n */\n public String getVideoMulticastAddr();\n\n /**\n * Use to set multicast address to be used for video stream. \n */\n public void setVideoMulticastAddr(String ip);\n\n /**\n * Use to get multicast state of video stream. \n */\n public boolean videoMulticastEnabled();\n\n /**\n * Use to enable multicast rtp for video stream. \n */\n public void enableVideoMulticast(boolean yesno);\n\n /**\n * Use to get multicast ttl to be used for video stream. \n */\n public int getVideoMulticastTtl();\n\n /**\n * Use to set multicast ttl to be used for video stream. \n */\n public void setVideoMulticastTtl(int ttl);\n\n /**\n * Return the list of the available video payload types. \n */\n public PayloadType[] getVideoPayloadTypes();\n\n /**\n * Redefine the list of the available video payload types. \n */\n public void setVideoPayloadTypes(PayloadType[] payloadTypes);\n\n /**\n * Gets the UDP port used for video streaming. \n */\n public int getVideoPort();\n\n /**\n * Sets the UDP port used for video streaming. \n */\n public void setVideoPort(int port);\n\n /**\n * Get the video port range from which is randomly chosen the UDP port used for\n * video streaming. \n */\n public Range getVideoPortsRange();\n\n /**\n * Get the video preset used for video calls. \n */\n public String getVideoPreset();\n\n /**\n * Set the video preset to be used for video calls. \n */\n public void setVideoPreset(String preset);\n\n /**\n * Tells whether video preview is enabled. \n */\n public boolean videoPreviewEnabled();\n\n /**\n * Controls video preview enablement. \n */\n public void enableVideoPreview(boolean val);\n\n /**\n * Enable or disable video source reuse when switching from preview to actual\n * video call. \n */\n public void enableVideoSourceReuse(boolean enable);\n\n /**\n * Get the path to the file storing the zrtp secrets cache. \n */\n public String getZrtpSecretsFile();\n\n /**\n * Set the path to the file storing the zrtp secrets cache. \n */\n public void setZrtpSecretsFile(String file);\n\n /**\n * Accept an incoming call. \n */\n @Deprecated\n public void acceptCall(Call call);\n\n /**\n * Accept call modifications initiated by other end. \n */\n @Deprecated\n public void acceptCallUpdate(Call call, CallParams params);\n\n /**\n * Accept an incoming call, with parameters. \n */\n @Deprecated\n public void acceptCallWithParams(Call call, CallParams params);\n\n /**\n * Accept an early media session for an incoming call. \n */\n @Deprecated\n public void acceptEarlyMedia(Call call);\n\n /**\n * When receiving an incoming, accept to start a media session as early-media. \n */\n @Deprecated\n public void acceptEarlyMediaWithParams(Call call, CallParams params);\n\n /**\n * Add all current calls into the conference. \n */\n public void addAllToConference();\n\n /**\n * Adds authentication information to the #LinphoneCore. \n */\n public void addAuthInfo(AuthInfo info);\n\n /**\n * Add a friend to the current buddy list, if subscription attribute is set, a\n * SIP SUBSCRIBE message is sent. \n */\n @Deprecated\n public void addFriend(Friend fr);\n\n /**\n * Add a friend list. \n */\n public void addFriendList(FriendList list);\n\n /**\n * Add a proxy configuration. \n */\n public void addProxyConfig(ProxyConfig config);\n\n /**\n * This function controls signaling features supported by the core. \n */\n public void addSupportedTag(String tag);\n\n /**\n * Add a participant to the conference. \n */\n public void addToConference(Call call);\n\n /**\n * Checks if a new version of the application is available. \n */\n public void checkForUpdate(String currentVersion);\n\n /**\n * Clear all authentication information. \n */\n public void clearAllAuthInfo();\n\n /**\n * Erase the call log. \n */\n public void clearCallLogs();\n\n /**\n * Erase all proxies from config. \n */\n public void clearProxyConfig();\n\n /**\n * Create a #LinphoneAccountCreator and set Linphone Request callbacks. \n */\n public AccountCreator createAccountCreator(String xmlrpcUrl);\n\n /**\n * Create a #LinphoneAddress object by parsing the user supplied address, given as\n * a string. \n */\n public Address createAddress(String address);\n\n /**\n * Create an authentication information with default values from Linphone core. \n */\n public AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);\n\n /**\n * Creates a fake LinphoneCallLog. \n */\n public CallLog createCallLog(Address from, Address to, Call.Dir dir, int duration, long startTime, long connectedTime, Call.Status status, boolean videoEnabled, float quality);\n\n /**\n * Create a #LinphoneCallParams suitable for linphone_core_invite_with_params(),\n * linphone_core_accept_call_with_params(),\n * linphone_core_accept_early_media_with_params(),\n * linphone_core_accept_call_update(). \n */\n public CallParams createCallParams(Call call);\n\n /**\n * Create a client-side group chat room. \n */\n public ChatRoom createClientGroupChatRoom(String subject, boolean fallback);\n\n /**\n * Create some default conference parameters for instanciating a a conference with\n * linphone_core_create_conference_with_params(). \n */\n public ConferenceParams createConferenceParams();\n\n /**\n * Create a conference. \n */\n public Conference createConferenceWithParams(ConferenceParams params);\n\n /**\n * Create a #LinphoneConfig object from a user config file. \n */\n public Config createConfig(String filename);\n\n /**\n * Create a content with default values from Linphone core. \n */\n public Content createContent();\n\n /**\n * Create a default LinphoneFriend. \n */\n public Friend createFriend();\n\n /**\n * Create a new empty #LinphoneFriendList object. \n */\n public FriendList createFriendList();\n\n /**\n * Create a #LinphoneFriend from the given address. \n */\n public Friend createFriendWithAddress(String address);\n\n /**\n * Creates an empty info message. \n */\n public InfoMessage createInfoMessage();\n\n /**\n * Create an independent media file player. \n */\n public Player createLocalPlayer(String soundCardName, String videoDisplayName, Object windowId);\n\n /**\n * Create a #LinphoneMagicSearch object. \n */\n public MagicSearch createMagicSearch();\n\n /**\n * Create a new #LinphoneNatPolicy object with every policies being disabled. \n */\n public NatPolicy createNatPolicy();\n\n /**\n * Create a new #LinphoneNatPolicy by reading the config of a #LinphoneCore\n * according to the passed ref. \n */\n public NatPolicy createNatPolicyFromConfig(String ref);\n\n /**\n * Create an out-of-dialog notification, specifying the destination resource, the\n * event name. \n */\n public Event createNotify(Address resource, String event);\n\n /**\n * Create a publish context for a one-shot publish. \n */\n public Event createOneShotPublish(Address resource, String event);\n\n /**\n * Create a #LinphonePresenceActivity with the given type and description. \n */\n public PresenceActivity createPresenceActivity(PresenceActivity.Type acttype, String description);\n\n /**\n * Create a default LinphonePresenceModel. \n */\n public PresenceModel createPresenceModel();\n\n /**\n * Create a #LinphonePresenceModel with the given activity type and activity\n * description. \n */\n public PresenceModel createPresenceModelWithActivity(PresenceActivity.Type acttype, String description);\n\n /**\n * Create a #LinphonePresenceModel with the given activity type, activity\n * description, note content and note language. \n */\n public PresenceModel createPresenceModelWithActivityAndNote(PresenceActivity.Type acttype, String description, String note, String lang);\n\n /**\n * Create a #LinphonePresenceNote with the given content and language. \n */\n public PresenceNote createPresenceNote(String content, String lang);\n\n /**\n * Create a #LinphonePresencePerson with the given id. \n */\n public PresencePerson createPresencePerson(String id);\n\n /**\n * Create a #LinphonePresenceService with the given id, basic status and contact. \n */\n public PresenceService createPresenceService(String id, PresenceBasicStatus basicStatus, String contact);\n\n /**\n * Create a proxy config with default values from Linphone core. \n */\n public ProxyConfig createProxyConfig();\n\n /**\n * Create a publish context for an event state. \n */\n public Event createPublish(Address resource, String event, int expires);\n\n /**\n * Create an outgoing subscription, specifying the destination resource, the event\n * name, and an optional content body. \n */\n public Event createSubscribe(Address resource, String event, int expires);\n\n /**\n * Create a #LinphoneXmlRpcSession for a given url. \n */\n public XmlRpcSession createXmlRpcSession(String url);\n\n /**\n * Decline a pending incoming call, with a reason. \n */\n @Deprecated\n public void declineCall(Call call, Reason reason);\n\n /**\n * When receiving a #LinphoneCallUpdatedByRemote state notification, prevent\n * #LinphoneCore from performing an automatic answer. \n */\n @Deprecated\n public void deferCallUpdate(Call call);\n\n /**\n * Removes a chatroom including all message history from the LinphoneCore. \n */\n public void deleteChatRoom(ChatRoom cr);\n\n /**\n * Inconditionnaly disable incoming chat messages. \n */\n public void disableChat(Reason denyReason);\n\n /**\n * Enable reception of incoming chat messages. \n */\n public void enableChat();\n\n /**\n * Tells to #LinphoneCore to use Linphone Instant Messaging encryption. \n */\n public void enableLime(LimeState val);\n\n /**\n * This method is called by the application to notify the linphone core library\n * when it enters background mode. \n */\n public void enterBackground();\n\n /**\n * Join the local participant to the running conference. \n */\n public void enterConference();\n\n /**\n * This method is called by the application to notify the linphone core library\n * when it enters foreground mode. \n */\n public void enterForeground();\n\n /**\n * Returns whether a specific file format is supported. \n */\n public boolean fileFormatSupported(String fmt);\n\n /**\n * Find authentication info matching realm, username, domain criteria. \n */\n public AuthInfo findAuthInfo(String realm, String username, String sipDomain);\n\n /**\n * Search from the list of current calls if a remote address match uri. \n */\n public Call findCallFromUri(String uri);\n\n /**\n * Get the call log matching the call id, or NULL if can't be found. \n */\n public CallLog findCallLogFromCallId(String callId);\n\n /**\n * Find a chat room. \n */\n public ChatRoom findChatRoom(Address peerAddr, Address localAddr);\n\n /**\n * Retrieves a list of #LinphoneAddress sort and filter. \n */\n public Address[] findContactsByChar(String filter, boolean sipOnly);\n\n /**\n * Search a #LinphoneFriend by its address. \n */\n public Friend findFriend(Address addr);\n\n /**\n * Find a one to one chat room. \n */\n public ChatRoom findOneToOneChatRoom(Address localAddr, Address participantAddr);\n\n /**\n * Get the call with the remote_address specified. \n */\n public Call getCallByRemoteAddress(String remoteAddress);\n\n /**\n * Get the call with the remote_address specified. \n */\n public Call getCallByRemoteAddress2(Address remoteAddress);\n\n /**\n * Get the list of call logs (past calls) that matches the given #LinphoneAddress. \n */\n public CallLog[] getCallHistoryForAddress(Address addr);\n\n /**\n * Get a basic chat room. \n */\n public ChatRoom getChatRoom(Address peerAddr, Address localAddr);\n\n /**\n * Get a basic chat room whose peer is the supplied address. \n */\n public ChatRoom getChatRoom(Address addr);\n\n /**\n * Get a basic chat room for messaging from a sip uri like\n * sip:joe@sip.linphone.org. \n */\n public ChatRoom getChatRoomFromUri(String to);\n\n /**\n * Search a #LinphoneFriend by its reference key. \n */\n public Friend getFriendByRefKey(String key);\n\n /**\n * Retrieves the list of #LinphoneFriend from the core that has the given display\n * name. \n */\n public FriendList getFriendListByName(String name);\n\n /**\n * Get payload type from mime type and clock rate. \n */\n public PayloadType getPayloadType(String type, int rate, int channels);\n\n /**\n * Return the unread chat message count for a given local address. \n */\n public int getUnreadChatMessageCountFromLocal(Address address);\n\n /**\n * Check whether the device has a hardware echo canceller. \n */\n public boolean hasBuiltinEchoCanceller();\n\n /**\n * Check whether the device is flagged has crappy opengl. \n */\n public boolean hasCrappyOpengl();\n\n /**\n * Tells whether there is a call running. \n */\n public boolean inCall();\n\n /**\n * See linphone_proxy_config_normalize_sip_uri for documentation. \n */\n public Address interpretUrl(String url);\n\n /**\n * Initiates an outgoing call. \n */\n public Call invite(String url);\n\n /**\n * Initiates an outgoing call given a destination #LinphoneAddress The\n * #LinphoneAddress can be constructed directly using linphone_address_new, or\n * created by linphone_core_interpret_url(). \n */\n public Call inviteAddress(Address addr);\n\n /**\n * Initiates an outgoing call given a destination #LinphoneAddress The\n * #LinphoneAddress can be constructed directly using linphone_address_new, or\n * created by linphone_core_interpret_url(). \n */\n public Call inviteAddressWithParams(Address addr, CallParams params);\n\n /**\n * Initiates an outgoing call according to supplied call parameters The\n * application doesn't own a reference to the returned #LinphoneCall object. \n */\n public Call inviteWithParams(String url, CallParams params);\n\n /**\n * Main loop function. \n */\n public void iterate();\n\n /**\n * Make the local participant leave the running conference. \n */\n public void leaveConference();\n\n /**\n * Tells if lime is available. \n */\n public boolean limeAvailable();\n\n /**\n * Returns the lime state. \n */\n public LimeState limeEnabled();\n\n /**\n * Check if a media encryption type is supported. \n */\n public boolean mediaEncryptionSupported(MediaEncryption menc);\n\n /**\n * Migrates the call logs from the linphonerc to the database if not done yet. \n */\n public void migrateLogsFromRcToDb();\n\n /**\n * Migrate configuration so that all SIP transports are enabled. \n */\n public void migrateToMultiTransport();\n\n /**\n * Notify all friends that have subscribed. \n */\n public void notifyAllFriends(PresenceModel presence);\n\n /**\n * Notifies the upper layer that a presence status has been received by calling\n * the appropriate callback if one has been set. \n */\n public void notifyNotifyPresenceReceived(Friend lf);\n\n /**\n * Notifies the upper layer that a presence model change has been received for the\n * uri or telephone number given as a parameter, by calling the appropriate\n * callback if one has been set. \n */\n public void notifyNotifyPresenceReceivedForUriOrTel(Friend lf, String uriOrTel, PresenceModel presenceModel);\n\n /**\n * Pause all currently running calls. \n */\n public void pauseAllCalls();\n\n /**\n * Pauses the call. \n */\n @Deprecated\n public void pauseCall(Call call);\n\n /**\n * Plays a dtmf sound to the local user. \n */\n public void playDtmf(char dtmf, int durationMs);\n\n /**\n * Plays an audio file to the local user. \n */\n public void playLocal(String audiofile);\n\n /**\n * Call generic OpenGL render for a given core. \n */\n public void previewOglRender();\n\n /**\n * Publish an event state. \n */\n public Event publish(Address resource, String event, int expires, Content body);\n\n /**\n * Redirect the specified call to the given redirect URI. \n */\n @Deprecated\n public void redirectCall(Call call, String redirectUri);\n\n /**\n * force registration refresh to be initiated upon next iterate \n */\n public void refreshRegisters();\n\n /**\n * Black list a friend. \n */\n public void rejectSubscriber(Friend lf);\n\n /**\n * Reload mediastreamer2 plugins from specified directory. \n */\n public void reloadMsPlugins(String path);\n\n /**\n * Update detection of sound devices. \n */\n public void reloadSoundDevices();\n\n /**\n * Update detection of camera devices. \n */\n public void reloadVideoDevices();\n\n /**\n * Removes an authentication information object. \n */\n public void removeAuthInfo(AuthInfo info);\n\n /**\n * Remove a specific call log from call history list. \n */\n public void removeCallLog(CallLog callLog);\n\n /**\n * Removes a friend list. \n */\n public void removeFriendList(FriendList list);\n\n /**\n * Remove a call from the conference. \n */\n public void removeFromConference(Call call);\n\n /**\n * Removes a proxy configuration. \n */\n public void removeProxyConfig(ProxyConfig config);\n\n /**\n * Remove a supported tag. \n */\n public void removeSupportedTag(String tag);\n\n /**\n * Reset the counter of missed calls. \n */\n public void resetMissedCallsCount();\n\n /**\n * Resumes a call. \n */\n @Deprecated\n public void resumeCall(Call call);\n\n /**\n * Sets the UDP port range from which to randomly select the port used for audio\n * streaming. \n */\n public void setAudioPortRange(int minPort, int maxPort);\n\n /**\n * Assign an audio file to be played locally upon call failure, for a given\n * reason. \n */\n public void setCallErrorTone(Reason reason, String audiofile);\n\n /**\n * Sets the account and device for friend where call logs will be stored. \n */\n public void setCallLogsFriend(String account, String device);\n\n /**\n * Set the rectangle where the decoder will search a QRCode. \n */\n public void setQrcodeDecodeRect(int x, int y, int w, int h);\n\n /**\n * Sets the UDP port range from which to randomly select the port used for text\n * streaming. \n */\n public void setTextPortRange(int minPort, int maxPort);\n\n /**\n * Sets the user agent string used in SIP messages, ideally called just after\n * linphone_core_new or linphone_core_init(). \n */\n public void setUserAgent(String uaName, String version);\n\n /**\n * Sets the UDP port range from which to randomly select the port used for video\n * streaming. \n */\n public void setVideoPortRange(int minPort, int maxPort);\n\n /**\n * Tells whether a specified sound device can capture sound. \n */\n public boolean soundDeviceCanCapture(String device);\n\n /**\n * Tells whether a specified sound device can play sound. \n */\n public boolean soundDeviceCanPlayback(String device);\n\n /**\n * Check if a call will need the sound resources in near future (typically an\n * outgoing call that is awaiting response). \n */\n public boolean soundResourcesLocked();\n\n /**\n * Start a #LinphoneCore object after it has been instantiated. \n */\n public void start();\n\n /**\n * Start recording the running conference. \n */\n public void startConferenceRecording(String path);\n\n /**\n * Special function to warm up dtmf feeback stream. \n */\n public void startDtmfStream();\n\n /**\n * Starts an echo calibration of the sound devices, in order to find adequate\n * settings for the echo canceler automatically. \n */\n public void startEchoCancellerCalibration();\n\n /**\n * Start the simulation of call to test the latency with an external device. \n */\n public void startEchoTester(int rate);\n\n /**\n * Stop recording the running conference. \n */\n public void stopConferenceRecording();\n\n /**\n * Stops playing a dtmf started by linphone_core_play_dtmf(). \n */\n public void stopDtmf();\n\n /**\n * Special function to stop dtmf feed back function. \n */\n public void stopDtmfStream();\n\n /**\n * Stop the simulation of call. \n */\n public void stopEchoTester();\n\n /**\n * Whenever the liblinphone is playing a ring to advertise an incoming call or\n * ringback of an outgoing call, this function stops the ringing. \n */\n public void stopRinging();\n\n /**\n * Create an outgoing subscription, specifying the destination resource, the event\n * name, and an optional content body. \n */\n public Event subscribe(Address resource, String event, int expires, Content body);\n\n /**\n * Take a photo of currently from capture device and write it into a jpeg file. \n */\n public void takePreviewSnapshot(String file);\n\n /**\n * Terminates all the calls. \n */\n public void terminateAllCalls();\n\n /**\n * Terminates a call. \n */\n @Deprecated\n public void terminateCall(Call call);\n\n /**\n * Terminate the running conference. \n */\n public void terminateConference();\n\n /**\n * Performs a simple call transfer to the specified destination. \n */\n @Deprecated\n public void transferCall(Call call, String referTo);\n\n /**\n * Transfers a call to destination of another running call. \n */\n @Deprecated\n public void transferCallToAnother(Call call, Call dest);\n\n /**\n * Updates a running call according to supplied call parameters or parameters\n * changed in the LinphoneCore. \n */\n @Deprecated\n public void updateCall(Call call, CallParams params);\n\n /**\n * Upload the log collection to the configured server url. \n */\n public void uploadLogCollection();\n\n /**\n * Tells the core to use a separate window for local camera preview video, instead\n * of inserting local view within the remote video window. \n */\n public void usePreviewWindow(boolean yesno);\n\n /**\n * Specify whether the tls server certificate must be verified when connecting to\n * a SIP/TLS server. \n */\n public void verifyServerCertificates(boolean yesno);\n\n /**\n * Specify whether the tls server certificate common name must be verified when\n * connecting to a SIP/TLS server. \n */\n public void verifyServerCn(boolean yesno);\n\n /**\n * Test if video is supported. \n */\n public boolean videoSupported();\n\n /**\n * Compress the log collection in a single file. \n */\n public String compressLogCollection();\n\n /**\n * Enable the linphone core log collection to upload logs on a server. \n */\n public void enableLogCollection(LogCollectionState state);\n\n /**\n * Get the max file size in bytes of the files used for log collection. \n */\n public int getLogCollectionMaxFileSize();\n\n /**\n * Get the path where the log files will be written for log collection. \n */\n public String getLogCollectionPath();\n\n /**\n * Get the prefix of the filenames that will be used for log collection. \n */\n public String getLogCollectionPrefix();\n\n /**\n * Get defined log level mask. \n */\n @Deprecated\n public int getLogLevelMask();\n\n /**\n * Returns liblinphone's version as a string. \n */\n public String getVersion();\n\n /**\n * Tells whether the linphone core log collection is enabled. \n */\n public LogCollectionState logCollectionEnabled();\n\n /**\n * Reset the log collection by removing the log files. \n */\n public void resetLogCollection();\n\n /**\n * Enable logs serialization (output logs from either the thread that creates the\n * linphone core or the thread that calls linphone_core_iterate()). \n */\n public void serializeLogs();\n\n /**\n * Set the max file size in bytes of the files used for log collection. \n */\n public void setLogCollectionMaxFileSize(int size);\n\n /**\n * Set the path of a directory where the log files will be written for log\n * collection. \n */\n public void setLogCollectionPath(String path);\n\n /**\n * Set the prefix of the filenames that will be used for log collection. \n */\n public void setLogCollectionPrefix(String prefix);\n\n /**\n * Define the log level using mask. \n */\n @Deprecated\n public void setLogLevelMask(int mask);\n\n /**\n * True if tunnel support was compiled. \n */\n public boolean tunnelAvailable();\n\n /**\n * Return the availability of uPnP. \n */\n public boolean upnpAvailable();\n\n /**\n * Tells whether VCARD support is builtin. \n */\n public boolean vcardSupported();\n\n public void addListener(CoreListener listener);\n\n public void removeListener(CoreListener listener);\n\n /**\n * Sets the object to store in this object user's data\n */\n public void setUserData(Object data);\n\n /**\n * Gets the object stored in this object user's data\n */\n public Object getUserData();\n}", "public interface IPacketProcessor {\n\n\t/**\n\t * Processes the incoming chat message.\n\t * \n\t * @param msg The message.\n\t * @param addr The sender of the the message.\n\t * @param port The port of the sender.\n\t */\n\tvoid processMessage(JSONObject msg, InetAddress addr, int port);\n\t\n\t/**\n\t * Notifies the observers of an error during the connection process\n\t * \n\t * @param notification A detailed notification.\n\t */\n\tvoid onError(ModelNotification notification);\n\t\n\t/**\n\t * Notifies the observers of the establishment of the connection\n\t */\n\tvoid onSuccessfulStarted();\n\t\n}", "public String speak() {\n return \"WOOF\";\n }", "public interface Sendable {\n /**\n * Raw message to send\n */\n String getRawMessage();\n}", "public abstract void diceMessage(Message m);", "public abstract void updateWhatsOn();", "public interface MessageProcessor{\n\n public void execMessage(MessageWrapper messageWrapper);\n}", "@Override\n\tpublic void requestHandle(IPlayer player, IMessage message) {\n\t\t\n\t}", "public interface WsResponse {\n /**\n * Sends textual content to the client.\n * @param content The text to send.\n */\n void sendText(String content);\n\n /**\n * Sends the given object serialized as JSON to the client.\n * @param data The object to send as JSON.\n */\n void sendJson(Object data);\n\n /**\n * Sends binary data to the client.\n * @param data A byte array containing the data to send.\n */\n default void sendBinary(byte[] data) {\n ByteBuffer buffer = ByteBuffer.wrap(data);\n sendBinary(buffer);\n }\n\n /**\n * Sends binary data to the client.\n * @param data A byte array containing the data to send.\n * @param offset An offset into the array at the start of the data to send.\n * @param length The number of bytes from the starting offset to send.\n */\n default void sendBinary(byte[] data, int offset, int length) {\n ByteBuffer buffer = ByteBuffer.wrap(data, offset, length);\n sendBinary(buffer);\n }\n\n /**\n * Send binary data to the client.\n * @param buffer A {@link ByteBuffer} wrapping the data to send.\n */\n void sendBinary(ByteBuffer buffer);\n}", "@Override\n public void perish() {\n \n }", "@Override\n public void onPMessage(String s, String s1, String s2) {\n }", "public interface MessageWriter {\n /**\n * Generic \"send\" method takes an EventStore, which is used to lookup stored variables\n * and a Template, which describes what to put in the message.\n * @param es The EventStore to use to lookup variables.\n * @param template The key/value pairs to send\n */\n\tpublic void send(EventStore es, Template template);\n}", "public interface IUMSender {\n void start();\n void send(Context context, UMDB umdb);\n}", "public Response onResponse(Response response) {\n\t\tlog.info(\"chatbot shouting\");\n\n\t\t// String r = resizeImage(response.msg);\n\t\tString r = response.msg;\n\n\t\tconns.addConnection(\"mr.turing\", \"mr.turing\");\n\n\t\tShout shout = createShout(TYPE_USER, r);\n\t\tshout.from = \"mr.turing\";\n\t\tMessage out = createMessage(\"shoutclient\", \"onShout\", Encoder.toJson(shout));\n\t\tonShout(\"mr.turing\", out);\n\t\treturn response;\n\t}", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "public void processMessage(Chat chat, Message message)\n {\n }", "@Override\n public void start(){\n final ChannelProcessor channel = getChannelProcessor();\n\n final Map<String, String> headers = new HashMap<String, String>();\n\n // The StatusListener is a twitter4j API, which can be added to a Twitter\n // stream, and will execute methods every time a message comes in through\n // the stream.\n StatusListener statusListener = new StatusListener() {\n // The onStatus method is executed every time a new tweet comes in.\n @Override\n public void onStatus(Status status) {\n // The EventBuilder is used to build an event using the headers and\n // the raw JSON of a tweet\n // shouldn't log possibly sensitive customer data\n //logger.debug(\"tweet arrived\");\n\n headers.put(\"timestamp\",String.valueOf(status.getCreatedAt().getTime()));\n\n Event event1;\n event1 = EventBuilder.withBody(TwitterObjectFactory.getRawJSON(status).getBytes(),headers);\n //event2 = EventBuilder.withBody(Integer.toString(status.getRetweetCount()),(Charset)headers);\n //event3 = EventBuilder.withBody(status.getText().getBytes(), headers);\n channel.processEvent(event1);\n //channel.processEvent(event2);\n\n }\n\n @Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n\n }\n @Override public void onTrackLimitationNotice(int i) {\n\n }\n @Override public void onScrubGeo(long l, long l1) {\n\n }\n @Override public void onStallWarning(StallWarning stallWarning) {\n\n }\n @Override public void onException(Exception e) {\n\n }\n };\n\n twitterStream.addListener(statusListener);\n\n if(keywords.length != 0){\n FilterQuery filterQuery = new FilterQuery().track(keywords);\n twitterStream.filter(filterQuery);\n }else{\n twitterStream.sample();\n }\n super.start();\n }", "public String Speak()\n {\n if(this.age < 2)\n {\n\n } //end if\n return \"Woof\";\n }", "String getRawMessage();", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.521 -0500\", hash_original_method = \"23E4A4D5EBFE681605B0582F17F8E799\", hash_generated_method = \"2407FCFDBD809792EEC39AD82D87DDCA\")\n \npublic void sendMessage(int what, int arg1, int arg2) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n sendMessage(msg);\n }", "public interface ITransportHandler {\n\n /**\n * Processing device returned messages\n * \n * @author\n * @param devReplyStr Message information returned by the device\n */\n void handlePacket(String devReplyStr);\n\n /**\n * Error information processing apparatus returns <br>\n * \n * @author\n * @param devReplyErr Error messages returned by the device\n */\n void handleError(String devReplyErr);\n\n /**\n * Device interaction with the end of the glyph packets <br>\n * \n * @author\n * @return End glyph packets\n */\n String getPacketEndTag();\n\n /**\n * Encoding packets\n * \n * @author\n * @return Encoding packets\n */\n String getCharsetName();\n\n}", "public interface IStreamAwareScopeHandler extends IScopeHandler {\r\n\t/**\r\n\t * A broadcast stream starts being published. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamPublishStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * A broadcast stream starts being recorded. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream \r\n\t */\r\n\tpublic void streamRecordStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastClose(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberStart(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberClose(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a playlist item plays.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t * @param isLive treu if live\r\n\t * TODO\r\n\t */\r\n\tpublic void streamPlaylistItemPlay(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, boolean isLive);\r\n\r\n\t/**\r\n\t * Notified when a playlist item stops.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t */\r\n\tpublic void streamPlaylistItemStop(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item pauses.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemPause(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item resumes.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemResume(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item seeks.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemSeek(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n}", "void tell(String message, Result<Actor<InputOutput>> sender);", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.524 -0500\", hash_original_method = \"066946089A5EEE9700468FE67EE373C2\", hash_generated_method = \"39D30A18E3CBA1A0CA0CA065CE6FFE58\")\n \npublic void sendMessage(int what, int arg1, int arg2, Object obj) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n msg.obj = obj;\n sendMessage(msg);\n }" ]
[ "0.6699422", "0.62887806", "0.5845896", "0.57235265", "0.56356597", "0.5594465", "0.55819017", "0.5579688", "0.55057836", "0.55037034", "0.54924107", "0.5466897", "0.5460845", "0.54544824", "0.54544824", "0.54544824", "0.54540104", "0.54487425", "0.5426496", "0.5425663", "0.5381709", "0.5359607", "0.53590953", "0.5332662", "0.53322774", "0.53231794", "0.5311537", "0.53074765", "0.5306367", "0.5304808", "0.5304046", "0.52922845", "0.52810764", "0.52753174", "0.52621907", "0.5251977", "0.5250379", "0.52457446", "0.52435076", "0.5235652", "0.52348876", "0.5228366", "0.5224697", "0.52030426", "0.51991755", "0.51923394", "0.51867557", "0.5185131", "0.51818216", "0.5180605", "0.51793325", "0.5176181", "0.5171469", "0.5171343", "0.51510084", "0.51499474", "0.5149135", "0.5146039", "0.5135122", "0.5134592", "0.5109403", "0.5108502", "0.51080686", "0.5102354", "0.51010305", "0.5100974", "0.50923896", "0.5088644", "0.5083846", "0.507592", "0.5072956", "0.5069435", "0.50649446", "0.50539744", "0.5047644", "0.50466824", "0.5041531", "0.50413424", "0.5039309", "0.5037009", "0.5028193", "0.50232506", "0.5020937", "0.50141656", "0.50141245", "0.50109595", "0.5008448", "0.49996626", "0.49871576", "0.49869934", "0.49855754", "0.4983667", "0.4980462", "0.49799547", "0.4976669", "0.49685594", "0.4966988", "0.49658728", "0.49656677", "0.49624977", "0.4962042" ]
0.0
-1
Find the _Fields constant that matches fieldId, or null if its not found.
public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // COMB_INSTRUMENT_ID return COMB_INSTRUMENT_ID; case 2: // LEG_ID return LEG_ID; case 3: // LEG_INSTRUMENT_ID return LEG_INSTRUMENT_ID; default: return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_IDS\n return REFERRAL_LOG_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_ID\n return REFERRAL_LOG_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RECOM_ID\n return RECOM_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // BINDING_PARAMS\n return BINDING_PARAMS;\n case 2: // BIND_SOURCE\n return BIND_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_EMPLOYEE_DOS\n return USER_EMPLOYEE_DOS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RESOURCE_PLAN_NAME\n return RESOURCE_PLAN_NAME;\n case 2: // POOL_PATH\n return POOL_PATH;\n case 3: // ALLOC_FRACTION\n return ALLOC_FRACTION;\n case 4: // QUERY_PARALLELISM\n return QUERY_PARALLELISM;\n case 5: // SCHEDULING_POLICY\n return SCHEDULING_POLICY;\n case 6: // IS_SET_SCHEDULING_POLICY\n return IS_SET_SCHEDULING_POLICY;\n case 7: // NS\n return NS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // PAGE_NUMBER\n return PAGE_NUMBER;\n case 4: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // TOTAL_FILES_MATERIALIZED_COUNT\n return TOTAL_FILES_MATERIALIZED_COUNT;\n case 2: // FILES_MATERIALIZED_FROM_CASCOUNT\n return FILES_MATERIALIZED_FROM_CASCOUNT;\n case 3: // TOTAL_TIME_SPENT_MATERIALIZING_FILES_FROM_CASMILLIS\n return TOTAL_TIME_SPENT_MATERIALIZING_FILES_FROM_CASMILLIS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // SOURCE\n return SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // TIMESPAN\n return TIMESPAN;\n case 4: // PAGE_NUM\n return PAGE_NUM;\n case 5: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACTIVATION_CODEE\n return ACTIVATION_CODEE;\n case 2: // BIND_EMAIL_SOURCE\n return BIND_EMAIL_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // DATA\n return DATA;\n case 2: // FILE_ID\n return FILE_ID;\n case 3: // SIZE\n return SIZE;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // FILE_PATH\n return FILE_PATH;\n case 2: // OUTPUT_DIR\n return OUTPUT_DIR;\n case 3: // SUBSET\n return SUBSET;\n case 4: // TYPES\n return TYPES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // PROCESS_ID\n return PROCESS_ID;\n case 3: // APPLICATION_INTERFACE_ID\n return APPLICATION_INTERFACE_ID;\n case 4: // COMPUTE_RESOURCE_ID\n return COMPUTE_RESOURCE_ID;\n case 5: // QUEUE_NAME\n return QUEUE_NAME;\n case 6: // NODE_COUNT\n return NODE_COUNT;\n case 7: // CORE_COUNT\n return CORE_COUNT;\n case 8: // WALL_TIME_LIMIT\n return WALL_TIME_LIMIT;\n case 9: // PHYSICAL_MEMORY\n return PHYSICAL_MEMORY;\n case 10: // STATUSES\n return STATUSES;\n case 11: // ERRORS\n return ERRORS;\n case 12: // CREATED_AT\n return CREATED_AT;\n case 13: // UPDATED_AT\n return UPDATED_AT;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // PARAM_MAP\n return PARAM_MAP;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACCOUNT_IDS\n return ACCOUNT_IDS;\n case 2: // COMMODITY_IDS\n return COMMODITY_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // M_COMMAND_TYPE\n return M_COMMAND_TYPE;\n case 2: // M_BLOCK_IDS\n return M_BLOCK_IDS;\n case 3: // M_FILE_PATH\n return M_FILE_PATH;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACCESS_KEY\n return ACCESS_KEY;\n case 2: // ENTITY_IDS\n return ENTITY_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // PID\n return PID;\n case 2: // CUS_PER_BASE\n return CUS_PER_BASE;\n case 3: // TOTAL_ASSETS\n return TOTAL_ASSETS;\n case 4: // TOTAL_LIAB\n return TOTAL_LIAB;\n case 5: // FAMILY_ASSETS\n return FAMILY_ASSETS;\n case 6: // YEAR_PAY\n return YEAR_PAY;\n case 7: // MONTH_WAGE\n return MONTH_WAGE;\n case 8: // FAMILY_INCOME\n return FAMILY_INCOME;\n case 9: // FAMILY_CONTROL\n return FAMILY_CONTROL;\n case 10: // STATUS\n return STATUS;\n case 11: // ASSETS_DETAIL\n return ASSETS_DETAIL;\n case 12: // LIAB_DETAIL\n return LIAB_DETAIL;\n case 13: // MONTHLY_PAYMENT\n return MONTHLY_PAYMENT;\n case 14: // OVERDRAFT\n return OVERDRAFT;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // FILE_PATH\n return FILE_PATH;\n case 2: // DIR_NAME\n return DIR_NAME;\n case 3: // FILE_LENGTH\n return FILE_LENGTH;\n case 4: // DK_FILE_CONF\n return DK_FILE_CONF;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // FILE_PATH\n return FILE_PATH;\n case 2: // DIR_NAME\n return DIR_NAME;\n case 3: // FILE_LENGTH\n return FILE_LENGTH;\n case 4: // DK_FILE_CONF\n return DK_FILE_CONF;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // NOME\n return NOME;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // NOME\n return NOME;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // LOG_INFO\n return LOG_INFO;\n case 2: // PARAMS\n return PARAMS;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // LOG_INFO\n return LOG_INFO;\n case 2: // PARAMS\n return PARAMS;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // LOG_INFO\n return LOG_INFO;\n case 2: // PARAMS\n return PARAMS;\n default:\n return null;\n }\n }" ]
[ "0.7988653", "0.79170144", "0.7882797", "0.7882797", "0.7882797", "0.7882797", "0.7882797", "0.7882797", "0.77881694", "0.77813965", "0.7731311", "0.7729709", "0.77236223", "0.7714694", "0.7714694", "0.77117044", "0.77109355", "0.7703194", "0.7701422", "0.7697595", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7680702", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.7674042", "0.76717323", "0.76717323", "0.7665698", "0.76647735", "0.76647735", "0.76647735", "0.76647735", "0.76647735", "0.76647735", "0.76647735", "0.765072", "0.76464665", "0.7645925", "0.763697", "0.7623997", "0.7623005", "0.7620548", "0.76139957", "0.76139957", "0.7613864", "0.7608421", "0.7604058", "0.7604058", "0.7604058", "0.7604058", "0.7604058", "0.760295", "0.75987667", "0.75987667", "0.75983304", "0.75983304", "0.75946593", "0.75946593", "0.75946593" ]
0.7689275
20
Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_IDS\n return REFERRAL_LOG_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_ID\n return REFERRAL_LOG_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RECOM_ID\n return RECOM_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // PROCESS_ID\n return PROCESS_ID;\n case 3: // APPLICATION_INTERFACE_ID\n return APPLICATION_INTERFACE_ID;\n case 4: // COMPUTE_RESOURCE_ID\n return COMPUTE_RESOURCE_ID;\n case 5: // QUEUE_NAME\n return QUEUE_NAME;\n case 6: // NODE_COUNT\n return NODE_COUNT;\n case 7: // CORE_COUNT\n return CORE_COUNT;\n case 8: // WALL_TIME_LIMIT\n return WALL_TIME_LIMIT;\n case 9: // PHYSICAL_MEMORY\n return PHYSICAL_MEMORY;\n case 10: // STATUSES\n return STATUSES;\n case 11: // ERRORS\n return ERRORS;\n case 12: // CREATED_AT\n return CREATED_AT;\n case 13: // UPDATED_AT\n return UPDATED_AT;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // PID\n return PID;\n case 2: // EXCEPTION_ID\n return EXCEPTION_ID;\n case 3: // USER_ID\n return USER_ID;\n case 4: // REPORT_DATE\n return REPORT_DATE;\n case 5: // UN_ASSURE_CONDITION\n return UN_ASSURE_CONDITION;\n case 6: // HOUSE_PROPERY_CONDITION\n return HOUSE_PROPERY_CONDITION;\n case 7: // REMARK\n return REMARK;\n case 8: // CREATE_DATE\n return CREATE_DATE;\n case 9: // CREATE_ID\n return CREATE_ID;\n case 10: // UPDATE_DATE\n return UPDATE_DATE;\n case 11: // UPDATE_ID\n return UPDATE_ID;\n case 12: // PROJECT_ID\n return PROJECT_ID;\n case 13: // LEGAL_LIST\n return LEGAL_LIST;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // SOURCE\n return SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_EMPLOYEE_DOS\n return USER_EMPLOYEE_DOS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // PAGE_NUMBER\n return PAGE_NUMBER;\n case 4: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // TIMESPAN\n return TIMESPAN;\n case 4: // PAGE_NUM\n return PAGE_NUM;\n case 5: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // BINDING_PARAMS\n return BINDING_PARAMS;\n case 2: // BIND_SOURCE\n return BIND_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACTIVATION_CODEE\n return ACTIVATION_CODEE;\n case 2: // BIND_EMAIL_SOURCE\n return BIND_EMAIL_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // POSITION_ID\n return POSITION_ID;\n case 3: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // APP_CODE\n \treturn APP_CODE;\n case 2: // REQUEST_DATE\n \treturn REQUEST_DATE;\n case 3: // SIGN\n \treturn SIGN;\n case 4: // SP_ID\n \treturn SP_ID;\n case 5: // OUT_ORDER_ID\n \treturn OUT_ORDER_ID;\n case 6: // DEVICE_NO\n \treturn DEVICE_NO;\n case 7: // DEVICE_TYPE\n \treturn DEVICE_TYPE;\n case 8: // PROVINCE_ID\n \treturn PROVINCE_ID;\n case 9: // CUST_ID\n \treturn CUST_ID;\n case 10: // NUM\n \treturn NUM;\n case 11: // REMARK\n \treturn REMARK;\n case 12: // ACTIVE_ID\n \treturn ACTIVE_ID;\n case 13: // EXP_TIME\n \treturn EXP_TIME;\n default:\n \treturn null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // DATA\n return DATA;\n case 2: // FILE_ID\n return FILE_ID;\n case 3: // SIZE\n return SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n case 1: // ID\r\n return ID;\r\n case 2: // ID_CURSA\r\n return ID_CURSA;\r\n case 3: // NR_LOC\r\n return NR_LOC;\r\n case 4: // CLIENT\r\n return CLIENT;\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EXEC_TRADE_ID\n return EXEC_TRADE_ID;\n case 2: // SUB_ACCOUNT_ID\n return SUB_ACCOUNT_ID;\n case 3: // SLED_CONTRACT_ID\n return SLED_CONTRACT_ID;\n case 4: // EXEC_ORDER_ID\n return EXEC_ORDER_ID;\n case 5: // TRADE_PRICE\n return TRADE_PRICE;\n case 6: // TRADE_VOLUME\n return TRADE_VOLUME;\n case 7: // EXEC_TRADE_DIRECTION\n return EXEC_TRADE_DIRECTION;\n case 8: // CREATE_TIMESTAMP_MS\n return CREATE_TIMESTAMP_MS;\n case 9: // LASTMODIFY_TIMESTAMP_MS\n return LASTMODIFY_TIMESTAMP_MS;\n case 10: // SLED_COMMODITY_ID\n return SLED_COMMODITY_ID;\n case 11: // CONFIG\n return CONFIG;\n case 12: // ORDER_TOTAL_VOLUME\n return ORDER_TOTAL_VOLUME;\n case 13: // LIMIT_PRICE\n return LIMIT_PRICE;\n case 14: // SOURCE\n return SOURCE;\n case 15: // TRADE_ACCOUNT_ID\n return TRADE_ACCOUNT_ID;\n case 16: // TRADE_TIMESTAMP_MS\n return TRADE_TIMESTAMP_MS;\n case 17: // ASSET_TRADE_DETAIL_ID\n return ASSET_TRADE_DETAIL_ID;\n case 18: // SUB_USER_ID\n return SUB_USER_ID;\n case 19: // SLED_ORDER_ID\n return SLED_ORDER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RESOURCE_PLAN_NAME\n return RESOURCE_PLAN_NAME;\n case 2: // POOL_PATH\n return POOL_PATH;\n case 3: // ALLOC_FRACTION\n return ALLOC_FRACTION;\n case 4: // QUERY_PARALLELISM\n return QUERY_PARALLELISM;\n case 5: // SCHEDULING_POLICY\n return SCHEDULING_POLICY;\n case 6: // IS_SET_SCHEDULING_POLICY\n return IS_SET_SCHEDULING_POLICY;\n case 7: // NS\n return NS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // CONF\n return CONF;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // CONTRACT_ADDRESS\n return CONTRACT_ADDRESS;\n case 2: // OBJECT\n return OBJECT;\n case 3: // STATE_CAN_MODIFY\n return STATE_CAN_MODIFY;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EX\n return EX;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }" ]
[ "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7541919", "0.75344586", "0.74417484", "0.74417484", "0.74417484", "0.74417484", "0.74417484", "0.74417484", "0.7428648", "0.7428648", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7423571", "0.7423369", "0.7403485", "0.7394984", "0.7394108", "0.7391513", "0.73827726", "0.73782563", "0.7376256", "0.7372693", "0.73629117", "0.73629117", "0.7350967", "0.7350967", "0.7342082", "0.7342082", "0.7342082", "0.73345006", "0.73275083", "0.7317537", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7308824", "0.7288882", "0.72863466", "0.72711205", "0.72704643", "0.72680724", "0.7256801", "0.72550267", "0.72543365", "0.7249658", "0.7249658", "0.7247689", "0.7247689", "0.7247689", "0.7247689", "0.7247689" ]
0.0
-1
Find the _Fields constant that matches name, or null if its not found.
public static _Fields findByName(String name) { return byName.get(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }", "public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}" ]
[ "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.7641504", "0.76306957", "0.76306957", "0.76306957", "0.76306957", "0.76306957", "0.76306957", "0.76306957", "0.76306957", "0.76306957", "0.75791246", "0.75791246", "0.7571518", "0.7571518", "0.7563832", "0.7563832" ]
0.0
-1
Performs a deep copy on other.
public CThostFtdcQryCombinationLegField(CThostFtdcQryCombinationLegField other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetCombInstrumentID()) { this.combInstrumentID = other.combInstrumentID; } this.legID = other.legID; if (other.isSetLegInstrumentID()) { this.legInstrumentID = other.legInstrumentID; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Prototype makeCopy();", "public void copy (WorldState other)\n\t{\n\t\tresetProperties();\n\t\t//Iterate through other state and clone it's properties into this states properties\n\t\tCollection<WorldStateProperty> otherProperties = other.properties.values();\n\t\tfor (WorldStateProperty property : otherProperties)\n\t\t{\n\t\t\tproperties.put(property.key, property.clone());\n\t\t}\n\t}", "public void copyDataFrom(ParamUnit other)\r\n\t{\r\n\t\tif (this.data.row != other.data.row || this.data.col != other.data.col)\r\n\t\t\tthrow new DeepException(\"Cannot copy data from a different dimension.\");\r\n\t\tthis.data.copyFrom(other.data);\r\n\t}", "private Path(Path other){\n\t\t\n\t\tthis.source = other.source;\n\t\tthis.destination = other.destination;\n\t\tthis.cities = other.cities;\n\t\t\n\t\tthis.cost = other.cost;\n\t\tthis.destination = other.destination;\n\t\t\n\t\tthis.connections = new LinkedList<Connection>();\n\t\t\n\t\tfor (Connection c : other.connections){\n\t\t\tthis.connections.add((Connection) c.clone());\n\t\t}\n\t\t\n\t}", "@Override\n\tprotected void copy(Object source, Object dest) {\n\t\t\n\t}", "public void copy() {\n\n\t}", "public abstract B copy();", "public CMObject copyOf();", "public T cloneDeep();", "public void copy(BlastGraph<HitVertex, ValueEdge> graphToCopy) {\n\t\t// empty this graph\n\t\tthis.empty();\n\n\t\t// union this empty graph with graphToCopy\n\t\tthis.union(graphToCopy);\n\t}", "public void mirror(Dataset other) {\n clear();\n this.ntree.addAll(other.ntree);\n }", "Model copy();", "public abstract INodo copy();", "static void setCopying(){isCopying=true;}", "Nda<V> shallowCopy();", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "T copy();", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get_sort_by();\n\t\tcount = \toriginal.get_count();\n\t\tstart = \toriginal.get_start();\n\t\tsource = \toriginal.get_source();\n\t\tfieldset =\toriginal.get_fieldset();\n\t\trelation = \toriginal.get_relation();\n\t}", "Component deepClone();", "public Data assign(Data other) {\r\n this.setDimension(other.dimension);\r\n this.distanz = other.distanz;\r\n //for (int i = 0; i < this.dimension; ++i)\r\n for (int i = 0; i < this.dimension * 2; ++i) {\r\n this.data[i] = other.data[i];\r\n }\r\n this.id = other.id;\r\n return this;\r\n }", "@Override\n public int deepCopy(AbstractRecord other)\n {\n return 0;\n }", "public AST copy()\n {\n return new Implicate(left, right);\n }", "@Override\n public void copyValues(final fr.jmmc.oiexplorer.core.model.OIBase other) {\n final View view = (View) other;\n\n // copy type, subsetDefinition (reference):\n this.type = view.getType();\n this.subsetDefinition = view.getSubsetDefinition();\n }", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public abstract Node copy();", "protected void copy(Writable other) {\n\t\tif (other != null) {\n\t\t\ttry {\n\t\t\t\tDataOutputBuffer out = new DataOutputBuffer();\n\t\t\t\tother.write(out);\n\t\t\t\tDataInputBuffer in = new DataInputBuffer();\n\t\t\t\tin.reset(out.getData(), out.getLength());\n\t\t\t\treadFields(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IllegalArgumentException(\"map cannot be copied: \" +\n\t\t\t\t\t\te.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"source map cannot be null\");\n\t\t}\n\t}", "protected void copyInto(Schedule other) {\r\n\t\tfor(int i = MIN_WEEKDAY; i <= MAX_WEEKDAY; i++)\r\n\t\t\tfor(int j = MIN_SEGMENT; j <= MAX_SEGMENT; j++)\r\n\t\t\t\tother.schedule[i][j] = schedule[i][j];\t\t\r\n\t}", "public DTO(DTO other) {\n if (other.isSetDatas()) {\n Map<String,String> __this__datas = new HashMap<String,String>(other.datas);\n this.datas = __this__datas;\n }\n }", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}", "Object clone();", "Object clone();", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "Nda<V> deepCopy();", "@Override\n public LocalStore<V> copy() {\n return this;\n }", "public abstract TreeNode copy();", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "@Override\n\tpublic void copyReferences() {\n\t\tlateCopies = new LinkedHashMap<>();\n\n\t\tsuper.copyReferences();\n\n\t\tputAll(lateCopies);\n\t\tlateCopies = null;\n\t}", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "@Test\n\tpublic void testCopy2() {\n\n\t\tint[] arr = { 1, 2, 3, 7, 8 }; // this list\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet copied = listObj2.copy();\n\t\tcopied.add(-1);\n\t\tString expectedObj2 = \"1, 2, 3, 7, 8\";\n\t\tString expectedCopied = \"-1, 1, 2, 3, 7, 8\";\n\t\tint expectedObj2Size = 5;\n\t\tint expectedCopiedSize = 6;\n\n\t\tassertEquals(expectedObj2Size, listObj2.getSize());\n\t\tassertEquals(expectedObj2, listObj2.toString());\n\n\t\tassertEquals(expectedCopiedSize, copied.getSize());\n\t\tassertEquals(expectedCopied, copied.toString());\n\n\t}", "public Data copy(Object value) {\n if (mValue instanceof Data) {\n ((Data) mValue).copy(value);\n } else {\n mValue = value;\n }\n return this;\n }", "public void\n\tcopy( Vector3 other )\n\t{\n\t\tdata[0] = other.data[0];\n\t\tdata[1] = other.data[1];\n\t\tdata[2] = other.data[2];\n\t}", "private static void copy(List<? super Number> dest, List<? extends Number> src) {\n for (int i = 0; i < src.size(); i++) {\n dest.set(i, src.get(i));\n //dest.add(src.get(i));\n }\n }", "private ImmutablePerson(ImmutablePerson other) {\n firstName = other.firstName;\n middleName = other.middleName;\n lastName = other.lastName;\n nickNames = new ArrayList<>(other.nickNames);\n }", "public abstract void copy(Result result, Object object);", "protected AbstractChartModel copy(AbstractChartModel aCopy) {\n aCopy.title = title;\n aCopy.xAxisTitle = xAxisTitle;\n aCopy.yAxisTitle = yAxisTitle;\n aCopy.xRangeMax = xRangeMax;\n aCopy.xRangeMin = xRangeMin;\n aCopy.xRangeIncr = xRangeIncr;\n aCopy.yRangeMax = yRangeMax;\n aCopy.yRangeMin = yRangeMin;\n aCopy.yRangeIncr = yRangeIncr;\n aCopy.simModel = simModel;\n ArrayList list = new ArrayList();\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource) dataSources.get(i);\n list.add(ds.copy());\n }\n aCopy.dataSources = list;\n\n return aCopy;\n }", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "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 }", "public Game copy();", "public void pasteFrom(Flow other)\n\t\t{\n\t\tunits.addAll(other.units);\n\t\tconns.addAll(other.conns);\n\t\t}", "@Override\r\n\tpublic LogicalValue copy() {\r\n\t\treturn new Pointer(target);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "public CFExp deepCopy(){\r\n return this;\r\n }", "DataContext copy();", "@Override\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS(this.ga);//create the copy graph via copy constructor\n return copy;\n }", "@Override\n\tpublic SecuredRDFList copy();", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public O copy() {\n return value();\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public abstract Object clone();", "public Function clone();", "public abstract Type treeCopy();", "public Tree<K, V> copy(Tree<K, V> t, Tree<K, V> copy) {\n\t\tcopy = copy.add(key, value);\n\t\tcopy = left.copy(left, copy);\n\t\tcopy = right.copy(right, copy);\n\t\treturn copy;\n\t}", "public Results copy()\n {\n Results copy = new Results();\n for(Object object : results) {\n copy.add( object );\n }\n return copy;\n }", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "@Override\r\n\tpublic void copy(Property p) {\n\t\t\r\n\t}", "public directed_weighted_graph deepCopy() {\n DWGraph_DS copyGraph = new DWGraph_DS(this); //create a new graph with the original graph data (only primitives)\n HashMap<Integer, node_data> copyNodesMap = new HashMap<>(); //create a new nodes HashMap for the new graph\n for (node_data node : nodes.values()) { //loop through all nodes in the original graph\n copyNodesMap.put(node.getKey(), new NodeData((NodeData) node)); //makes a duplicate of the original HashMap\n }\n copyGraph.nodes = copyNodesMap; //set the new graph nodes to the new HashMap we made.\n return copyGraph;\n }", "public Object clone() {\n return this.copy();\n }", "@Override\n public Operator visitCopy(Copy operator)\n {\n throw new AssertionError();\n }", "@Test\n\tpublic void copy() {\n\t\tBody b1 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\tCollisionItemAdapter<Body, BodyFixture> c1 = this.item.copy();\n\t\tTestCase.assertNull(c1.getBody());\n\t\tTestCase.assertNull(c1.getFixture());\n\t\t\n\t\tthis.item.set(b1, b1f1);\n\t\tCollisionItemAdapter<Body, BodyFixture> c2 = this.item.copy();\n\t\tTestCase.assertEquals(b1, c2.getBody());\n\t\tTestCase.assertEquals(b1f1, c2.getFixture());\n\t\t\n\t\t// make sure it's a deep copy\n\t\tc1.set(null, null);\n\t\tTestCase.assertNull(c1.getBody());\n\t\tTestCase.assertNull(c1.getFixture());\n\t\tTestCase.assertEquals(b1, c2.getBody());\n\t\tTestCase.assertEquals(b1f1, c2.getFixture());\n\t}", "public abstract Object clone() ;", "public Object clone() {\n \ttry {\n \tMyClass1 result = (MyClass1) super.clone();\n \tresult.Some2Ob = (Some2)Some2Ob.clone(); ///IMPORTANT: Some2 clone method called for deep copy without calling this Some2.x will be = 12\n \t\n \treturn result;\n \t} catch (CloneNotSupportedException e) {\n \treturn null; \n \t}\n\t}", "public PaginationVO(PaginationVO other) {\n __isset_bitfield = other.__isset_bitfield;\n this.pageSize = other.pageSize;\n this.pageNo = other.pageNo;\n this.upPage = other.upPage;\n this.nextPage = other.nextPage;\n this.totalCount = other.totalCount;\n this.totalPage = other.totalPage;\n if (other.isSetPageUrl()) {\n this.pageUrl = other.pageUrl;\n }\n if (other.isSetParams()) {\n this.params = other.params;\n }\n if (other.isSetDatas()) {\n List<BlogPostVO> __this__datas = new ArrayList<BlogPostVO>();\n for (BlogPostVO other_element : other.datas) {\n __this__datas.add(new BlogPostVO(other_element));\n }\n this.datas = __this__datas;\n }\n }", "public WorldState (WorldState other)\n\t{\n\t\tproperties = new HashMap<String, WorldStateProperty>();\t\t\n\t\tcopy(other);\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "protected void copy(){\n\t\tthis.model.copy(this.color.getBackground());\n\t}", "@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);", "@Override\n public INDArray copy(INDArray x, INDArray y) {\n //NativeBlas.dcopy(x.length(), x.data(), 0, 1, y.data(), 0, 1);\n JavaBlas.rcopy(x.length(), x.data(), x.offset(), 1, y.data(), y.offset(), 1);\n return y;\n }", "@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}", "public Object detachCopy(Object po)\n{\n\treturn po;\n}", "public ConfabulatorObject getCopy() {\n\t\tConfabulatorObject copy = new ConfabulatorObject(getMessenger());\n\t\tlockMe(this);\n\t\tint maxD = maxLinkDistance;\n\t\tint maxC = maxLinkCount;\n\t\tList<Link> linksCopy = new ArrayList<Link>();\n\t\tfor (Link lnk: links) {\n\t\t\tlinksCopy.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\tcopy.initialize(maxD,maxC,linksCopy);\n\t\treturn copy;\n\t}", "@Override\r\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS();\r\n for (node_info curr : this.Graph.getV()) { //The loop passes through all the ver' of the graph\r\n Nodes t = new Nodes(curr); //create new node\r\n copy.addNode(t.key); //copy the the old node to the new node\r\n }\r\n for (node_info curr0 : this.Graph.getV()) {\r\n for (node_info curr1 : this.Graph.getV(curr0.getKey())) { //this loops pass over the all nodes and copy the connection\r\n double i = this.Graph.getEdge(curr0.getKey(), curr1.getKey());\r\n if (i != -1) {\r\n copy.connect(curr0.getKey(), curr1.getKey(), i);\r\n }\r\n }\r\n }\r\n return copy;\r\n\r\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public static void main(String[] args) throws CloneNotSupportedException\n {\n ArrayList<String> companies = new ArrayList<String>();\n companies.add(\"Baidu\");\n companies.add(\"Tencent\");\n companies.add(\"Ali\");\n WorkExprience workExprience = new WorkExprience(companies);\n String nameString = new String(\"Tom\");\n String genderString = new String(\"male\");\n Resume resume = new Resume(nameString, 23, genderString, workExprience);\n System.out.println(\"Source Resume\");\n resume.printResum();\n \n ArrayList<String> companies1 = new ArrayList<String>();\n companies1.add(\"Google\");\n companies1.add(\"Microsoft\");\n companies1.add(\"Oracle\");\n Resume copyResume = (Resume)resume.clone();\n String nameString1 = new String(\"Jerry\");\n String genderString1 = new String(\"Fmale\");\n copyResume.setName(nameString1);\n copyResume.setAge(20);\n copyResume.setGender(genderString1);\n copyResume.getWorkExprience().setCompanyArrayList(companies1);\n System.out.println();\n System.out.println(\"Source Resume\");\n resume.printResum();\n System.out.println();\n System.out.println(\"Copy Resume\");\n copyResume.printResum();\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "protected void deepCloneReferences(uka.transport.DeepClone _helper)\n throws CloneNotSupportedException\n {\n //Cloning the byte array\n\t this.value = _helper.doDeepClone(this.value);\n //byte[] value_clone = new byte[this.value.length]; \n //System.arraycopy(this.value, 0, value_clone, 0, this.value.length);\n //this.value = value_clone;\n }", "static void setNotCopying(){isCopying=false;}", "void copy(DependencyRelations deps){\n if (deps == null)\n throw new IllegalArgumentException(\"the source is null.\");\n\n size_ = deps.size_;\n for(int i = 0; i < size_ ; i++){\n if (nodes_[i] == null)\n nodes_[i] = new Node();\n nodes_[i].copy(deps.nodes_[i]);\n }\n }", "@SuppressWarnings(\"All\")\n public <T> void copy(MyList<? super T> to, MyList<? extends T> from) {\n\n System.out.println(\"from size \" + from.size);\n for (int i = 0; i < from.getSize(); i++) {\n to.add(from.getByIndex(i));\n }\n }", "public void copy(Posts that) {\r\n\t\tsetId(that.getId());\r\n\t\tsetTitle(that.getTitle());\r\n\t\tsetContent(that.getContent());\r\n\t\tsetShareDate(that.getShareDate());\r\n\t\tsetIsPrivate(that.getIsPrivate());\r\n\t\tsetUsers(that.getUsers());\r\n\t\tsetCommentses(new java.util.LinkedHashSet<com.ira.domain.Comments>(that.getCommentses()));\r\n\t}", "@Override\n public TopicObject copy() {\n return new TopicObject(this);\n }" ]
[ "0.7214815", "0.6982586", "0.6743959", "0.66792786", "0.6563397", "0.6549605", "0.65230364", "0.652084", "0.64842516", "0.64743775", "0.6450891", "0.6438907", "0.64186275", "0.640633", "0.6403375", "0.63743764", "0.6373319", "0.6358263", "0.6322797", "0.63214344", "0.62839", "0.6270614", "0.6265534", "0.6262602", "0.6245396", "0.6226707", "0.62195224", "0.6199828", "0.6194176", "0.61679715", "0.61505216", "0.6141201", "0.6141201", "0.613657", "0.61238766", "0.6113572", "0.6078777", "0.6067093", "0.6051407", "0.60489607", "0.60435355", "0.6034403", "0.6030665", "0.603029", "0.6002317", "0.5987207", "0.5984917", "0.59831345", "0.5962016", "0.5931717", "0.59043086", "0.58999294", "0.58940864", "0.5888768", "0.5887435", "0.5887003", "0.5872753", "0.58715606", "0.5867456", "0.5854781", "0.5835268", "0.5833011", "0.58237326", "0.58237326", "0.58237326", "0.58237326", "0.5821464", "0.5818652", "0.5814066", "0.57974726", "0.579667", "0.5792226", "0.57900447", "0.57734174", "0.57581633", "0.5751797", "0.57507133", "0.5744841", "0.5744065", "0.5744024", "0.5743795", "0.5740732", "0.57376605", "0.5736934", "0.5736099", "0.5727886", "0.5727659", "0.5714002", "0.5700601", "0.56953377", "0.5689013", "0.5682943", "0.5676875", "0.56736434", "0.56729144", "0.567041", "0.5669635", "0.56651294", "0.56643426", "0.5662451", "0.5647604" ]
0.0
-1
Returns true if field combInstrumentID is set (has been assigned a value) and false otherwise
public boolean isSetCombInstrumentID() { return this.combInstrumentID != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetLegInstrumentID() {\n return this.legInstrumentID != null;\n }", "public boolean isSetCarid() {\n return __isset_bit_vector.get(__CARID_ISSET_ID);\n }", "public boolean isSetCarproviceid() {\n return __isset_bit_vector.get(__CARPROVICEID_ISSET_ID);\n }", "public boolean isSetSledCommodityId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCOMMODITYID_ISSET_ID);\n }", "public boolean isSetUcarserialnumber() {\n return this.ucarserialnumber != null;\n }", "public boolean isSetProducerid() {\n return __isset_bit_vector.get(__PRODUCERID_ISSET_ID);\n }", "public boolean isSetCardId() {\n\t\treturn this.cardId != null;\n\t}", "public boolean isSetExchangeInstID() {\n return this.exchangeInstID != null;\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean hasBankID() {\n return fieldSetFlags()[7];\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetAssetTradeDetailId() {\n return EncodingUtils.testBit(__isset_bitfield, __ASSETTRADEDETAILID_ISSET_ID);\n }", "public boolean isSetRecord() {\n return this.record != null;\n }", "public boolean isSetRecord() {\n return this.record != null;\n }", "public boolean isSetUcarid() {\n return __isset_bit_vector.get(__UCARID_ISSET_ID);\n }", "public boolean isSetObjId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJID_ISSET_ID);\r\n }", "public boolean isSetCompanyId() {\n return EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }", "public boolean isSetCarcityid() {\n return __isset_bit_vector.get(__CARCITYID_ISSET_ID);\n }", "public boolean hasBUSUNITID() {\n return fieldSetFlags()[4];\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case COMB_INSTRUMENT_ID:\n return isSetCombInstrumentID();\n case LEG_ID:\n return isSetLegID();\n case LEG_INSTRUMENT_ID:\n return isSetLegInstrumentID();\n }\n throw new IllegalStateException();\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetCommodityIds() {\n return this.commodityIds != null;\n }", "public boolean isSetIsjdvendor() {\n return __isset_bit_vector.get(__ISJDVENDOR_ISSET_ID);\n }", "public boolean isSetCustID() {\n return this.CustID != null;\n }", "public boolean isSetCurrencyID() {\n return this.currencyID != null;\n }", "public boolean isSetPId() {\n return EncodingUtils.testBit(__isset_bitfield, __PID_ISSET_ID);\n }", "public boolean isSetClientID() {\n return this.clientID != null;\n }", "public boolean isSetDeviceNo() {\n return this.DeviceNo != null;\n }", "public boolean isSetRecomId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RECOMID_ISSET_ID);\n }", "public boolean isSetBaidumap() {\n return this.baidumap != null;\n }", "public boolean isSetCarprovincename() {\n return this.carprovincename != null;\n }", "public boolean isSetCardistrictid() {\n return __isset_bit_vector.get(__CARDISTRICTID_ISSET_ID);\n }", "public boolean hasDriverid() {\n return fieldSetFlags()[2];\n }", "public boolean isSetIdentifier() {\n return this.identifier != null;\n }", "public boolean hasCarId() {\n return fieldSetFlags()[2];\n }", "boolean isSetSOID();", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetProcess_ID() {\r\n return this.Process_ID != null;\r\n }", "boolean isSetID();", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$24) != null;\n }\n }", "public boolean isSetPatient_id() {\n return this.patient_id != null;\n }", "public boolean isSetPatient_id() {\n return this.patient_id != null;\n }", "public boolean hasDriverId() {\n return fieldSetFlags()[1];\n }", "public boolean isSetCreaterId() {\n return EncodingUtils.testBit(__isset_bitfield, __CREATERID_ISSET_ID);\n }", "public boolean isSetGPSAntennaDetailsID()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(GPSANTENNADETAILSID$14) != null;\r\n }\r\n }", "public boolean isSetBankNumber() {\n\t\treturn this.bankNumber != null;\n\t}", "public boolean isSetDdbj()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(DDBJ$24) != 0;\r\n }\r\n }", "public boolean visible_SetupAssetIDField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_AssetID_txtBx);\r\n\t}", "public boolean isSetBidPrice4() {\n return EncodingUtils.testBit(__isset_bitfield, __BIDPRICE4_ISSET_ID);\n }", "public boolean isSetActiveID() {\n return this.ActiveID != null;\n }", "public boolean isSetIsowncar() {\n return __isset_bit_vector.get(__ISOWNCAR_ISSET_ID);\n }", "public boolean isSetOID()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(OID$12) != null;\r\n }\r\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$12) != null;\n }\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$12) != null;\n }\n }", "public boolean isSetPir()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PIR$12) != 0;\r\n }\r\n }", "public boolean isSetImdb_id() {\n return this.imdb_id != null;\n }", "public boolean isSetSpID() {\n return this.SpID != null;\n }", "public boolean isSetBidVolume4() {\n return EncodingUtils.testBit(__isset_bitfield, __BIDVOLUME4_ISSET_ID);\n }", "public boolean isSetCarreferprice() {\n return __isset_bit_vector.get(__CARREFERPRICE_ISSET_ID);\n }", "public boolean hasCurrencyID() {\n return fieldSetFlags()[10];\n }", "public boolean isSetAccountID() {\n return this.accountID != null;\n }", "public boolean isSetPdb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PDB$28) != 0;\r\n }\r\n }", "public boolean isSetTraderID() {\n return this.traderID != null;\n }", "public boolean isSetPreRepayId() {\n return EncodingUtils.testBit(__isset_bitfield, __PREREPAYID_ISSET_ID);\n }", "public boolean isSetInstitutionID() {\n return this.institutionID != null;\n }", "public boolean isSetCode() {\n return this.code != null;\n }", "public boolean isSetCoverage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(COVERAGE$4) != null;\n }\n }", "public boolean isSetObjectId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJECTID_ISSET_ID);\r\n }", "public boolean isSetObjectId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJECTID_ISSET_ID);\r\n }", "public boolean isSetObjectId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJECTID_ISSET_ID);\r\n }", "public boolean isSetObjectId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJECTID_ISSET_ID);\r\n }", "public boolean isSetObjectId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJECTID_ISSET_ID);\r\n }", "public boolean isSetObjectId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJECTID_ISSET_ID);\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case BID_PRICE4:\n return isSetBidPrice4();\n case BID_VOLUME4:\n return isSetBidVolume4();\n case BID_PRICE5:\n return isSetBidPrice5();\n case BID_VOLUME5:\n return isSetBidVolume5();\n }\n throw new IllegalStateException();\n }", "public boolean isSetExchangeID() {\n return this.exchangeID != null;\n }", "public boolean isSetGenbank()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENBANK$8) != 0;\r\n }\r\n }", "public boolean isSetBank()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BANK$0) != 0;\n }\n }", "public boolean isSetCostrate() {\n return __isset_bit_vector.get(__COSTRATE_ISSET_ID);\n }", "public boolean isSetIdCursa() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IDCURSA_ISSET_ID);\r\n }", "public boolean isSetFileID() {\n return this.fileID != null;\n }", "public boolean isSetExecTradeId() {\n return EncodingUtils.testBit(__isset_bitfield, __EXECTRADEID_ISSET_ID);\n }", "public boolean isSetBrokerId() {\n return EncodingUtils.testBit(__isset_bitfield, __BROKERID_ISSET_ID);\n }", "public boolean isSetBrokerID() {\n return this.brokerID != null;\n }" ]
[ "0.71488076", "0.6650929", "0.64542747", "0.6435944", "0.6350563", "0.6319693", "0.6294854", "0.6294691", "0.62830395", "0.6277389", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.6242171", "0.62352586", "0.6228442", "0.6228442", "0.6214777", "0.62139755", "0.6199016", "0.6172779", "0.6140925", "0.6125126", "0.6121636", "0.6121636", "0.61187476", "0.61145514", "0.61078364", "0.61076283", "0.6073646", "0.60723543", "0.6063194", "0.60544163", "0.6052071", "0.60072833", "0.5999167", "0.59971136", "0.5996287", "0.59779507", "0.5971132", "0.59664947", "0.59664947", "0.596299", "0.59446883", "0.59446084", "0.59422183", "0.59422183", "0.59394246", "0.59375864", "0.5935169", "0.59341717", "0.592077", "0.5919849", "0.59176445", "0.59153616", "0.59075606", "0.59066516", "0.5905345", "0.5905345", "0.58826494", "0.5878277", "0.5875799", "0.5875365", "0.58704996", "0.5861911", "0.58525085", "0.5848565", "0.5846915", "0.5843149", "0.5804709", "0.5789908", "0.578172", "0.5778751", "0.5778751", "0.5778751", "0.5778751", "0.5778751", "0.5778751", "0.57769585", "0.57723236", "0.57677126", "0.5746723", "0.57397157", "0.5737894", "0.5737735", "0.5724345", "0.5723876", "0.57215875" ]
0.88055277
0
Returns true if field legID is set (has been assigned a value) and false otherwise
public boolean isSetLegID() { return EncodingUtils.testBit(__isset_bitfield, __LEGID_ISSET_ID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetLegInstrumentID() {\n return this.legInstrumentID != null;\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$24) != null;\n }\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$12) != null;\n }\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$12) != null;\n }\n }", "boolean isSetID();", "public boolean isSetHraccountId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HRACCOUNTID_ISSET_ID);\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "boolean hasFieldId();", "public boolean hasId() {\n return fieldSetFlags()[1];\n }", "public boolean hasId() {\n return fieldSetFlags()[0];\n }", "public boolean hasId() {\n return fieldSetFlags()[0];\n }", "public boolean hasId() {\n return fieldSetFlags()[0];\n }", "public boolean hasId() {\n return fieldSetFlags()[0];\n }", "public boolean hasId() {\n return fieldSetFlags()[0];\n }", "public boolean isSetRecomId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RECOMID_ISSET_ID);\n }", "public boolean hasRideid() {\n return fieldSetFlags()[0];\n }", "public boolean isSetReferralLogId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REFERRALLOGID_ISSET_ID);\n }", "public boolean isSet(int fieldID) {\n switch (fieldID) {\n case NAME:\n return isSetName();\n case PASSWORD:\n return isSetPassword();\n case SELECT_PRIV:\n return isSetSelect_priv();\n case INSERT_PRIV:\n return isSetInsert_priv();\n case CREATE_PRIV:\n return isSetCreate_priv();\n case DROP_PRIV:\n return isSetDrop_priv();\n case GRANT_PRIV:\n return isSetGrant_priv();\n case ALTER_PRIV:\n return isSetAlter_priv();\n case CREATE_USER_PRIV:\n return isSetCreate_user_priv();\n case SUPER_PRIV:\n return isSetSuper_priv();\n default:\n throw new IllegalArgumentException(\"Field \" + fieldID + \" doesn't exist!\");\n }\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetGPSAntennaDetailsID()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(GPSANTENNADETAILSID$14) != null;\r\n }\r\n }", "public boolean isSetId() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\r\n }", "public boolean isSetId() {\n return __isset_bit_vector.get(__ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetCreaterId() {\n return EncodingUtils.testBit(__isset_bitfield, __CREATERID_ISSET_ID);\n }", "public boolean isSetEntryId() {\n return EncodingUtils.testBit(__isset_bitfield, __ENTRYID_ISSET_ID);\n }", "public boolean isSetSldRg()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SLDRG$8) != 0;\n }\n }", "boolean hasField4();", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$6) != null;\n }\n }", "public boolean hasFLIGHTID() {\n return fieldSetFlags()[5];\n }", "public boolean isSetCarid() {\n return __isset_bit_vector.get(__CARID_ISSET_ID);\n }", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetIdVehiculo() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IDVEHICULO_ISSET_ID);\r\n }", "public boolean isSetRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(ROADWAYREF$16) != null;\r\n }\r\n }", "public boolean isSetNum() {\n return this.Num != null;\n }", "public boolean isSetLoanId() {\n return EncodingUtils.testBit(__isset_bitfield, __LOANID_ISSET_ID);\n }", "public boolean hasFlyerId() {\n return fieldSetFlags()[2];\n }", "public boolean isSetObjId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJID_ISSET_ID);\r\n }", "public boolean isSetRelatedId() {\n return EncodingUtils.testBit(__isset_bitfield, __RELATEDID_ISSET_ID);\n }", "public boolean isSetTraderID() {\n return this.traderID != null;\n }", "public boolean isSetSnapearn_id() {\n return EncodingUtils.testBit(__isset_bitfield, __SNAPEARN_ID_ISSET_ID);\n }", "public boolean isSetCardistrictid() {\n return __isset_bit_vector.get(__CARDISTRICTID_ISSET_ID);\n }", "public boolean hasBankID() {\n return fieldSetFlags()[7];\n }", "public boolean isSetPdb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PDB$28) != 0;\r\n }\r\n }", "public boolean hasFieldTypeId() {\n return fieldTypeIdBuilder_ != null || fieldTypeId_ != null;\n }", "public boolean hasErrorId() {\n return fieldSetFlags()[3];\n }", "public boolean isSetTeam_id() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TEAM_ID_ISSET_ID);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasUserid() {\n return fieldSetFlags()[1];\n }", "public boolean hasAccountID() {\n return fieldSetFlags()[0];\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasID() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n }\n throw new IllegalStateException();\n }", "public boolean hasCarId() {\n return fieldSetFlags()[2];\n }", "public boolean isSetPId() {\n return EncodingUtils.testBit(__isset_bitfield, __PID_ISSET_ID);\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n }\n throw new IllegalStateException();\n }", "public boolean hasFieldTypeId() {\n return fieldTypeId_ != null;\n }", "public boolean hasTweedId() {\n return fieldSetFlags()[1];\n }", "public boolean isSetId() {\n return this.id != null;\n }", "public boolean isSetId() {\n return this.id != null;\n }", "public boolean isSetId() {\r\n return this.id != null;\r\n }", "public boolean hasAccountID() {\n return fieldSetFlags()[2];\n }", "public boolean hasDriverid() {\n return fieldSetFlags()[2];\n }", "public boolean hasChulaId() {\n return chulaIdBuilder_ != null || chulaId_ != null;\n }", "public boolean isSetSpID() {\n return this.SpID != null;\n }", "public boolean hasDEALPNTFEATLNID() {\n return fieldSetFlags()[0];\n }", "public boolean isSetRunId() {\n return this.runId != null;\n }", "public boolean isSetId() {\n return this.id != null;\n }", "public boolean isSetId() {\n return this.id != null;\n }" ]
[ "0.72697645", "0.7210582", "0.7144296", "0.7144296", "0.70328885", "0.6950282", "0.68681335", "0.68681335", "0.68490577", "0.68183583", "0.67763853", "0.67763853", "0.67763853", "0.67763853", "0.67763853", "0.676322", "0.672938", "0.6711504", "0.66810757", "0.66626126", "0.66626126", "0.66480494", "0.6643076", "0.66388446", "0.66349113", "0.66349113", "0.662026", "0.662026", "0.66102624", "0.6572937", "0.6568059", "0.65486", "0.654601", "0.654601", "0.654601", "0.6516898", "0.65070605", "0.649358", "0.64920324", "0.6490258", "0.6446212", "0.6445726", "0.64404577", "0.6424345", "0.6423179", "0.64121604", "0.64019233", "0.6397732", "0.6397539", "0.6393407", "0.63898075", "0.63896817", "0.6388674", "0.6376084", "0.635985", "0.635985", "0.635985", "0.635985", "0.635985", "0.635985", "0.63598263", "0.63597214", "0.63597214", "0.6354218", "0.6351669", "0.6344277", "0.6344277", "0.6344277", "0.6344277", "0.6344277", "0.6344277", "0.63438326", "0.63438326", "0.63438326", "0.63438326", "0.63438326", "0.63438326", "0.63438326", "0.63438326", "0.63438326", "0.63435376", "0.634257", "0.634257", "0.63359696", "0.6331295", "0.63138705", "0.6308084", "0.6304319", "0.62946385", "0.62943053", "0.62943053", "0.6291422", "0.6285573", "0.6284883", "0.6274656", "0.6269327", "0.62618065", "0.6255688", "0.62495816", "0.62495816" ]
0.81419826
0
Returns true if field legInstrumentID is set (has been assigned a value) and false otherwise
public boolean isSetLegInstrumentID() { return this.legInstrumentID != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetCombInstrumentID() {\n return this.combInstrumentID != null;\n }", "public boolean isSetLegID() {\n return EncodingUtils.testBit(__isset_bitfield, __LEGID_ISSET_ID);\n }", "public boolean isSetGPSAntennaDetailsID()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(GPSANTENNADETAILSID$14) != null;\r\n }\r\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$24) != null;\n }\n }", "public boolean hasRideid() {\n return fieldSetFlags()[0];\n }", "public boolean isSetGPSReceiverDetailsID()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(GPSRECEIVERDETAILSID$16) != null;\r\n }\r\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$12) != null;\n }\n }", "public boolean isSetID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ID$12) != null;\n }\n }", "public boolean hasDriverid() {\n return fieldSetFlags()[2];\n }", "public boolean isSetRecord() {\n return this.record != null;\n }", "public boolean isSetRecord() {\n return this.record != null;\n }", "public boolean isSetPir()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PIR$12) != 0;\r\n }\r\n }", "public boolean isSetTraderID() {\n return this.traderID != null;\n }", "public boolean hasDriverId() {\n return fieldSetFlags()[1];\n }", "public boolean isSetIdentifier() {\n return this.identifier != null;\n }", "public boolean isSetOID()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(OID$12) != null;\r\n }\r\n }", "public boolean isSetPatient_id() {\n return this.patient_id != null;\n }", "public boolean isSetPatient_id() {\n return this.patient_id != null;\n }", "public boolean isSetAssetTradeDetailId() {\n return EncodingUtils.testBit(__isset_bitfield, __ASSETTRADEDETAILID_ISSET_ID);\n }", "boolean isSetID();", "public boolean isSetEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ENUMSKILLID$10) != null;\n }\n }", "public boolean isSetExchangeInstID() {\n return this.exchangeInstID != null;\n }", "public boolean isSetCarid() {\n return __isset_bit_vector.get(__CARID_ISSET_ID);\n }", "public boolean isSetIdentifiedRisks() {\n return this.IdentifiedRisks != null;\n }", "public boolean isSetIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(IDENTIFIER$0) != 0;\n }\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case COMB_INSTRUMENT_ID:\n return isSetCombInstrumentID();\n case LEG_ID:\n return isSetLegID();\n case LEG_INSTRUMENT_ID:\n return isSetLegInstrumentID();\n }\n throw new IllegalStateException();\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean mo42410i() {\n return this.f12824g != null;\n }", "public boolean isSetHraccountId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HRACCOUNTID_ISSET_ID);\n }", "public boolean hasBankID() {\n return fieldSetFlags()[7];\n }", "public boolean isSetRoadwayPI()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(ROADWAYPI$18) != null;\r\n }\r\n }", "boolean isSetSOID();", "public boolean hasSampleId() {\n return fieldSetFlags()[2];\n }", "public boolean isSetProducerid() {\n return __isset_bit_vector.get(__PRODUCERID_ISSET_ID);\n }", "public boolean isIdentification() {\n \treturn model.isIdentification();\n }", "public boolean isSetPdb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PDB$28) != 0;\r\n }\r\n }", "public boolean isSetSurplus() {\n return EncodingUtils.testBit(__isset_bitfield, __SURPLUS_ISSET_ID);\n }", "public boolean isSetDeviceNo() {\n return this.DeviceNo != null;\n }", "boolean isSetIdentifier();", "public boolean isSetSnapearn_id() {\n return EncodingUtils.testBit(__isset_bitfield, __SNAPEARN_ID_ISSET_ID);\n }", "public boolean isSetExperimentId() {\n return this.experimentId != null;\n }", "public boolean isSetExperimentId() {\n return this.experimentId != null;\n }", "public boolean isSetExperimentId() {\n return this.experimentId != null;\n }", "public boolean isSetUcarid() {\n return __isset_bit_vector.get(__UCARID_ISSET_ID);\n }", "public boolean hasGeneIds() {\n return fieldSetFlags()[4];\n }", "public boolean hasBUSUNITID() {\n return fieldSetFlags()[4];\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetRecomId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RECOMID_ISSET_ID);\n }", "public boolean isSetFrame()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(FRAME$24) != null;\n }\n }", "public boolean isSetGenbank()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENBANK$8) != 0;\r\n }\r\n }", "public boolean hasRecordNum() {\n return fieldSetFlags()[1];\n }", "public boolean isSetIswagon() {\n return __isset_bit_vector.get(__ISWAGON_ISSET_ID);\n }", "public boolean mo5648ad() {\n return this.f1670do != null && ((C0871m) this.f1670do).f2174S == 1;\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetPId() {\n return EncodingUtils.testBit(__isset_bitfield, __PID_ISSET_ID);\n }", "public boolean isSetSldRg()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SLDRG$8) != 0;\n }\n }", "public final boolean mo43124d() {\n return get() == 4;\n }", "public boolean m9123i() {\r\n return this.f6008b != null;\r\n }", "public boolean isSetOutlet_id() {\n return EncodingUtils.testBit(__isset_bitfield, __OUTLET_ID_ISSET_ID);\n }", "public boolean isSetId() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\r\n }", "public boolean isSetGuardBand() {\n return (this.guardBand != null ? this.guardBand.isSetValue() : false);\n }", "public boolean isSetCardistrictid() {\n return __isset_bit_vector.get(__CARDISTRICTID_ISSET_ID);\n }", "public boolean isSetInstitutionID() {\n return this.institutionID != null;\n }", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean isSetId() {\n return __isset_bit_vector.get(__ID_ISSET_ID);\n }", "public boolean isSetSpID() {\n return this.SpID != null;\n }", "public boolean hasCarId() {\n return fieldSetFlags()[2];\n }", "public boolean isSetExam_id() {\n return this.exam_id != null;\n }", "public boolean isSetExam_id() {\n return this.exam_id != null;\n }", "public boolean isSetCreaterId() {\n return EncodingUtils.testBit(__isset_bitfield, __CREATERID_ISSET_ID);\n }", "public final boolean mo4164yO() {\n return this.bUG.get(C5773a.clicfg_matrix_battery_record_alarm_enable.name(), false);\n }", "public boolean isSetId() {\n return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);\n }", "public boolean hasRecognitionId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isSetImdb_id() {\n return this.imdb_id != null;\n }", "public boolean hasFLIGHTID() {\n return fieldSetFlags()[5];\n }", "public boolean isSetObjId() {\r\n return EncodingUtils.testBit(__isset_bitfield, __OBJID_ISSET_ID);\r\n }", "public boolean hasRecognitionId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isSetBidVolume4() {\n return EncodingUtils.testBit(__isset_bitfield, __BIDVOLUME4_ISSET_ID);\n }", "public boolean isSetReferralLogId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REFERRALLOGID_ISSET_ID);\n }", "public boolean mo41773c() {\n return this.f35224a == null;\n }", "public boolean isSetNum() {\n return this.Num != null;\n }", "public boolean mo28509d() {\n return this.f11168b.size() > 0;\n }", "public boolean mo42155d() {\n return this.f12559c != null;\n }", "public boolean isSetCarproviceid() {\n return __isset_bit_vector.get(__CARPROVICEID_ISSET_ID);\n }", "public boolean isSetPreRepayId() {\n return EncodingUtils.testBit(__isset_bitfield, __PREREPAYID_ISSET_ID);\n }", "@Override\n public boolean isSet() {\n return loci != null;\n }", "public boolean isSetFileID() {\n return this.fileID != null;\n }", "public boolean isSetBand1H()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BAND1H$4) != 0;\n }\n }", "public boolean isSetRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(ROADWAYREF$16) != null;\r\n }\r\n }", "public boolean mo8481d() {\n return !this.f3533c.isEmpty() && !this.f3532b.isEmpty();\n }", "public boolean isSetIsjdvendor() {\n return __isset_bit_vector.get(__ISJDVENDOR_ISSET_ID);\n }", "public boolean hasId() {\n return fieldSetFlags()[1];\n }", "public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }" ]
[ "0.75269705", "0.71658224", "0.68164825", "0.6509506", "0.650396", "0.645891", "0.6435192", "0.6435192", "0.6431039", "0.6385499", "0.6385499", "0.6375238", "0.6369641", "0.6360522", "0.62953573", "0.6292023", "0.6289726", "0.6289726", "0.6261819", "0.62492883", "0.6245284", "0.6241326", "0.6236179", "0.6220588", "0.62032837", "0.6200417", "0.61980087", "0.61980087", "0.61892796", "0.617745", "0.6176868", "0.61631304", "0.6139444", "0.61363864", "0.61248857", "0.6102345", "0.61014014", "0.60527855", "0.60392696", "0.60323757", "0.6021588", "0.6014095", "0.6014095", "0.6014095", "0.6010733", "0.6009496", "0.60044736", "0.60031897", "0.60031897", "0.60005933", "0.60005933", "0.59965956", "0.5990813", "0.5987097", "0.598662", "0.5986111", "0.5982847", "0.59808415", "0.59808415", "0.59747154", "0.5970066", "0.5969586", "0.5963242", "0.5957217", "0.5956682", "0.5952273", "0.59480643", "0.59460235", "0.5931659", "0.5931659", "0.5931659", "0.59315515", "0.59270203", "0.59169", "0.59164035", "0.59164035", "0.59047604", "0.5894344", "0.58920294", "0.58907425", "0.58852506", "0.588215", "0.58813536", "0.58792037", "0.58751595", "0.5870475", "0.5865701", "0.58625984", "0.58624566", "0.58616245", "0.58598787", "0.5855438", "0.5851128", "0.58497334", "0.58494335", "0.5848352", "0.58461654", "0.58416903", "0.583689", "0.58362985" ]
0.857768
0
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case COMB_INSTRUMENT_ID: return isSetCombInstrumentID(); case LEG_ID: return isSetLegID(); case LEG_INSTRUMENT_ID: return isSetLegInstrumentID(); } throw new IllegalStateException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(int fieldID) {\n switch (fieldID) {\n case NAME:\n return isSetName();\n case PASSWORD:\n return isSetPassword();\n case SELECT_PRIV:\n return isSetSelect_priv();\n case INSERT_PRIV:\n return isSetInsert_priv();\n case CREATE_PRIV:\n return isSetCreate_priv();\n case DROP_PRIV:\n return isSetDrop_priv();\n case GRANT_PRIV:\n return isSetGrant_priv();\n case ALTER_PRIV:\n return isSetAlter_priv();\n case CREATE_USER_PRIV:\n return isSetCreate_user_priv();\n case SUPER_PRIV:\n return isSetSuper_priv();\n default:\n throw new IllegalArgumentException(\"Field \" + fieldID + \" doesn't exist!\");\n }\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case USER_ID:\n return isSetUserId();\n case NUM:\n return isSetNum();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case FIELD:\r\n return isSetField();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case PARAMS:\n return isSetParams();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJ_ID:\r\n return isSetObjId();\r\n case SYMBOL:\r\n return isSetSymbol();\r\n case POSITION_X:\r\n return isSetPositionX();\r\n case POSITION_Y:\r\n return isSetPositionY();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case USER_ID:\n return isSetUserId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case USER_ID:\n return isSetUserId();\n }\n throw new IllegalStateException();\n }", "boolean hasField4();", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case TYPE:\n return isSetType();\n case POSTSID:\n return isSetPostsid();\n case USERID:\n return isSetUserid();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDENTIFIER:\n return isSetIdentifier();\n case KEY:\n return isSetKey();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case POST_ID:\n return isSetPostId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case ENTITY_ID:\r\n return isSetEntityId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case RECORD:\n return isSetRecord();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case RECORD:\n return isSetRecord();\n }\n throw new IllegalStateException();\n }", "boolean hasFieldId();", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case NUM:\n return isSetNum();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case DATAS:\n return isSetDatas();\n }\n throw new IllegalStateException();\n }", "boolean hasField0();", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case PARENT_ID:\n return isSetParentId();\n case TYPE:\n return isSetType();\n case VALUE:\n return isSetValue();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case INSTITUTION_ID:\n return isSetInstitutionID();\n case PRODUCTIDS:\n return isSetProductids();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case DATA:\n return isSetData();\n case FILE_ID:\n return isSetFileID();\n case SIZE:\n return isSetSize();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case BROKER_ID:\n return isSetBrokerID();\n case ACCOUNT_ID:\n return isSetAccountID();\n case ALGORITHM:\n return isSetAlgorithm();\n case MEMO:\n return isSetMemo();\n case CURRENCY_ID:\n return isSetCurrencyID();\n }\n throw new IllegalStateException();\n }", "public boolean isSetFields() {\n return this.fields != null;\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case ID:\r\n return isSetId();\r\n case NAME:\r\n return isSetName();\r\n case ARTISTS:\r\n return isSetArtists();\r\n case RELEASE_DATE:\r\n return isSetRelease_date();\r\n case GENRES:\r\n return isSetGenres();\r\n case TRACK_NAMES:\r\n return isSetTrack_names();\r\n case TEXT:\r\n return isSetText();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case RELATED_ID:\n return isSetRelatedId();\n case COMPANY_ID:\n return isSetCompanyId();\n case COMPANY_GROUP_ID:\n return isSetCompanyGroupId();\n case MACHINE_ID:\n return isSetMachineId();\n case ACTIVE_START_TIMESTAMP:\n return isSetActiveStartTimestamp();\n case ACTIVED_END_TIMESTAMP:\n return isSetActivedEndTimestamp();\n case MACHINE_INNER_IP:\n return isSetMachineInnerIP();\n case MACHINE_OUTER_IP:\n return isSetMachineOuterIP();\n case CREATE_TIMESTAMP:\n return isSetCreateTimestamp();\n case LASTMODIFY_TIMESTAMP:\n return isSetLastmodifyTimestamp();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCOUNT_IDS:\n return isSetAccountIds();\n case COMMODITY_IDS:\n return isSetCommodityIds();\n }\n throw new IllegalStateException();\n }", "boolean hasField1();", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case TYPE:\n return isSetType();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case TYPE:\n return isSetType();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case X:\n return isSetX();\n case Y:\n return isSetY();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case PAGE_NO:\n return isSetPageNo();\n case PAGE_SIZE:\n return isSetPageSize();\n case USER_ID:\n return isSetUserId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case STAFF_ID:\n return isSetStaffId();\n case LOGIN_TYPE:\n return isSetLoginType();\n case LOGIN_ID:\n return isSetLoginId();\n case LOGIN_PASS:\n return isSetLoginPass();\n case LOGIN_PASS_ENCRYPT:\n return isSetLoginPassEncrypt();\n case PHONE_NUMBER:\n return isSetPhoneNumber();\n case STAFF_TYPE:\n return isSetStaffType();\n case STATUS:\n return isSetStatus();\n case CERT_STATUS:\n return isSetCertStatus();\n case AVG_SCORE:\n return isSetAvgScore();\n case TAG:\n return isSetTag();\n case FINISH_ORDER_COUNT:\n return isSetFinishOrderCount();\n case ASSIGN_ORDER_COUNT:\n return isSetAssignOrderCount();\n case EXTRA_DATA1:\n return isSetExtraData1();\n case EXTRA_DATA2:\n return isSetExtraData2();\n case CREATE_TIME:\n return isSetCreateTime();\n case UPDATE_TIME:\n return isSetUpdateTime();\n case REGISTER_TIME:\n return isSetRegisterTime();\n case LAST_RECEPTION_TIME:\n return isSetLastReceptionTime();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case EXAM_ID:\n return isSetExam_id();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new java.lang.IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case ID:\r\n return isSetId();\r\n case ID_CURSA:\r\n return isSetIdCursa();\r\n case NR_LOC:\r\n return isSetNrLoc();\r\n case CLIENT:\r\n return isSetClient();\r\n }\r\n throw new java.lang.IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case PID:\n return isSetPid();\n case EXCEPTION_ID:\n return isSetExceptionId();\n case USER_ID:\n return isSetUserId();\n case REPORT_DATE:\n return isSetReportDate();\n case UN_ASSURE_CONDITION:\n return isSetUnAssureCondition();\n case HOUSE_PROPERY_CONDITION:\n return isSetHouseProperyCondition();\n case REMARK:\n return isSetRemark();\n case CREATE_DATE:\n return isSetCreateDate();\n case CREATE_ID:\n return isSetCreateId();\n case UPDATE_DATE:\n return isSetUpdateDate();\n case UPDATE_ID:\n return isSetUpdateId();\n case PROJECT_ID:\n return isSetProjectId();\n case LEGAL_LIST:\n return isSetLegalList();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case PATIENT_ID:\n return isSetPatient_id();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IS_STAR:\n return isSetIs_star();\n case IS_DISTINCT:\n return isSetIs_distinct();\n case OP:\n return isSetOp();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }" ]
[ "0.79060113", "0.79060113", "0.78340495", "0.7804059", "0.77943885", "0.7781808", "0.7781808", "0.7781808", "0.7781808", "0.7647456", "0.7547984", "0.75460887", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.7542836", "0.75246507", "0.7520702", "0.7520702", "0.751953", "0.7518164", "0.7518164", "0.7518164", "0.7518164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7517164", "0.7508356", "0.7479083", "0.7464391", "0.7451459", "0.7447079", "0.7447079", "0.7433717", "0.7412549", "0.73947453", "0.7393119", "0.7387168", "0.73829824", "0.7380476", "0.7375034", "0.73727405", "0.7358692", "0.7354425", "0.73483366", "0.73479605", "0.7346301", "0.7346301", "0.7344815", "0.7338453", "0.7334115", "0.7333811", "0.7325778", "0.732082", "0.7320275", "0.7319424", "0.7309807", "0.7309807", "0.7309807", "0.7309807", "0.7309807" ]
0.7324956
92
check for required fields check for substruct validity
public void validate() throws org.apache.thrift.TException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validate() throws org.apache.thrift.TException {\n if (institutionID == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'institutionID' was not present! Struct: \" + toString());\n }\n if (productids == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'productids' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (is_null == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'is_null' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (partition_exprs == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_exprs' was not present! Struct: \" + toString());\n }\n if (partition_infos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_infos' was not present! Struct: \" + toString());\n }\n if (rollup_schemas == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'rollup_schemas' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_destApp()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destApp' is unset! Struct:\" + toString());\n }\n\n if (!is_set_destPellet()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destPellet' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetResourcePlanName()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resourcePlanName' is unset! Struct:\" + toString());\n }\n\n if (!isSetPoolPath()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'poolPath' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'id' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_inputs()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'inputs' is unset! Struct:\" + toString());\n }\n\n if (!is_set_streams()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'streams' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (functionName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'functionName' was not present! Struct: \" + toString());\n }\n if (className == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'className' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (emailId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'emailId' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (classification == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'classification' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetColName()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'colName' is unset! Struct:\" + toString());\n }\n\n if (!isSetColType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'colType' is unset! Struct:\" + toString());\n }\n\n if (!isSetStatsData()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'statsData' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (code == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'code' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (op == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'op' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUserProfileId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'userProfileId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityType' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (limb == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'limb' was not present! Struct: \" + toString());\n }\n if (pos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'pos' was not present! Struct: \" + toString());\n }\n if (ori == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'ori' was not present! Struct: \" + toString());\n }\n if (speed == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'speed' was not present! Struct: \" + toString());\n }\n if (angls == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'angls' was not present! Struct: \" + toString());\n }\n if (mode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'mode' was not present! Struct: \" + toString());\n }\n if (kin == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'kin' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (pos != null) {\n pos.validate();\n }\n if (ori != null) {\n ori.validate();\n }\n if (speed != null) {\n speed.validate();\n }\n if (angls != null) {\n angls.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_status()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'status' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n if (!is_set_feature()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'feature' is unset! Struct:\" + toString());\n }\n\n if (!is_set_predictResult()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'predictResult' is unset! Struct:\" + toString());\n }\n\n if (!is_set_msg()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'msg' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (feature != null) {\n feature.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (key_column_name == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_name' was not present! Struct: \" + toString());\n }\n if (key_column_type == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_type' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'is_preaggregation' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (parseId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'parseId' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'constituentIndex' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (parseId != null) {\n parseId.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUuidFicha()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'uuidFicha' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (headerTransport != null) {\n headerTransport.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (statusCode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'statusCode' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private void fillMandatoryFields() {\n\n }", "public void checkFields(){\n }", "public void validate() throws org.apache.thrift.TException {\n if (tableType == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableType' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'numCols' because it's a primitive and you chose the non-beans generator.\n // alas, we cannot check 'numClusteringCols' because it's a primitive and you chose the non-beans generator.\n if (tableName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableName' was not present! Struct: \" + toString());\n }\n if (dbName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'dbName' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (hdfsTable != null) {\n hdfsTable.validate();\n }\n if (hbaseTable != null) {\n hbaseTable.validate();\n }\n if (dataSourceTable != null) {\n dataSourceTable.validate();\n }\n }", "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.heightValue, \" Рост: \", b) ||\n !CalendarHelper.isFieldValid(startProgramDateValue, \" Старт программы: \", b) ||\n !new ComboBoxFieldHelper<Client>().isFieldValid(clientFIOValue, \" Клиент: \", b))\n {\n result = false;\n }\n\n return result;\n }", "public static boolean checkMandatoryFields(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private void fillMandatoryFields_custom() {\n\n }", "private void checkRequiredFields() {\n // check the fields which should be non-null\n if (configFileName == null || configFileName.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configFileName' should not be null.\");\n }\n if (configNamespace == null || configNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configNamespace' should not be null.\");\n }\n if (searchBundleManagerNamespace == null\n || searchBundleManagerNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'searchBundleManagerNamespace' should not be null.\");\n }\n if (entityManager == null) {\n throw new DAOConfigurationException(\n \"The 'entityManager' should not be null.\");\n }\n }", "public static boolean checkMandatoryFieldsRegistration(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private void setupRequiredValidation() {\n requiredMafExpressions.put(FIELD_HUGO_SYMBOL, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_HUGO_SYMBOL, \"may not be blank\");\r\n requiredMafExpressions.put(FIELD_ENTREZ_GENE_ID, Pattern.compile(\"\\\\d+\")); // number\r\n requiredFieldDescriptions.put(FIELD_ENTREZ_GENE_ID, \"must be an integer number\");\r\n requiredMafExpressions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_TUMOR_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_TUMOR_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_VALIDATION_STATUS, Pattern.compile(\"Valid|Wildtype|Unknown|\\\\S?\"));\r\n requiredFieldDescriptions.put(FIELD_VALIDATION_STATUS, \"must be Valid, Wildtype, Unknown, or blank\");\r\n requiredMafExpressions.put(FIELD_CHROMOSOME, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_CHROMOSOME, \"must be one of: X, Y, M, 1-22, or full name of unassigned fragment\");\r\n setupMafSpecificChecks();\r\n }", "private void validateFields() {\n\t\t// TODO validate ID\n\t\tboolean valid = (mEdtAddress.getText().length() > 2)\n\t\t\t\t&& (mEdtPassword.getText().length() > 0);\n\t\tmBtnNext.setEnabled(valid);\n\t}", "private void validateData() {\n }", "public interface FieldValidator {\n static boolean validateStringIfPresent(Object o, int len) {\n return o == null || o instanceof String && !((String) o).isEmpty() && ((String) o).length() < len;\n }\n\n static boolean validateString(Object o, int len) {\n return !(o == null || !(o instanceof String) || ((String) o).isEmpty() || (((String) o).length() > len));\n }\n\n static boolean validateInteger(Object o) {\n if (o == null) {\n return false;\n }\n try {\n Integer.valueOf(o.toString());\n } catch (NumberFormatException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateDateWithFormat(Object o, DateTimeFormatter formatter, boolean allowedInPast) {\n if (o == null) {\n return false;\n }\n try {\n LocalDate date = LocalDate.parse(o.toString(), formatter);\n if (!allowedInPast) {\n return date.isAfter(LocalDate.now());\n }\n } catch (DateTimeParseException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateJsonIfPresent(Object o) {\n return o == null || o instanceof JsonObject && !((JsonObject) o).isEmpty();\n }\n\n static boolean validateJson(Object o) {\n return !(o == null || !(o instanceof JsonObject) || ((JsonObject) o).isEmpty());\n }\n\n static boolean validateJsonArrayIfPresent(Object o) {\n return o == null || o instanceof JsonArray && !((JsonArray) o).isEmpty();\n }\n\n static boolean validateJsonArray(Object o) {\n return !(o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty());\n }\n\n static boolean validateDeepJsonArrayIfPresent(Object o, FieldValidator fv) {\n if (o == null) {\n return true;\n } else if (!(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n } else {\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n }\n return true;\n }\n\n static boolean validateDeepJsonArray(Object o, FieldValidator fv) {\n if (o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n }\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n return true;\n }\n\n static boolean validateBoolean(Object o) {\n return o != null && o instanceof Boolean;\n }\n\n static boolean validateBooleanIfPresent(Object o) {\n return o == null || o instanceof Boolean;\n }\n\n static boolean validateUuid(Object o) {\n try {\n UUID uuid = UUID.fromString((String) o);\n return true;\n } catch (IllegalArgumentException e) {\n return false;\n }\n }\n\n static boolean validateUuidIfPresent(String o) {\n return o == null || validateUuid(o);\n }\n\n boolean validateField(Object value);\n\n Pattern EMAIL_PATTERN =\n Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\n static boolean validateEmail(Object o) {\n Matcher matcher = EMAIL_PATTERN.matcher((String) o);\n return matcher.matches();\n }\n}", "@Override\n\tprotected boolean verifyFields() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean checkDataStructure(Data data) throws ImportitException {\n\t\tdata.setDatabase(39);\n\t\tdata.setGroup(3);\n\t\tboolean validDb = checkDatabaseName(data);\n\t\tboolean validHead = false;\n\t\tboolean validTable = false;\n\t\tboolean existImportantFields = false;\n\t\tif (validDb) {\n\t\t\tList<Field> headerFields = data.getHeaderFields();\n\t\t\tList<Field> tableFields = data.getTableFields();\n\t\t\tvalidHead = false;\n\t\t\tvalidTable = false;\n\t\t\ttry {\n\n\t\t\t\tvalidHead = checkWarehouseGroupProperties(headerFields, data.getOptionCode().useEnglishVariables());\n\t\t\t\tvalidTable = checkFieldList(tableFields, 39, 3, false, data.getOptionCode().useEnglishVariables());\n\t\t\t\tString[] checkDataCustomerPartProperties = checkDataWarehouseGroupProperties(data);\n\t\t\t\texistImportantFields = checkDataCustomerPartProperties.length == 2;\n\n\t\t\t} catch (ImportitException e) {\n\t\t\t\tlogger.error(e);\n\t\t\t\tdata.appendError(Util.getMessage(\"err.structure.check\", e.getMessage()));\n\t\t\t}\n\t\t}\n\t\tif (validTable && validHead && validDb & existImportantFields) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }", "@Override\n\tprotected Boolean isValid(String[] fields) {\n\t\t//check - evnet_id, yes, maybe, invited, no\n return (fields.length > 4);\n\t}", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}", "@Override\n\tpublic boolean isValid(SchemaField field, Data data) {\n\t\treturn false;\n\t}", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "private void validateFields () throws ModelValidationException\n\t\t\t{\n\t\t\t\tString pcClassName = getClassName();\n\t\t\t\tModel model = getModel();\n\t\t\t\t// check for valid typed public non-static fields\n\t\t\t\tList keyClassFieldNames = model.getAllFields(keyClassName);\n\t\t\t\tMap keyFields = getKeyFields();\n\n\t\t\t\tfor (Iterator i = keyClassFieldNames.iterator(); i.hasNext();)\n\t\t\t\t{\n\t\t\t\t\tString keyClassFieldName = (String)i.next();\n\t\t\t\t\tObject keyClassField = \n\t\t\t\t\t\tgetKeyClassField(keyClassName, keyClassFieldName);\n\t\t\t\t\tint keyClassFieldModifiers = \n\t\t\t\t\t\tmodel.getModifiers(keyClassField);\n\t\t\t\t\tString keyClassFieldType = model.getType(keyClassField);\n\t\t\t\t\tObject keyField = keyFields.get(keyClassFieldName);\n\n\t\t\t\t\tif (Modifier.isStatic(keyClassFieldModifiers))\n\t\t\t\t\t\t// we are not interested in static fields\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif (!model.isValidKeyType(keyClassName, keyClassFieldName))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new ModelValidationException(keyClassField,\n\t\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\t\"util.validation.key_field_type_invalid\", //NOI18N\n\t\t\t\t\t\t\tkeyClassFieldName, keyClassName));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!Modifier.isPublic(keyClassFieldModifiers))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new ModelValidationException(keyClassField,\n\t\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\t\"util.validation.key_field_public\", //NOI18N\n\t\t\t\t\t\t\tkeyClassFieldName, keyClassName));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (keyField == null)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (!keyClassFieldType.equals(model.getType(keyField)))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new ModelValidationException(keyClassField,\n\t\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\t\"util.validation.key_field_type_mismatch\", //NOI18N\n\t\t\t\t\t\t\tkeyClassFieldName, keyClassName, pcClassName));\n\t\t\t\t\t}\n\n\t\t\t\t\t// remove handled keyField from the list of keyFields\n\t\t\t\t\tkeyFields.remove(keyClassFieldName);\n\t\t\t\t}\n\n\t\t\t\t// check whether there are any unhandled key fields\n\t\t\t\tif (!keyFields.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tObject pcClass = model.getClass(pcClassName);\n\t\t\t\t\tString fieldNames = StringHelper.arrayToSeparatedList(\n\t\t\t\t\t\tnew ArrayList(keyFields.keySet()));\n\n\t\t\t\t\tthrow new ModelValidationException(pcClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_field_missing\", //NOI18N\n\t\t\t\t\t\tpcClassName, keyClassName, fieldNames));\n\t\t\t\t}\n\t\t\t}", "@Test\n\tpublic void testCheckForEmptyFields() {\n\t\t\n\t\t// Case 1: when all fields are present\n\t\tRequestData requestDataObj1 = new RequestData();\n\t\trequestDataObj1.setDomain(\"PBTV\");\n\t\trequestDataObj1.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj1.setSourceSystemName(\"CDI\");\n\t\tboolean expectedResponse1 = true;\n\t\tboolean response1 = tokenisationMainObj.checkForEmptyFields(requestDataObj1);\n\t\tassertEquals(response1, expectedResponse1);\n\n\t\t// Case 2: when any of them is empty\n\t\tRequestData requestDataObj2 = new RequestData();\n\t\trequestDataObj2.setDomain(\"PBTV\");\n\t\trequestDataObj2.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj2.setSourceSystemName(\"\");\n\t\tboolean expectedResponse2 = false;\n\t\tboolean response2 = tokenisationMainObj.checkForEmptyFields(requestDataObj2);\n\t\tassertEquals(response2, expectedResponse2);\n\t}", "public static boolean checkMandatoryFieldsUpdateUser(Object obj) {\n\n\t\tif (obj instanceof UpdateUserDTO) {\n\n\t\t\tUpdateUserDTO updateUserDTO = (UpdateUserDTO) obj;\n\n\t\t\tif (updateUserDTO.getFirstName().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getLastName().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getAddress1().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getCity().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getState().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getZipCode().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getNewEmailId().trim().isEmpty()\n\n\t\t\t) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private boolean checkFields() {\n\t\tboolean status = true;\n\n\t\treturn status;\n\t}", "public abstract List<String> requiredFields();", "public void partValidation () throws ValidationException {\n\n // checks for a name to be entered\n if (getPartName().isEmpty() || !getPartName().matches(\"^[a-zA-Z0-9_ ]*$\")){\n throw new ValidationException(\"Name field is invalid. Can't be blank. Must be alphanumeric\");\n\n // checks that minimum stock isn't less than 0\n }else if (getPartStockMin() < 0) {\n throw new ValidationException(\"Inventory minimum can't be less than 0\");\n\n } else if (getPartStockMax() < 0) {\n throw new ValidationException(\"Inventory max must be greater than 0\");\n\n // checks to make sure max stock is not less than the minimum\n }else if (getPartStockMax() < getPartStockMin()) {\n throw new ValidationException(\"Max inventory can't be less than the minimum\");\n\n // checks that stock on hadn is not less than the minimum\n } else if (getPartStock() < getPartStockMin()){\n throw new ValidationException(\"Part inventory can't be less than the minimum\");\n\n // part price can't be 0 or less\n }else if (getPartPrice() < 0){\n throw new ValidationException(\"Price has to be a positive number\");\n\n // max stock can't be less than what you already have\n }else if (getPartStockMax() < getPartStock()){\n throw new ValidationException(\"Max inventory can't be less than what you have on hand\");\n\n // check stock is between min and max\n } else if (getPartStock() < getPartStockMin() || getPartStock() > getPartStockMax()){\n throw new ValidationException(\"Inventory level must be between min and max\");\n\n }\n }", "private void validateFields() throws InvalidConnectionDataException {\n if (driver == null) throw new InvalidConnectionDataException(\"No driver field\");\n if (address == null) throw new InvalidConnectionDataException(\"No address field\");\n if (username == null) throw new InvalidConnectionDataException(\"No username field\");\n if (password == null) throw new InvalidConnectionDataException(\"No password field\");\n }", "void validateState() throws EPPCodecException {\n // add/chg/rem\n if ((addDsData == null) && (chgDsData == null) && (remKeyTag == null)) {\n throw new EPPCodecException(\"EPPSecDNSExtUpdate required attribute missing\");\n }\n \n // Ensure there is only one non-null add, chg, or rem\n\t\tif (((addDsData != null) && ((chgDsData != null) || (remKeyTag != null)))\n\t\t\t\t|| ((chgDsData != null) && ((addDsData != null) || (remKeyTag != null)))\n\t\t\t\t|| ((remKeyTag != null) && ((chgDsData != null) || (addDsData != null)))) {\n\t\t\tthrow new EPPCodecException(\"Only one add, chg, or rem is allowed\");\n\t\t}\n }", "protected void doExtraValidation(Properties props) {\n /* nothing by default */\n }", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "boolean hasFieldNested();", "private boolean checkFields() {\n boolean test = true;\n if (fname.isEmpty()) {\n test = false;\n }\n if (lname.isEmpty()) {\n test = false;\n }\n if (cin.isEmpty()) {\n test = false;\n }\n if (typeCompte.equals(\"Bancaire\")) {\n if (decouvertNF.isEmpty())\n test = false;\n } else if (typeCompte.equals(\"Epargne\")) {\n if (tauxInteretNF.isEmpty())\n test = false;\n }\n if (s_datePK.getValue() == null) {\n s_datePK.setStyle(\"-fx-border-color:red;-fx-border-radius:3px;-fx-border-size: 1px;\");\n test = false;\n }\n\n return test;\n }", "public void validate() {\n transportStats.validate(this);\n\n for (String unitName : produces) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit name \" + unitName + \" in build unit stats\");\n }\n\n for (Map.Entry<String, String> entry : buildCities.entrySet()) {\n String terrainName = entry.getKey();\n String cityName = entry.getValue();\n Args.validate(!TerrainFactory.hasTerrainForName(terrainName), \"Illegal terrain \" + terrainName + \" in build cities stats\");\n Args.validate(!CityFactory.hasCityForName(cityName), \"Illegal city \" + cityName + \" in build cities stats\");\n }\n\n for (String unitName : supplyUnits) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units stats\");\n }\n\n for (String unitName : supplyUnitsInTransport) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units in transport stats\");\n }\n\n Args.validate(StringUtil.hasContent(primaryWeaponName) && !WeaponFactory.hasWeapon(primaryWeaponName),\n \"Illegal primary weapon \" + primaryWeaponName + \" for unit \" + name);\n Args.validate(StringUtil.hasContent(secondaryWeaponName) && !WeaponFactory.hasWeapon(secondaryWeaponName),\n \"Illegal secondary weapon \" + secondaryWeaponName + \" for unit \" + name);\n }", "@Override\n public boolean validate() throws ValidationException\n {\n boolean isValid = super.validate();\n return checkAAField() && isValid;\n }", "boolean hasNestedField();", "protected abstract List<TemporalField> validFields();", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "public void validate() {\n if (valid) return;\n \n layer = getAttValue(\"layer\").getString();\n hasFrame = getAttValue(\"hasframe\").getBoolean();\n\n valid = true;\n }", "@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "boolean hasNestedOuterField();", "private boolean checkFields() {\n if (editTxtName.getText().equals(\"\")) return false;//name\n if (editTxtDesc.getText().equals(\"\")) return false;//desc\n if (editClrColor.getValue() == null) return false;//color\n if (oldEnvironment == null) return false;//environment is null\n return true;//everything is valid\n }", "@Override\n public JsonNode required(String fieldName) {\n return _reportRequiredViolation(\"Node of type %s has no fields\",\n ClassUtil.nameOf(getClass()));\n }", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\r\n public void validate() {\r\n }", "public boolean hasFieldErrors();", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "private void checkRep() {\n\t\tassert (this != null) : \"this Edge cannot be null\";\n\t\tassert (this.label != null) : \"this Edge's label cannot be null\";\n\t\tassert (this.child != null) : \"this Edge's child cannot be null\";\n\t}", "boolean valid() {\n boolean valid = true;\n\n if (!isAgencyLogoPathValid()) {\n valid = false;\n }\n if (!isMemFieldValid()) {\n valid = false;\n }\n if (!isLogNumFieldValid()) {\n valid = false;\n }\n\n return valid;\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "public void check(ResourceMemberInterface resource) {\n\t\tassert resource.getParent() != null;\r\n\t\tassert resource.getName() != null;\r\n\t\tassert resource.getLabel() != null;\r\n\t\tassert resource.getTLModelObject() != null;\r\n\t\tassert resource.getTLModelObject().getListeners() != null;\r\n\t\tassert !resource.getTLModelObject().getListeners().isEmpty();\r\n\t\tassert Node.GetNode(resource.getTLModelObject()) == resource;\r\n\t\tresource.getFields(); // don't crash\r\n\t}", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "protected void validate()\r\n\t{\r\n\t\tif( this.mapper==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the Mapper of this dataset.\");\r\n\t\tif( this.input_format==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the InputFormat of this dataset.\");\r\n\t\tif( this.inputs==null || this.inputs.size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the input path(s) of this dataset\");\r\n\t\tif ( this.getSchema()==null || this.getSchema().size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the schema of this dataset first\");\r\n\t}", "public void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tif (MappingClassElement.VERSION_CONSISTENCY == \n\t\t\t\t\tmappingClass.getConsistencyLevel())\n\t\t\t\t{\n\t\t\t\t\tMappingFieldElement versionField =\n\t\t\t\t\t\t validateVersionFieldExistence();\n\t\t\t\t\tString className = mappingClass.getName();\n\t\t\t\t\tString fieldName = versionField.getName();\n\t\t\t\t\tString columnName = null;\n\t\t\t\t\tColumnElement column = null;\n\n\t\t\t\t\tif (versionField instanceof MappingRelationshipElement)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow constructFieldException(fieldName, \n\t\t\t\t\t\t\t\"util.validation.version_field_relationship_not_allowed\");//NOI18N\n\t\t\t\t\t}\n\t\t\t\t\telse if (MappingFieldElement.GROUP_DEFAULT != \n\t\t\t\t\t\tversionField.getFetchGroup()) // must be in DFG\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow constructFieldException(fieldName, \n\t\t\t\t\t\t\t\"util.validation.version_field_fetch_group_invalid\");//NOI18N\n\t\t\t\t\t}\n\n\t\t\t\t\tvalidatePersistenceFieldAttributes(className, fieldName);\n\t\t\t\t\tcolumnName = validateVersionFieldMapping(versionField);\n\t\t\t\t\tcolumn = validateTableMatch(className, fieldName, columnName);\n\t\t\t\t\tvalidateColumnAttributes(className, fieldName, column);\n\t\t\t\t}\n\t\t\t}", "@Test (priority = 2)\n\tpublic void TC2_CheckAllFields_Exisit ()\n\n\t{\n\t\tCreateUserPage UserObj = new CreateUserPage (driver);\n\n\t\t// This is to Validate If all fields of create user page are existing\n\t\tUserObj.Validate_AllFields_Exsist();\n\t\n\n\t}", "private boolean checkIfHasRequiredFields(BoxItem shareItem){\n return shareItem.getSharedLink() != null && shareItem.getAllowedSharedLinkAccessLevels() != null;\n }", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "boolean isValidSubResource(Object fieldValue) {\n return fieldValue != null\n && BaseEntity.class.isAssignableFrom(fieldValue.getClass())\n && fieldValue.getClass().getDeclaredAnnotation(Sensible.class) == null;\n }", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "protected void validate() {\n // no op\n }", "@Override\n\t\tpublic void checkPreconditions() {\n\t\t}", "protected boolean isValidData() {\n return true;\n }", "public boolean isRequired();", "public void validate() throws org.apache.thrift.TException {\n if (levelInfo != null) {\r\n levelInfo.validate();\r\n }\r\n }", "public void validate() {\n\t\tClass<?> clazz = this.getModelObject().getClass();\n\t\tif (!ArenaUtils.isObservable(clazz)) {\n\t\t\tthrow new RuntimeException(\"La clase \" + clazz.getName() + \" no tiene alguna de estas annotations \" + ArenaUtils.getRequiredAnnotationForModels() + \" que son necesarias para ser modelo de una vista en Arena\");\n\t\t}\n\t\t// TODO: Validate children bindings?\n\t}", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void validate() {\n\t}", "void checkValid();", "private void validateInputParameters(){\n\n }", "public boolean validate(Struct data) {\r\n\t\tif (data == null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tif (this.options.size() == 0) {\r\n\t\t\tOperationContext.get().errorTr(437, data);\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.options.size() == 1) \r\n\t\t\treturn this.options.get(0).validate(data);\r\n\t\t\r\n\t\tfor (DataType dt : this.options) {\r\n\t\t\tif (dt.match(data)) \r\n\t\t\t\treturn dt.validate(data);\r\n\t\t}\r\n\t\t\r\n\t\tOperationContext.get().errorTr(438, data);\t\t\t\r\n\t\treturn false;\r\n\t}", "private void validate() throws BaseException\n {\n boolean okay = true;\n\n //TODO: check the bases in seq for validity\n // If the type is RNA, the base T is not allowed\n // If the type is DNA, the base U is not allowed\n // If a disallowed type is present, set okay to false.\n \n if (!okay)\n {\n throw new BaseException();\n }\n }", "@Override\r\n\tprotected void validate() {\n\t}", "public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }", "public boolean validateInputFields(){\n if(titleText.getText().isEmpty() || descriptionText.getText().isEmpty()){\n showError(true, \"All fields are required. Please complete.\");\n return false;\n }\n if(locationCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a location.\");\n return false;\n }\n if(contactCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a contact.\");\n return false;\n }\n if(typeCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select the type.\");\n return false;\n }\n if(customerCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a customer.\");\n return false;\n }\n if(userCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a user.\");\n return false;\n }\n return true;\n }", "public void validate() {}" ]
[ "0.7539473", "0.7470685", "0.73328", "0.73043805", "0.7298061", "0.729446", "0.72569036", "0.7224551", "0.71366", "0.7128815", "0.71165687", "0.7091956", "0.70724976", "0.7051207", "0.7035449", "0.7030357", "0.69572055", "0.6901006", "0.68596476", "0.66924965", "0.6679102", "0.66009253", "0.65313935", "0.62010986", "0.61848575", "0.61259055", "0.6083906", "0.6063293", "0.60390776", "0.60092676", "0.59969974", "0.59764105", "0.5975134", "0.5965426", "0.5947123", "0.59211963", "0.59210396", "0.5890079", "0.5883033", "0.58675796", "0.5824343", "0.58208555", "0.57999337", "0.5780263", "0.5778963", "0.57571256", "0.5754995", "0.57535636", "0.575207", "0.57406974", "0.5738019", "0.5732182", "0.5732182", "0.5732182", "0.5725959", "0.5717935", "0.5707082", "0.5689564", "0.5678824", "0.5659613", "0.563895", "0.56265545", "0.56129754", "0.5606331", "0.55893886", "0.55720633", "0.5569079", "0.55644745", "0.55609626", "0.5560878", "0.5547359", "0.554383", "0.55407053", "0.55268306", "0.5522114", "0.5516839", "0.5515996", "0.55135864", "0.5513486", "0.55004585", "0.5499786", "0.5498752", "0.5498527", "0.5497031", "0.54961646", "0.5472353", "0.5472322", "0.5471887", "0.5467704", "0.5466929", "0.546053", "0.5447728", "0.54457057", "0.5432366", "0.54314744", "0.5430985", "0.542758", "0.54251343", "0.5422624", "0.5421156", "0.5419439" ]
0.0
-1
TODO Autogenerated method stub
@Override public IBinder onBind(Intent intent) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onCreate() { super.onCreate(); getLocation(); registerReceiver(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onDestroy() { super.onDestroy(); cleanDate() ; /*服务被杀死时发送广播重启服务 com.jumeng.repairmanager.receiver.BootReceiver*/ Intent intent=new Intent(Consts.RESTART_SERVICE); sendBroadcast(intent); stopForeground(true); }
{ "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
/Snackbar.make(view, "Ouvrir Boite mail", Snackbar.LENGTH_LONG) .setAction("Action", null).show();
@Override public void onClick(View view) { Intent i = new Intent(Intent.ACTION_SEND); i.setType("message/rfc822"); i.putExtra(Intent.EXTRA_EMAIL , new String[]{""}); i.putExtra(Intent.EXTRA_SUBJECT, ""); i.putExtra(Intent.EXTRA_TEXT , ""); try { startActivity(Intent.createChooser(i, "Envoyer un mail")); } catch (android.content.ActivityNotFoundException ex) { Toast.makeText(MainActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Snackbar.make(v, \"I'm dead! =(\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }", "void showErrorSnackbar();", "public void SnackBarB() {\n Snackbar.make(getWindow().getDecorView().getRootView(),\n \"Cálculos sobre cinemática de rotación.\", Snackbar.LENGTH_LONG).show();\n }", "private void showSnackBar(String message) {\n }", "void onSnackBarActionClicked(int uniqueId, View view);", "private void showSnackbarMessage(String message){\n if(view != null){\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onQuedadaCreadaError() {\n btn_publicar.setEnabled(true);\n Snackbar.make(myView,\"Error al crear la quedada\", Snackbar.LENGTH_SHORT).show();\n\n }", "@Override\n public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {\n Snackbar.make(findViewById(R.id.activity_coordinator_layout), t.getLocalizedMessage(), Snackbar.LENGTH_INDEFINITE).show();\n }", "public void DisplaySnackBarAboveBar(String message, Boolean setAction) {\n int marginSide = 0;\n int marginBottom = 150;\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout,\n message,\n Snackbar.LENGTH_LONG\n );\n\n if (setAction) {\n snackbar.setAction(\"Share Now\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, \"please visit https://www.noobsplanet.com\");\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, \"Send to \"));\n }\n });\n }\n\n View snackbarView = snackbar.getView();\n CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) snackbarView.getLayoutParams();\n params.setMargins(\n params.leftMargin + marginSide,\n params.topMargin,\n params.rightMargin + marginSide,\n params.bottomMargin + marginBottom + 100\n );\n\n snackbarView.setLayoutParams(params);\n snackbar.show();\n }", "private void showSnackBar(String message) {\n if(getActivity()!=null) {\n Snackbar snackbar = Snackbar.make(getActivity().findViewById(android.R.id.content),\n message, Snackbar.LENGTH_SHORT);\n View sbView = snackbar.getView();\n TextView textView = sbView\n .findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(getActivity(), R.color.white));\n snackbar.show();\n }\n }", "private void snackBar(String msg) {\n MySnackBar.createSnackBar(Objects.requireNonNull(getContext()), Objects.requireNonNull(getView()), msg);\n }", "private void muestraMensaje(int idMensaje) {\n final Snackbar snack=Snackbar.make(mLayout,idMensaje,Snackbar.LENGTH_LONG).\n setAction(R.string.texto_cerrar, v -> {\n // No necesitamos hacer nada, solo que se cierre\n });\n snack.show();\n }", "public void showSnackBar(final View view, final String message) {\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }", "public static void showSnackBar(Context context, LinearLayout mainLayout, String msg, String btnText, int length){\n Resources resources = context.getResources();\n\n Snackbar snackbar = Snackbar\n .make(mainLayout, msg, length )\n .setAction(resources.getText(R.string.ok), new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(ContextCompat.getColor(context, R.color.home_yellow));\n\n // Changing action button text color\n View sbView = snackbar.getView();\n sbView.setBackgroundColor(ContextCompat.getColor(context, R.color.background_edittext));\n\n TextView textView = (TextView) sbView.findViewById(com.google.android.material.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(context, R.color.edittext_text));\n textView.setMaxLines(5);\n snackbar.show();\n }", "public static void showSnackBar(Context context, String msg) {\n\n Snackbar.make(((Activity) context).findViewById(android.R.id.content), \"\" + msg, Snackbar.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n limpiarCampos();\n if (validacion()) {//ejecuta la funcion validacion\n guardar_login();\n\n } else {\n Snackbar.make(findViewById(android.R.id.content), \"Faltan completar campos \",\n Snackbar.LENGTH_LONG)\n .setDuration(3000)\n .show();\n\n\n }\n }", "private void createSnackbar(String message) {\n Snackbar.make(mLayout, message, Snackbar.LENGTH_LONG).show();\n }", "public static void showSnackbar(Activity activity, final View parent, final String message, final String actionText) {\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n final Snackbar snackbar = Snackbar.make(parent, message, Snackbar.LENGTH_LONG)\n .setAction(actionText, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n snackbar.show();\n }\n });\n\n }", "public void showToast(String text)\n {\n Text icon = GlyphsDude.createIcon(FontAwesomeIconName.CHECK_CIRCLE,\"1.5em\");\n icon.setFill(Color.WHITE);\n Label l = new Label(text) ;\n l.setTextFill(Color.WHITE);\n l.setGraphic(icon);\n snackbar = new JFXSnackbar(PrinciplePane);\n snackbar.enqueue( new JFXSnackbar.SnackbarEvent(l));\n }", "public static void showRedSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(RED));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_cross, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }", "public static void showSnackbar(Activity context, String message){\r\n Snackbar.make(context.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG)\r\n .setAction(\"Dismiss\", new View.OnClickListener(){\r\n @Override\r\n public void onClick(View v){\r\n // Dismisses automatically\r\n }\r\n }).setActionTextColor(context.getResources().getColor(R.color.colorAccent))\r\n .show();\r\n }", "public static void showGreenSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(GREEN));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_checkmark, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }", "@Override\n public void onSuccess(Void unused) {\n Snackbar.make(save, R.string.sucessfull_update, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\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 }", "protected void showTopSnackBar(String message, int bColor) {\n\n Snackbar snack = Snackbar.make(getWindow().getDecorView().findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n View snackbarView = snack.getView();\n snackbarView.setBackgroundColor(bColor);\n// TextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\n// textView.setTextColor(Color.WHITE);\n// textView.setGravity(Gravity.CENTER_HORIZONTAL);\n// FrameLayout.LayoutParams params =(FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n// params.gravity = Gravity.TOP;\n// snackbarView.setLayoutParams(params);\n snack.show();\n }", "@Override\n public void run() {\n snackbar.setVisibility(View.GONE); //This will remove the View. and free s the space occupied by the View\n }", "private void showUndoSnackbar() {\n View view = ((Activity) this.context).findViewById(R.id.paletteActivity);\n\n Snackbar snackbar = Snackbar.make(view, R.string.undoColorShift,\n Snackbar.LENGTH_LONG);\n\n snackbar.setAction(\"UNDO\", v -> undoChange());\n snackbar.show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void SnackShowTop(String message, View view) {\n Snackbar snack = Snackbar.make(view, message, Snackbar.LENGTH_LONG);\n View view_layout = snack.getView();\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) view_layout.getLayoutParams();\n params.gravity = Gravity.TOP;\n view_layout.setLayoutParams(params);\n snack.show();\n }", "public interface OnSnackBarActionListener {\n /**\n * On snack bar action clicked.\n *\n * @param uniqueId the unique id\n * @param view the mView\n */\n void onSnackBarActionClicked(int uniqueId, View view);\n}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String message = String.valueOf(guardiansName.get(position));\n clickedGuardian = new String[]\n {String.valueOf(guardiansPhone.get(position)),\n String.valueOf(guardiansName.get(position)),};\n snackbar = Snackbar.make(getActivity().findViewById(R.id.myCoordinatorLayout), message, Snackbar.LENGTH_LONG);\n snackbar.setAction(R.string.Update, new UpdateGuardian());\n snackbar.show();\n }", "public void displaySnackBar(View layout,int message,int bgcolor){\n Snackbar snack=null;\n View snackView;\n\n if(message == com.ibeis.wildbook.wildbook.R.string.offline)\n snack=Snackbar.make(layout,message,Snackbar.LENGTH_INDEFINITE);\n else\n snack=Snackbar.make(layout,message,Snackbar.LENGTH_SHORT);\n snackView = snack.getView();\n snackView.setBackgroundColor(bgcolor);\n snack.show();\n }", "private SnackbarHelper() {\n\n}", "@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Snackbar.make(v, \"断开失败...\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "public void showWarningMessage(View view){\n\n //Show popup to warn user about the entered start and destiantion Addresses\n builder = new AlertDialog.Builder(this);\n //Setting message manually and performing action on button click\n builder.setMessage(\"Please insert a start and a destination address!\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // finish();\n Toast.makeText(getApplicationContext(),\"you choose yes action for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n });\n /* .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"you choose no action for for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n } );*/\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"WARNING!\");\n alert.show();\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "public void showNotification(String notificationText) {\n View parentLayout = findViewById(android.R.id.content);\n Snackbar mySnackbar = Snackbar.make(parentLayout, notificationText, Snackbar.LENGTH_LONG);\n mySnackbar.show();\n }", "private void showPermissionSnackbar() {\n Snackbar.make(\n findViewById(R.id.container), R.string.permission_explanation, Snackbar.LENGTH_LONG)\n .setAction(R.string.permission_explanation_action, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n requestFineLocationPermission();\n }\n })\n .show();\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View view) {\n createServer();\n Snackbar.make(view, \"Adding server done\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "@Override\n public void onFailure(@NonNull @NotNull Exception e) {\n Snackbar.make(save, R.string.update_fail, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "public void 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 showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "void showForbiddenErrorSnackbar();", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tAlertDialog fuck = builder.create();\n\t\t\tfuck.show();\n\t\t}", "@Override\n public void onClick(View view) {\n Toast msg = Toast.makeText(NicogetActivity.this, \"Je confirme !\", Toast.LENGTH_LONG);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }", "@Override\n public void onPeticionesRecibidasObtenidasError() {\n\n Snackbar.make(myView,\"No ha sido posible obtener la lista de peticiones pendientes\", Snackbar.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "protected void showMessage(@NonNull final String message) {\n SnackbarManager.show(Snackbar.with(this).text(message).colorResource(R.color.blende_red).swipeToDismiss(true));\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "public void msgErreur(){\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Entrée invalide\");\n alert.setHeaderText(\"Corriger les entrées invalides.\");\n alert.setContentText(\"Les informations entrées sont erronnées\");\n\n alert.showAndWait();\n \n\n}", "private void showAlert() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setTitle(\"Info..\");\r\n builder.setMessage(\"Your password reset email has been sent!\\n\" +\r\n \"\\n\" +\r\n \"We have sent a password reset email to your email address:\\n\" +\r\n \"\\n\" +\r\n input_email.getText().toString()+\"\\n\" +\r\n \"\\n\" +\r\n \"Please check your inbox to continue.\");\r\n\r\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n finish();\r\n }\r\n });\r\n /* builder.setNegativeButton(\"cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });*/\r\n // create and show the alert dialog\r\n AlertDialog dialog = builder.create();\r\n dialog.show();\r\n }", "void showToast(String message);", "void showToast(String message);", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Snackbar.make(findViewById(R.id.actie_add), \"Database kan niet gelezen worden\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }", "public static void showWarningSnackBar(View layout, String text) {\n Snackbar s = Snackbar.make(layout, text, Snackbar.LENGTH_INDEFINITE);\n s.setAction(\"Retry\", v -> {\n s.dismiss();\n });\n s.show();\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "private void makeToast(String msg)\n {\n FinanceApp.serviceFactory.getUtil().makeAToast(this, msg);\n }", "public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n Log.d(\"POST\", \"ERROR: \" + error.toString());\n Snackbar.make(mView.findViewById(R.id.activity_register_screen), R.string.email_already_registered_text,\n Snackbar.LENGTH_SHORT)\n .show();\n }", "public void notificacionToast(String mensaje){\n Toast toast = Toast.makeText(getApplicationContext(),mensaje,Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0);\n toast.show();\n }", "private void showErrorToast() {\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Snackbar snackbar = Snackbar.make(findViewById(android.R.id.content), \"Error occurred! Please log out and log in again to upload the interview.\" + \"\\n\" + \"Note: Do not log out if you want to resume the offline interview process.\", Snackbar.LENGTH_LONG);\n View snackbarView = snackbar.getView();\n TextView tv = (TextView) snackbarView.findViewById(android.support.design.R.id.snackbar_text);\n tv.setTextColor(getResources().getColor(R.color.dashboard_count_color));\n tv.setMaxLines(5);\n //tv.setTextSize(17);\n //tv.setGravity(0);\n //snackbarView.setBackgroundColor(getResources().getColor(R.color.newblack));\n snackbar.show();\n }", "@Override public void onClick(View v) {\n Snackbar.make(groupViewHolder.itemView, \"Group was toggled\", Snackbar.LENGTH_SHORT).show();\n }", "void AlertaValidacion(String title, String message){\n AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);\n builder.setTitle(title);\n builder.setMessage(message).setPositiveButton(\"ACEPTAR\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "public void onClick(DialogInterface dialog,int which) {\n\t\t\t Toast.makeText(getApplicationContext(),\"Receipt sent to email.\", Toast.LENGTH_SHORT).show();\n\t\t\t dialog.dismiss();\n\t\t\t }", "private void createSnack() {\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message = \"Good! Connected to Internet\";\n color = Color.WHITE;\n getUserLocation();\n } else {\n message = \"Sorry! Not connected to internet\";\n color = Color.RED;\n }\n\n Snackbar snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n\n View sbView = snackbar.getView();\n// TextView textView = (TextView) sbView.findViewById(a);\n// textView.setTextColor(color);\n snackbar.show();\n }", "public void btnpress(View view) {\n NewMessageNotification newMessageNotification = new NewMessageNotification();\n newMessageNotification.notify(MainActivity.this,\"Danger\",1);\n }", "private void showMsg(String msg) {\r\n\r\n\t\tAlertDialog ad = new AlertDialog.Builder(this).create();\r\n\t\tad.setCancelable(false); // This blocks the 'BACK' button\r\n\t\tad.setMessage(msg);\r\n\t\tad.setButton(DialogInterface.BUTTON_POSITIVE, \"Clear messsge\", new DialogInterface.OnClickListener() {\r\n\t\t @Override\r\n\t\t public void onClick(DialogInterface dialog, int which) {\r\n\t\t dialog.dismiss(); \r\n\t\t }\r\n\t\t});\r\n\t\tad.show();\r\n\t}", "@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n\n // Showing error message if something goes wrong.\n Snackbar snackbar = Snackbar\n .make(coordinatorLayout, \"No internet connection!\", Snackbar.LENGTH_LONG)\n .setAction(\"RETRY\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(Color.RED);\n\n // Changing action button text color\n View sbView = snackbar.getView();\n TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.YELLOW);\n\n snackbar.show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "public void ShowValidation(String msg) {\n try {\n tv_validationtext.setText(msg);\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n } catch (Exception e) {\n e.printStackTrace();\n appsingleton.ToastMessage(\"\" + e.getMessage());\n }\n }", "public void onForgotClicked(View v) {\n\n }", "@Override\n public void onClick(View v) {\n builder.setMessage(R.string.alertMessage)\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //buClick();\n //finish();\n dialog.cancel();\n calculat();\n\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n\n }\n });\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(R.string.alertTitle);\n alert.show();\n }", "private void showErrorView() {\n Log.d(\"lodd\", \"showSuccessView: hjfj91919515\");\n\n }", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message = \"Good! Connected to Internet\";\n color = Color.WHITE;\n } else {\n message = \"Sorry! Not connected to internet\";\n color = Color.RED;\n }\n\n Snackbar snackbar = Snackbar\n .make(findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n\n View sbView = snackbar.getView();\n TextView textView = sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(color);\n snackbar.show();\n }", "@Override\n public void onFailure(@NonNull Call<CommonResponse> call, @NonNull Throwable t) {\n Snackbar.make(findViewById(android.R.id.content), \"\" + t.getMessage(), Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n progressBar.setVisibility(View.GONE);\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n AppUtil.displaySingleActionAlert(mContext, getString(R.string.title), getString(R.string.error_msg) + \"(ERR-635)\", getString(R.string.ok));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_contact_inner, container, false);\n setupView(view);\n sendButton.setOnClickListener(view1 -> {\n if (isValid()) {\n String name = nameEditText.getText().toString();\n String phone = phoneEditText.getText().toString();\n String email = emailEditText.getText().toString();\n String message = messageEditText.getText().toString();\n ServerTool.sendFeedback(getActivity(), name, email, phone, message, new ServerTool.APICallBack<Integer>() {\n @Override\n public void onSuccess(Integer response) {\n if (response == 1) {\n customToastView(getActivity(), getResources().getString(R.string.send_messege_succsess));\n ((HomeActivity) getActivity()).getPresenter().openHome();\n } else {\n customToastView(getActivity(), getResources().getString(R.string.send_messege_succsess));\n }\n }\n\n @Override\n public void onFailed(int statusCode, ResponseBody responseBody) {\n customToastView(getActivity(), getResources().getString(R.string.no_connection));\n// Toast.makeText(getActivity(), getString(R.string.no_connection), Toast.LENGTH_SHORT).show();\n\n }\n });\n\n }\n\n\n });\n\n return view;\n }", "private void showToastRequired(String message) {\n Toast.makeText(this, getString(R.string.validation_required, message),\n Toast.LENGTH_SHORT).show();\n }", "public static void showSnack(final Context context, View view, boolean isConnected) {\n if (snackbar == null) {\n snackbar = Snackbar\n .make(view, context.getString(R.string.network_failure), Snackbar.LENGTH_INDEFINITE)\n .setAction(\"SETTINGS\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(android.provider.Settings.ACTION_SETTINGS);\n context.startActivity(intent);\n }\n });\n View sbView = snackbar.getView();\n TextView textView = sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.WHITE);\n }\n\n if (!isConnected && !snackbar.isShown()) {\n snackbar.show();\n } else {\n snackbar.dismiss();\n snackbar = null;\n }\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"\"+e.getMessage(),Toast.LENGTH_SHORT).show();\n\n }", "void showAlert(String message);", "@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }", "@Override\n public void onClick(View view) {\n clearDisplay();\n table.setVisibility(View.INVISIBLE);\n saveButton.setVisibility(View.INVISIBLE);\n cancelButton.setVisibility(View.INVISIBLE);\n Snackbar snackbar = Snackbar.make(view, R.string.cancelled, Snackbar.LENGTH_SHORT);\n snackbar.show();\n }", "public void ClickCerrarSesion() {\n // Se redirige a la actividad de Editat Perfil\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Cerrar Sesion\");\n builder.setMessage(\"¿Estas seguro que quieres cerrar sesión?, Esto te devolvera a la pantalla de inicio\");\n // Boton para cerrar sesion\n builder.setPositiveButton(\"Cerrar Sesión\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmsg();\n\t\t\t}", "void showErrorSnackbar(long syncInterval) {\r\n // Initialize the the parameters that will be used to create the String message\r\n int timePassed;\r\n String timeUnit;\r\n if (syncInterval < DAY_IN_SECONDS) {\r\n // If less than a day has passed, convert the number of seconds to hours\r\n timePassed = (int) (syncInterval / HOUR_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.hour_singular);\r\n } else {\r\n timeUnit = getString(R.string.hour_multiple);\r\n }\r\n\r\n } else {\r\n // Convert the time passed to days\r\n timePassed = (int) (syncInterval / DAY_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.day_singular);\r\n } else {\r\n timeUnit = getString(R.string.day_multiple);\r\n }\r\n }\r\n\r\n // Create the String message to display to the user to notify them of how long\r\n // since the last sync\r\n String timeString = getString(R.string.error_last_sync, timePassed + \" \" + timeUnit);\r\n\r\n // Create a Snackbar to hold the message\r\n mSnackBar = Snackbar.make(mDrawerLayout,\r\n timeString,\r\n Snackbar.LENGTH_INDEFINITE\r\n );\r\n\r\n // Set the Snackbar to be dismissed on click\r\n mSnackBar.getView().setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n mSnackBar.dismiss();\r\n }\r\n });\r\n\r\n // Show the Snackbar\r\n mSnackBar.show();\r\n }", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "private void showErrorMessage(String message) {\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(this, message, duration);\n toast.show();\n\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }" ]
[ "0.7368937", "0.7349551", "0.7299585", "0.7271768", "0.72577024", "0.72354466", "0.6982316", "0.69197875", "0.6919547", "0.6873553", "0.68219084", "0.67959225", "0.67882884", "0.6716386", "0.6664343", "0.66454124", "0.6614279", "0.6535092", "0.6525175", "0.6507046", "0.6489314", "0.64876103", "0.6458641", "0.64181113", "0.64042395", "0.639286", "0.63913757", "0.63816", "0.6376222", "0.6344548", "0.6301495", "0.62704605", "0.62591815", "0.6240664", "0.6229164", "0.62086326", "0.6195445", "0.61869186", "0.615981", "0.6158034", "0.6151727", "0.6129236", "0.61243653", "0.6114357", "0.6081927", "0.60677963", "0.6038869", "0.6031211", "0.6031211", "0.6025649", "0.5988819", "0.59803206", "0.597167", "0.5970175", "0.5946043", "0.594422", "0.5944061", "0.5944061", "0.59374213", "0.59322816", "0.59293133", "0.5924186", "0.591853", "0.59128195", "0.5912249", "0.59094375", "0.5906178", "0.59032536", "0.58955586", "0.5887803", "0.58856755", "0.58816195", "0.58760536", "0.58684695", "0.5862292", "0.5855763", "0.5849035", "0.5849035", "0.5849035", "0.5839053", "0.58369386", "0.58343095", "0.5825876", "0.5824022", "0.579816", "0.5788324", "0.57881343", "0.57862717", "0.57731277", "0.5758489", "0.5756362", "0.5748129", "0.57478106", "0.57467765", "0.5745926", "0.5743399", "0.574306", "0.5740916", "0.5740916", "0.5740799", "0.57383966" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.global, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch(id) { case R.id.search_bar: Intent change = new Intent(this, SearchableActivity.class); this.startActivity(change); break; case R.id.action_settings: Intent param = new Intent(this, Parametres.class); this.startActivity(param); break; case R.id.search_bar2: Intent searchparts = new Intent(this, SearchableActivity2.class); this.startActivity(searchparts); break; default: return super.onOptionsItemSelected(item); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904231", "0.78061396", "0.7767007", "0.77273244", "0.76318634", "0.7621818", "0.7585249", "0.7531511", "0.7488678", "0.74574006", "0.74574006", "0.7439257", "0.7421747", "0.7403457", "0.73920685", "0.7387285", "0.7379893", "0.73710734", "0.7363068", "0.73565257", "0.7346117", "0.73421544", "0.73308754", "0.7328614", "0.7326444", "0.73191214", "0.7316894", "0.73141056", "0.7304816", "0.7304816", "0.73023325", "0.7298775", "0.7294159", "0.72872293", "0.7283658", "0.72814363", "0.72793216", "0.72604835", "0.72604835", "0.72604835", "0.72604495", "0.7260065", "0.72506464", "0.7223512", "0.7220288", "0.721808", "0.7204778", "0.72007537", "0.7199708", "0.7193875", "0.7185878", "0.7178243", "0.7169468", "0.7168278", "0.71544755", "0.7154114", "0.71363086", "0.7135266", "0.7135266", "0.7129425", "0.71291506", "0.712514", "0.71239674", "0.7123848", "0.71223545", "0.7118021", "0.7117761", "0.7117381", "0.7117381", "0.7117381", "0.7117381", "0.7117378", "0.71157014", "0.7112743", "0.71105623", "0.710936", "0.7106081", "0.7100549", "0.7099009", "0.70957214", "0.7094029", "0.7094029", "0.7086948", "0.70828027", "0.70810676", "0.7080609", "0.707419", "0.70687926", "0.7062512", "0.70614976", "0.70604354", "0.7051683", "0.7037832", "0.7037832", "0.7036669", "0.70357877", "0.70357877", "0.7033191", "0.7030764", "0.70303047", "0.70192975" ]
0.0
-1
Insert the fragment by replacing any existing fragment
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { FragmentManager fragmentManager = getSupportFragmentManager(); // Highlight the selected item has been done by NavigationView item.setChecked(true); // Set action bar title setTitle(item.getTitle()); // Handle navigation view item clicks here. int id = item.getItemId(); if (id == R.id.nav_camera) { fragmentManager.beginTransaction() .replace(R.id.flContent, ShowStreamRt.newInstance()) .commit(); } else if (id == R.id.nav_gallery) { fragmentManager.beginTransaction() .replace(R.id.flContent, Choice.newInstance()) .commit(); } else if (id == R.id.nav_slideshow) { fragmentManager.beginTransaction() .replace(R.id.flContent, HistoList.newInstance()) .commit(); } else if (id == R.id.nav_manage) { fragmentManager.beginTransaction() .replace(R.id.flContent, ShowRt.newInstance()) .commit(); } else if (id == R.id.nav_geoloc) { fragmentManager.beginTransaction() .replace(R.id.flContent, Geolocalisation.newInstance()) .commit(); } else if (id == R.id.nav_mytickets) { fragmentManager.beginTransaction() .replace(R.id.flContent, MyticketsList.newInstance()) .commit(); }else if (id == R.id.nav_details) { fragmentManager.beginTransaction() .replace(R.id.flContent, ShowMyTickets.newInstance()) .commit(); }else if (id == R.id.nav_astreintes) { fragmentManager.beginTransaction() .replace(R.id.flContent, PlannigAstreintes.newInstance()) .commit(); }else if (id == R.id.nav_pointage) { fragmentManager.beginTransaction() .replace(R.id.flContent, Pointage.newInstance()) .commit(); }else if (id == R.id.nav_tickets_flm) { fragmentManager.beginTransaction() .replace(R.id.flContent, Stream_Aix.newInstance()) .commit(); } // Close the navigation drawer DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(int index, String fragment);", "private void placeNewFragment(Fragment f) {\r\n\t\tFragmentManager manager = getSupportFragmentManager();\r\n FragmentTransaction fragmentTransaction = manager.beginTransaction();\r\n fragmentTransaction.replace(R.id.fragmentHolder, f);\r\n fragmentTransaction.addToBackStack(null);\r\n fragmentTransaction.commit();\r\n\t}", "private void insertNestedFragment(int position) {\n FragmentTransaction transaction = getChildFragmentManager().beginTransaction();\n transaction.replace(R.id.fragment_pager_view_container, getFragmentForPosition(position)).commit();\n }", "private void updateFragment() {\n Fragment fragment = getSupportFragmentManager().findFragmentByTag(CURRENT_FRAGMENT);\n if (fragment != null) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n ft.detach(fragment).attach(fragment).commit();\n }\n }", "private void replaceFragment(int pos) {\n Fragment fragment = null;\n switch (pos) {\n case 0:\n //mis tarjetas\n fragment = new CardsActivity();\n break;\n case 1:\n //buscador online\n fragment = new CardsActivityOnline();\n break;\n case 2:\n //active camera\n Intent it = new Intent(this, com.google.zxing.client.android.CaptureActivity.class);\n startActivityForResult(it, 0);\n break;\n case 3:\n ParseUser.getCurrentUser().logOut();\n finish();\n onBackPressed();\n break;\n default:\n //fragment = new CardsActivity();\n break;\n }\n\n if(null!=fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.main_content, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n }", "public void replaceFragment(int wordPosition){\n // access the fragment manager and begin transaction\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n\n // create word fragment and get the word from the recycler view fragment\n // word position is the list position of the word in the list of words\n WordFragment wordFragment = new WordFragment();\n Bundle args = new Bundle();\n args.putInt(WordFragment.WORD_INDEX, wordPosition);\n wordFragment.setArguments(args);\n // replace the word list with the word fragment\n ft.replace(R.id.fragment_container_top, wordFragment);\n ft.addToBackStack(null);\n\n ft.commit();\n }", "public void replaceFragment(Fragment destFragment)\n {\n FragmentManager fragmentManager = this.getSupportFragmentManager();\n\n // Begin Fragment transaction.\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n // Replace the layout holder with the required Fragment object.\n fragmentTransaction.replace(R.id.content_frame, destFragment);\n\n // Commit the Fragment replace action.\n fragmentTransaction.addToBackStack(null).commit();\n }", "public void replaceFragment1(Fragment destFragment)\n {\n FragmentManager fragmentManager = this.getSupportFragmentManager();\n\n // Begin Fragment transaction.\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n // Replace the layout holder with the required Fragment object.\n fragmentTransaction.replace(R.id.UpcomingFrame, destFragment);\n\n // Commit the Fragment replace action.\n fragmentTransaction.commit();\n }", "private void replaceFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n android.support.v4.app.FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.addToBackStack(null);\n if (fragment == listFragment) {\n transaction.replace(R.id.fragment_content, fragment, LIST_FRAGMENT_TAG);\n } else if (fragment == supportMapFragment) {\n transaction.replace(R.id.fragment_content, fragment, SUPPORT_FRAGMENT_TAG);\n }\n transaction.commit();\n }", "public void replaceFragment(Fragment destFragment)\n {\n FragmentManager fragmentManager = this.getSupportFragmentManager();\n\n // Begin Fragment transaction.\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n // Replace the layout holder with the required Fragment object.\n fragmentTransaction.replace(R.id.MissedFrame, destFragment);\n\n // Commit the Fragment replace action.\n fragmentTransaction.commit();\n }", "public void append(String fragment);", "protected void replaceFragment(Fragment fragment, String id, int resId) {\n getSupportFragmentManager()\n .beginTransaction()\n .add(resId, fragment, id)\n .addToBackStack(id)\n .commit();\n }", "public void replace(int start, int end, String fragment);", "public void switchToAddFragment() {\n FragmentManager manager = getSupportFragmentManager();\n manager.beginTransaction().replace(R.id.fragment_container, new AddActivity()).commit();\n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n insertNestedFragment(position);\n }", "private void fragmentChange(){\n HCFragment newFragment = new HCFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.hc_layout, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "private void fillUpFragment() {\n try {\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n sensorFragment = getSensorFragment();\n transaction.replace(R.id.sensor_frame, sensorFragment, getSensorName());\n transaction.commit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void addFragments() {\n\n Fragment f = SideFilterFragment.newInstance();\n getFragmentManager().beginTransaction().replace(R.id.side_filter_container, f).commit();\n }", "public void updateFragment(int CAT_ID){\n ViewContentFragment f_c_s=new ViewContentFragment();\n if(CAT_ID>0){\n f_c_s.setCat_id(CAT_ID);\n }else{\n f_c_s.setCat_id(1);\n }\n // replace the fragment with the new fragment and add it to BackStack,\n // then pop it from BackStack to get to the old fragment without overlapping the\n // old fragments...\n\n getFragmentManager().beginTransaction().replace(R.id.content_Layout,f_c_s).\n addToBackStack(String.valueOf(CAT_ID)).commit();\n getFragmentManager().popBackStack();\n }", "void coreInsertSiblingsBefore(CoreDocumentFragment fragment) throws HierarchyException, NodeMigrationException, DeferredBuildingException;", "void fragment(String fragment);", "void fragment(String fragment);", "public void replaceFragment(int id_content, Fragment fragment) {\r\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r\n transaction.replace(id_content, fragment);\r\n transaction.commit();\r\n }", "protected void replaceLoginFragment() {\n\n\n }", "@Override\n public void onViewSelected (int wordPosition) {\n // replace the fragment\n replaceFragment(wordPosition);\n }", "public void replaceFragment(Fragment fragment, String TAG) {\n\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.popBackStack(TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n FragmentTransaction fragmentTransaction = fragmentManager .beginTransaction();\n fragmentTransaction .replace(R.id.content_restaurant_main_cl_fragment, fragment);\n fragmentTransaction .addToBackStack(TAG);\n fragmentTransaction .commit();\n//\n// getSupportFragmentManager()\n// .beginTransaction()\n// .disallowAddToBackStack()\n//// .setCustomAnimations(R.anim.slide_left, R.anim.slide_right)\n// .replace(R.id.content_restaurant_main_cl_fragment, fragment, TAG)\n// .commit();\n }", "@Override\n public void onClick(View v) {\n CompteEnsg nextFrag = new CompteEnsg();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "@Override\r\n\t\tprotected String doInBackground(Void... params) {\n\t\t\taddmainfragment.insert();//可加个boolean值,做判断\r\n\t\t\treturn null;\r\n\t\t}", "private void replaceFragment(int pos) {\n Fragment fragment = null;\n switch (pos) {\n case 0:\n Intent intent = new Intent(GestioneViaggioGalleriaActivity.this, MainActivity.class);\n startActivity(intent);\n break;\n case 1:\n Intent intent_creaViaggio = new Intent(GestioneViaggioGalleriaActivity.this, CreaIlTuoViaggioActivity.class);\n startActivity(intent_creaViaggio);\n break;\n case 2:\n Intent intent_viaggi = new Intent(GestioneViaggioGalleriaActivity.this, ProfiloViaggiActivity.class);\n intent_viaggi.putExtra(\"viaggio\", \"viaggio\");\n startActivity(intent_viaggi);\n break;\n case 3:\n Intent intent_preferiti = new Intent(GestioneViaggioGalleriaActivity.this, ProfiloViaggiActivity.class);\n intent_preferiti.putExtra(\"preferiti\", \"preferiti\");\n startActivity(intent_preferiti);\n break;\n case 4:\n Intent intent_impostazioni = new Intent(GestioneViaggioGalleriaActivity.this, SettingsActivity.class);\n startActivity(intent_impostazioni);\n break;\n case 5: new android.support.v7.app.AlertDialog.Builder(GestioneViaggioGalleriaActivity.this)\n .setTitle(\"Let's go\")\n .setMessage(\"Questa applicazione è stata creata da: \" +\n \"Alessandro Barlocco, Annalisa Bovone, Paola Silvestre\")\n .setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .setIcon(R.drawable.logo_pani_piccolo)\n .show();\n break;\n default:\n break;\n }\n\n if (fragment != null) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.activity_main, fragment);\n transaction.commit();\n }\n }", "protected void replaceLoginFragment() {\n\n// fragmentManager\n// .beginTransaction()\n// .setCustomAnimations(R.anim.left_enter, R.anim.right_out)\n// .replace(R.id.frameContainer, new Login_Fragment(),\n// Utils.Login_Fragment).commit();\n }", "private void getFragment(Fragment fragment) {\n // create a FragmentManager\n FragmentManager fm = getFragmentManager();\n // create a FragmentTransaction to begin the transaction and replace the Fragment\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n // replace the FrameLayout with new Fragment\n fragmentTransaction.replace(R.id.fragment_layout, fragment);\n // save the changes\n fragmentTransaction.commit();\n }", "private void loadFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(com.limkee1.R.id.flContent, fragment);\n fragmentTransaction.commit();\n\n }", "public void replaceFragment(Fragment fragment, String tag) {\n for (int i = 0; i < fragmentManager.getBackStackEntryCount(); ++i) {\n fragmentManager.popBackStackImmediate();\n }\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, fragment);\n fragmentTransaction.commit();\n fragmentTransaction.addToBackStack(tag);\n\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }", "void insertTagContent(TemplateTag tag){\r\n \t\tif(tag.found){\r\n \t\t\ttemplateParts.set(tag.templatePosition,tag.getContent());\r\n \t\t}\r\n \t}", "@Override\n public void onClick(View v) {\n android.app.Fragment onjF = null;\n onjF = new BlankFragment();\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.fragment,onjF).commit();\n }", "void switchToFragment(Fragment newFrag) {\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment, newFrag)\n .addToBackStack(null)\n .commit();\n }", "private void updateCurrentFragment(Fragment newFragment, String tag) {\n FragmentTransaction ft = fm.beginTransaction();\n\n // remove current fragment\n if (currentFragment != null) {\n ft.remove(currentFragment);\n }\n\n // set, add and commit new fragment\n currentFragment = newFragment;\n ft.add(currentFragment, tag).commit();\n }", "@Override\n public void onClick(View v) {\n CompteEtudiant nextFrag = new CompteEtudiant();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "private void changeFragment() {\n TeacherAddNotificationFragment fragment = new TeacherAddNotificationFragment();\n // Put classIds to bundle and set bundle to fragment\n Bundle bundle = new Bundle();\n bundle.putString(\"ListIDs\", classesIds);\n fragment.setArguments(bundle);\n\n // Replace fragment\n getFragmentManager().beginTransaction().replace(R.id.main, fragment)\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void refreshFragment() {\n }", "@Override\n public void onComplete(@NonNull Task<Void> task)\n {\n FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, new Fragment_VacatureOmschrijving()).addToBackStack(\"tag\").commit();\n Toast.makeText(getActivity(), \"Uw sollicitatie is succesvol verzonden\", Toast.LENGTH_LONG).show();\n }", "private void setFragment(Fragment fragment, String tag){\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n //fragmentTransaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n //fragmentTransaction.add(R.id.content, fragment, tag);\n fragmentTransaction.replace(R.id.content, fragment);\n fragmentTransaction.commit();\n }", "@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 }", "public static void replaceFragmentHistory(Fragment fragment, AppCompatActivity context) {\n /* if (isUsedBundle) {\n Bundle args = new Bundle();\n args.putInt(bundleParameterName, bundleValue);\n fragment.setArguments(args);\n }*/\n if (context != null) {\n try {\n FragmentTransaction transaction =\n context.getSupportFragmentManager().beginTransaction();\n transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_in_right);\n\n transaction.replace(R.id.menuContainer, fragment);\n transaction.addToBackStack(null);\n transaction.commitAllowingStateLoss();\n\n } catch (IllegalStateException e) {\n e.printStackTrace();\n context.finish();\n }\n }\n }", "private void loadFragment(String name) {\n FragmentTransaction fragmentTransaction = MainActivity.fm.beginTransaction();\n // replace the FrameLayout with the new Fragment\n fragmentTransaction.replace(R.id.mainFrameLayout, MainActivity.currentFragment);\n fragmentTransaction.addToBackStack(name);\n fragmentTransaction.commit();\n }", "private void addBaseFragment(Fragment fragment) {\n\n if (mFragmentManager == null)\n mFragmentManager = getSupportFragmentManager();\n\n FragmentTransaction mFragmentTransaction = mFragmentManager.beginTransaction();\n mFragmentTransaction.replace(R.id.content_frame, fragment, fragment.getClass().getSimpleName().toString()).commit();\n\n }", "public void fragmentationOccured(ByteBufferWithInfo newFragment) {}", "private void refreshFragmentAfterdownloadedData() {\n Fragment fragmentToday = new FragmentToday();\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n ft.replace(R.id.fragmentToday, fragmentToday, \"FragmentToday\");\n ft.commit();\n\n Fragment fragment5days = new Fragment5days();\n FragmentTransaction ft5days = getSupportFragmentManager().beginTransaction();\n ft5days.replace(R.id.fragment5days, fragment5days, \"Fragment5days\");\n ft5days.commit();\n }", "private void defaultFragment() {\n\n Fragment fragment = new Helpline();\n FragmentManager fm = getFragmentManager();\n //TODO: try this with add\n fm.beginTransaction().replace(R.id.content_frame,fragment).commit();\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, createFragment(position + 1))\n .commit();\n }", "@Override\n public void onClick(View view) {\n Fragment newCase=new TripNoteAddFragment();\n FragmentTransaction transaction=getFragmentManager().beginTransaction();\n transaction.replace(R.id.content_frames,newCase); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n }", "private void loadFragment(Fragment fragment, String tag) {\n\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ft.replace(R.id.frame_tut, fragment, tag);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);\n ft.commit();\n }", "private void showSection(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n\n\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.main_frame, fragment);\n// fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "protected void switchContent(Fragment to) {\n if (mFragment != to) {\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n transaction.replace(R.id.activity_my_movie_content,to).commitAllowingStateLoss();\n mFragment = to;\n }\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "private void loadFragment(Fragment frag) {\n if (frag instanceof ConnectionsFragment) {\n String tag = getString(R.string.keys_fragment_connections);\n\n android.support.v4.app.FragmentTransaction transaction = getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.homeFragmentContainer, frag, tag);\n transaction.commit();\n } else {\n\n android.support.v4.app.FragmentTransaction transaction = getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.homeFragmentContainer, frag);\n transaction.commit();\n }\n }", "protected void pushFragment(Fragment fragment){\n\n if(fragment == null)\n return;\n\n android.app.FragmentManager fragmentManager = getFragmentManager();\n\n if(fragmentManager != null){\n android.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if(fragmentTransaction != null){\n //vacio hace referencia al id de la pantalla de bienvenida\n //fragmentTransaction.replace(R.id.vacio, fragment);\n //fragmentTransaction.commit();\n fragmentManager.beginTransaction().replace(R.id.vacio, fragment).addToBackStack(null).commit();\n }\n }\n\n }", "protected abstract void injectFragment(FragmentComponent fragmentComponent);", "public void refresh(){\n // close loading dialogs if they are open\n Fragment dialog = getSupportFragmentManager().findFragmentByTag(\"loading\");\n if (dialog != null) {\n loadingDialog.dismiss();\n }\n\n // update timestamp\n if (timestamp != null) {\n TextView time = findViewById(R.id.result_time_text);\n time.setText(getString(R.string.last_result, timestamp));\n }\n\n // destroy and recreate fragments with latest data\n Fragment loadedFragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);\n Fragment newFragment;\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n if (loadedFragment instanceof PsiFragment) {\n newFragment = PsiFragment.newInstance(psiValues);\n }\n else if (loadedFragment instanceof Pm25Fragment) {\n newFragment = Pm25Fragment.newInstance(pm25Values);\n }\n else{\n newFragment = HomeFragment.newInstance(psiValues,pm25Values);\n }\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.commit();\n }", "@Override\n public void onResultViewFinished() {\n MainFragment mainFragment = new MainFragment();\n\n createTransactionAndReplaceFragment(mainFragment, getString(R.string.frg_tag_main));\n }", "private void reDoFragments() {\n pageAdapter.notifyChangeInPosition(pageAdapter.getCount());\n\n fragments.clear();\n\n int i = 1;\n for (Article a : articles) {\n String count = String.format(\"%d of %d\", i++, articles.size());\n fragments.add(NewsFragment.newInstance(a.getTitle(), a.getAuthor(), a.getDescription(), a.getUrlToImage(), a.getTime(), count, a.getUrl()));\n }\n\n pageAdapter.notifyDataSetChanged();\n pager.setCurrentItem(0);\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame, fragment);\n fragmentTransaction.commit();\n\n }", "@Override\r\n public void changeFragment() {\r\n fm.beginTransaction()\r\n .replace(R.id.fragmentContainer, new ListWonderFragment())\r\n .commit();\r\n }", "private void resetFragment() {\n\t\tFragment fragment = hMapTabs.get(mSelectedTab).get(0);\n\t\thMapTabs.get(mSelectedTab).clear();\n\t\thMapTabs.get(mSelectedTab).add(fragment);\n\t\tFragmentManager manager = getSupportFragmentManager();\n\t\tFragmentTransaction ft = manager.beginTransaction();\n\t\tft.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n\t\tft.replace(R.id.realtabcontent, fragment);\n\t\tft.commit();\n\n\t\tshouldDisplayHomeUp();\n\n\t}", "private void toXW() {\n if (fragment_XW == null) {\n fragment_XW = new Fragment_XW();\n fragmenttransaction.add(R.id.frame_content, fragment_XW);\n } else {\n fragmenttransaction.show(fragment_XW);\n }\n }", "@Override\n public void onClick(View v) {\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n Fragment fragment = new FavoriteFragment();\n ft.replace(R.id.layout_fragment, fragment, \"FavoriteFragment\");\n ft.commit();\n }", "public void addContentFragment(Fragment fragment) {\n FragmentTransaction ft = mFragmentManager.beginTransaction();\n Fragment currentContentFragment = mFragmentManager.findFragmentById(mContentViewId);\n int backStackCount = mFragmentManager.getBackStackEntryCount();\n ft.addToBackStack(FRAGMENT_TAG + \"_\" + backStackCount);\n ft.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_left, R.anim.slide_out_right);\n // Manually increase the current fragment back stack count.\n ft.add(mContentViewId, fragment, FRAGMENT_TAG + \"_\" + (backStackCount + 1));\n ft.hide(currentContentFragment);\n ft.commit();\n }", "private void initFragment(Fragment newsFragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.fl_news, newsFragment);\n transaction.commit();\n\n }", "public void goAddFriends (View view){\n Fragment newFragment = new AddFriendsFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n\n }", "private void setFragmentMovie(Fragment fragmentMovie){\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.frame_fav, fragmentMovie)\n .addToBackStack(null)\n .commit();\n }", "private void startAddBookFragment() {\n if (this.menu != null) {\n this.menu.findItem(R.id.menu_search).setVisible(false);\n this.menu.findItem(R.id.add_book).setVisible(false);\n }\n\n // Create new fragment and transaction\n AddBookFragment addBookFragment = new AddBookFragment();\n\n // consider using Java coding conventions (upper first char class names!!!)\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack\n transaction.replace(R.id.activityAfterLoginId, addBookFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n\n }", "public static String insertBlock(String base_html, String delimiter, String block){\r\n delimiter = \"<!--\" + delimiter + \"-->\"; \r\n String[] parts = base_html.split(delimiter);\r\n String new_html = parts[0] + block + parts[2];\r\n return new_html;\r\n }", "private void setLastFragment() {\n Log.d(\"setLastFragments\", \"setLastFragments: start\");\n fragmentTransaction = getSupportFragmentManager().beginTransaction();\n Log.d(\"setLastFragments\", \"setLastFragments: begin\");\n Fragment showFragment = getLast();\n fragmentTransaction.show(showFragment);\n Log.d(\"setLastFragments\", \"setLastFragments: show\");\n fragmentTransaction.commit();\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame_layout, fragment);\n fragmentTransaction.commit();\n\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n if(position==0) {\n a=0;\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }else if (position==1){\n a=1;\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }\n }", "protected void pushFragment(Fragment fragment) {\n if (fragment == null)\n return;\n\n FragmentManager fragmentManager = getFragmentManager();\n if (fragmentManager != null) {\n FragmentTransaction ft = fragmentManager.beginTransaction();\n if (ft != null) {\n ft.replace(R.id.container, fragment);\n ft.commit();\n }\n }\n }", "private void loadFragment(Fragment fragment, String tag, int containerId) {\r\n\r\n fragmentManager = getSupportFragmentManager();\r\n\r\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\r\n\r\n // delete previous instant message fragment if exist, before adding new\r\n // one\r\n Fragment previousInstanceOfTheFragment = fragmentManager\r\n .findFragmentByTag(tag);\r\n\r\n if (previousInstanceOfTheFragment != null) {\r\n fragmentTransaction.remove(previousInstanceOfTheFragment);\r\n }\r\n\r\n fragmentTransaction.add(containerId, fragment, tag);\r\n fragmentTransaction.commit();\r\n }", "private void loadFragment(Fragment fragment, boolean addToBackStack) {\n FragmentTransaction transaction = getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.frame, fragment);\n if(addToBackStack) {\n transaction.addToBackStack(null);\n }\n transaction.commit();\n }", "@Override\r\n\tpublic boolean onNavigationItemSelected(int position, long id) {\n\t\tgetFragmentManager()\r\n\t\t\t\t.beginTransaction()\r\n\t\t\t\t.replace(R.id.container,\r\n\t\t\t\t\t\tPlaceholderFragment.newInstance(position + 1)).commit();\r\n\t\tsetCurpos(position+1);\r\n\t\treturn true;\r\n\t}", "private void setFragment(Fragment fragments) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.framelayout,fragments);\n fragmentTransaction.commit();\n }", "private void loadBookPageFragment() {\n\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.addToBackStack(\"ListView\"); // enables to press \"return\" and go back to the list view\n transaction.replace(R.id.main_fragment_container, new BookPageFragment());\n transaction.commit();\n }", "public void startRegisterFragment() {\n RegisterFragment registerFragment = new RegisterFragment();\n fragmentManager.beginTransaction().replace(R.id.fragment, registerFragment).commit();\n }", "void insert(String delta) {\n \n if (!acceptInsert(delta)) {\n clear();\n } \n \n int cursor = mDisplay.getSelectionStart();\n mDisplay.getText().insert(cursor, delta);\n \n }", "public void goMainStampCard() {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager\n .beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_fade_in,\n R.anim.abc_fade_out);\n fragmentTransaction.addToBackStack(null);\n FragmentMainStampCard fragmentMain = FragmentMainStampCard\n .newInstances();\n fragmentTransaction.replace(R.id.container, fragmentMain);\n fragmentTransaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.root_fragment, container, false);\n//replace root_frame with newGameView\n FragmentTransaction transaction = getFragmentManager()\n .beginTransaction();\n transaction.replace(R.id.root_frame, new NewGameView());\n transaction.commit();\n\n return view;\n }", "public void placePlayerFragment(Player player) {\n mToolBar.setTitle(player.getPerson().getName());\n getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.fragment_container,\n PlayerNationalityFragment.newFragment(player))\n //Allow users to backup through the fragments\n .addToBackStack(player.getPerson().getName())\n .commit();\n\n }", "@Override\n public void gofavouritepage() {\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container_home,new FavouriteFragment()).addToBackStack(\"Homepage\").commit();\n }", "public void run() {\n assert getFragmentManager() != null;\n Fragment currentFragment = getActivity().getSupportFragmentManager().findFragmentById(R.id.content_main);\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n if (Build.VERSION.SDK_INT >= 26) {\n ft.setReorderingAllowed(false);\n }\n ft.detach(currentFragment).attach(currentFragment).commit();\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n final Fragment[] fragments = {MapListFragment.newInstance(0), MyProfile.newInstance()};\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, fragments[position])\n .commit();\n }", "public void addFragment(Fragment fragment) {\n\n if (mFragmentManager == null)\n mFragmentManager = getSupportFragmentManager();\n\n mFragmentManager.beginTransaction()\n .replace(R.id.content_frame, fragment, fragment.getClass().getSimpleName().toString())\n .addToBackStack(fragment.getClass().getSimpleName().toString())\n .commit();\n }", "public void loadNewEdit(){\n fabAdd.hide();\n fabSave.show();\n\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragContainer1,new CourseEditFragment(),\"EDIT\")\n .addToBackStack(\"EDIT\")\n .commit();\n }" ]
[ "0.7290206", "0.6577835", "0.6399756", "0.6274405", "0.6236324", "0.62290114", "0.6149398", "0.60838735", "0.6081339", "0.6071032", "0.6068844", "0.6059895", "0.60295063", "0.5992277", "0.59757584", "0.59647787", "0.5958686", "0.5938803", "0.5936428", "0.5930564", "0.59123224", "0.59123224", "0.58877504", "0.5867504", "0.5800935", "0.57609105", "0.57290393", "0.5711775", "0.56916356", "0.5674133", "0.56553626", "0.5647028", "0.55987", "0.55783135", "0.55783135", "0.5578272", "0.55725497", "0.55652", "0.5560784", "0.5538664", "0.55361485", "0.5533677", "0.5525108", "0.55135196", "0.55124366", "0.55118245", "0.550851", "0.54973555", "0.54850405", "0.5476718", "0.54752797", "0.5470664", "0.54696816", "0.54521877", "0.5445507", "0.5442505", "0.54370075", "0.5435441", "0.5434402", "0.54314363", "0.54314363", "0.54314363", "0.54314363", "0.54314363", "0.54314363", "0.5421253", "0.5416254", "0.54031265", "0.5382836", "0.53716666", "0.53672737", "0.5365787", "0.53499097", "0.53483284", "0.5346808", "0.5345405", "0.53401464", "0.53218746", "0.5316861", "0.5313096", "0.5312606", "0.531108", "0.53110766", "0.5298434", "0.5294231", "0.52913254", "0.52865213", "0.52845037", "0.52722836", "0.5270622", "0.5267056", "0.52628165", "0.52625364", "0.5243546", "0.5239788", "0.5226888", "0.52217436", "0.52205896", "0.5203147", "0.5198724", "0.5193115" ]
0.0
-1
Runs whenever a new page is opened
@SuppressLint("RestrictedApi") public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); RecyclerView recyler = findViewById(R.id.recycler); ImageView wallpaper_view = findViewById(R.id.wallpaper_view); Button button = findViewById(R.id.button); FloatingActionButton refresh_button = findViewById(R.id.refresh_button); DrawerLayout drawer = findViewById(R.id.drawer_layout); final WebView siteview = findViewById(R.id.webview); // Hide everything to start with wallpaper_view.setVisibility(INVISIBLE); siteview.setVisibility(INVISIBLE); button.setVisibility(INVISIBLE); recyler.setVisibility(INVISIBLE); refresh_button.setVisibility(INVISIBLE); // Set the listener for the Set Wallpaper button // TODO Check whether this can just be done at startup only button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { new AlertDialog.Builder(v.getContext()) .setIcon(R.drawable.ic_alert) .setTitle(R.string.set_wallpaper) .setMessage(R.string.confirm_set_wallpaper) .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int which) { wallpaper_alert_interface(); } }) .setNegativeButton(R.string.no, null) .show(); } }); // Add JavaScript needed for WebView pages // TODO Only create webview for webview pages WebSettings webSettings = siteview.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setBuiltInZoomControls(true); // Allow zooming webSettings.setDisplayZoomControls(false); // Do not display buttons for zooming siteview.setWebViewClient(new WebViewClient() { @RequiresApi(api = Build.VERSION_CODES.O) @Override public void onLoadResource(WebView view, String url) { siteview.loadUrl("javascript:("+ "function() {" + " var page = document.getElementsByTagName('*');" + " for (x in page) {" + " var element = page[x];" + //General Rules " if (element.id == 'pid_6') {" + " document.body.innerHTML = element.outerHTML;" + " document.body.style.background='white';" + " document.body.style.textAlign='left';" + " document.body.style.padding = '10px 10px 10px 10px';" + //Jailbreak Rules and TTT rules " } else if (element.id == 'pid_4385' || element.id == 'pid_15525') {" + " document.body.innerHTML = element.outerHTML;" + " document.body.style.background='white';" + " document.body.style.textAlign='left';" + " document.body.style.padding = '2px 10px 10px 10px';" + //Jailbreak Rules (Comments Link) " } else if (element.href=='https://clwo.eu/showthread.php?tid=566') {" + " element.remove();" + //Warden Teleporter Rules " } else if (element.id == 'pid_25689') {" + " document.body.innerHTML = element.outerHTML;" + " document.body.style.background='white';" + " document.body.style.textAlign='left';" + " document.body.style.padding = '0px 10px 10px 10px';" + //Warden Teleporter Rules (Tag Hyperlinks) " } else if (element.tagName=='A') {" + " if (element.href.includes('clwo.eu/user')) {" + " element.removeAttribute('href');" + " }" + //Live Chat & Player Profiles " } else if (element.tagName=='NAV') {" + " element.remove();" + //Staff " } else if (element.className=='notifications') {" + " element.remove();" + " }" + " }" + "}" + ")()"); } }); if (id == R.id.nav_status) { // Server statuses Toast.makeText(getApplicationContext(), "Loading: Server Status", Toast.LENGTH_SHORT).show(); refresh_button.setVisibility(VISIBLE); getComments(); } else if (id == R.id.nav_general_rules) { // General rules Toast.makeText(getApplicationContext(), "Loading: General Rules", Toast.LENGTH_SHORT).show(); siteview.loadUrl("https://clwo.eu/showthread.php?tid=6"); } else if (id == R.id.nav_staff) { // Staff Toast.makeText(getApplicationContext(), "Loading: Staff", Toast.LENGTH_SHORT).show(); siteview.loadUrl("https://staff.aimless.eu/"); } else if (id == R.id.nav_forums) { // Forums Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://clwo.eu/index.php")); startActivity(browserIntent); } else if (id == R.id.nav_jailbreak_rules) { // Jailbreak rules Toast.makeText(getApplicationContext(), "Loading: Jailbreak Rules", Toast.LENGTH_SHORT).show(); siteview.loadUrl("https://clwo.eu/showthread.php?tid=562&pid=4385#pid4385"); } else if (id == R.id.nav_livechat) { // Live chat Toast.makeText(getApplicationContext(), "Loading: Live Chat", Toast.LENGTH_SHORT).show(); siteview.loadUrl("https://clwo.eu/jailbreak/livechat.php"); } else if (id == R.id.nav_profiles) { // Player Profiles Toast.makeText(getApplicationContext(), "Loading: Player Profiles", Toast.LENGTH_SHORT).show(); siteview.loadUrl("https://clwo.eu/jailbreak/profile.php"); // Disabled because Sourcebans does not work well with chrome-like browsers currently // } else if (id == R.id.nav_jb_sourcebans) { // // TODO JB SourceBans // // Jailbreak SourceBans // Toast.makeText(getApplicationContext(), "Loading: Jailbreak Sourcebans", // Toast.LENGTH_SHORT).show(); // siteview.loadUrl("https://clwo.eu/sourcebans/"); } else if (id == R.id.nav_ttt_rules) { // TODO TTT Rules // Player Profiles Toast.makeText(getApplicationContext(), "Loading: TTT Rules", Toast.LENGTH_SHORT).show(); siteview.loadUrl("https://clwo.eu/thread-1614.html"); // Disabled because Sourcebans does not work well with chrome-like browsers currently // } else if (id == R.id.nav_ttt_sourcebans) { // // TODO TTT SourceBans // // Player Profiles // Toast.makeText(getApplicationContext(), "Loading: Player Profiles", // Toast.LENGTH_SHORT).show(); // siteview.loadUrl("https://clwo.eu/ttt/sourcebans/"); } else if (id == R.id.nav_wallpaper) { // Wallpaper wallpaper_view.setVisibility(VISIBLE); button.setVisibility(VISIBLE); wallpaper_view.setAlpha(1f); } // Enable the webview if needed if(!(id == R.id.nav_wallpaper || id == R.id.nav_status || id == R.id.nav_forums)){ siteview.setVisibility(VISIBLE); } // Close the sidebar/drawer drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void establish() {\n logger.info(\"Opening page {}...\", pageObject);\n initializePage();\n pageObject.open();\n }", "@Override\n\t\t\tpublic void windowWillOpen(WebBrowserWindowWillOpenEvent arg0) {\n\t\t\t}", "public void loadPage() {\n\t\tLog.i(TAG, \"MyGardenListActivity::LoadPage ! Nothing to do anymore here :)\");\n\t}", "private void notifyPageInit() {\n\t\tString nativeNotificationCallback = JS_NOTIFICATION_FROM_NATIVE;\n\t\tString notificationArgument = \"\" + SmartConstants.NATIVE_EVENT_PAGE_INIT_NOTIFICATION;\n\t\tnotifyToJavaScript(nativeNotificationCallback, notificationArgument);\n\t}", "public void hyperlinkUpdate(HyperlinkEvent event) {\r\n\t\t// TODO add open link in default browser\r\n\t\tif (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\r\n\t\t\ttry {\r\n\t\t\t\th.setPage(event.getURL());\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tioe.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n\t\t\tpublic void windowOpening(WebBrowserWindowOpeningEvent arg0) {\n\t\t\t}", "@Override\r\n\tprotected void openPage(PageLocator locator, Object... args) \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void openPage(PageLocator arg0, Object... arg1) {\n\t\t\n\t}", "@Override\n public void PageFistLoad() {\n }", "public void newPage(FrameDesc fdesc) {\n // no need to update frame state\n }", "@Override\r\n\tpublic void onOpened() {\n\r\n\t}", "void onOpen();", "public void startPage() {\n\t\tthis.dataComposer.startPage();\n\t}", "public void onModuleLoad() {\n \t\tMainPage.currentPage = this;\n \t\t\n \t\tif(Window.Location.getHash().length() == 0){\n \t\t\tloggedIn = false;\n \t\t}else{\n \t\t\tloggedIn = true;\n \t\t}\n \t\t\n \t\tinitUI();\n \t\t\n \t\tif(loggedIn){\n \t\t\tsetStatus(\"fetching JSON...\", false);\n \t\t\tfbFetcher.fetchNeededJSON();\n \t\t}\n \t\t\n \t}", "protected void onFirstTimeLaunched() {\n }", "@When(\"Hotels List page has finished loading\")\n public void listpage_i_am_on_list_page() {\n listPage = new HotelsListPage(driver);\n listPage.check_page_title();\n }", "@When(\"Hotels Details page has finished loading\")\n public void detailspage_i_am_on_details_page() {\n detailsPage = new HotelsDetailsPage(driver);\n detailsPage.check_page_title();\n }", "private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }", "@Override\n\tprotected void openPage(PageLocator locator, Object... args) {\n\t\tget(\"/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t}", "public ICurrentPage openNewWindow(String url);", "public abstract void pageDisplayed();", "public void browserChanged() { }", "public void LoadedHomePage()\r\n {\r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Loaded Home Page');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n }", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "@Override public void windowOpened(WindowEvent evt) { }", "@Override public void windowOpened(WindowEvent evt) { }", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\n public void onPageStarted(WebView view, String url, Bitmap favicon) {\n final String onPageStartedUrl = url;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onSendUpdate(\"Initiating page: \" + onPageStartedUrl);\n }\n });\n }", "@Override\n /**\n * User clicked something---launch the browser\n */\n public void propertyChange(PropertyChangeEvent propertyChangeEvent) {\n CardData cardData = (CardData) propertyChangeEvent.getNewValue();\n String url = cardData.getUrl();\n //showErrorMessage(\"clicked on \" + propertyChangeEvent.getNewValue());\n Uri uri = Uri.parse(url);\n\n // log the activity\n\n // TODO: Map the current feed's url\n String sourceUrlPath = getCurrentStrategy().getUrlPath(); // e,g, \"/news/home\"\n String idStr = String.format(\"%d\", cardData.getId());\n\n EventDispatchService dispatchService = _dispatchPaymentFactory.createEventDispatch(idStr);\n dispatchService.sendConfirmation(getDispatchSuccessCallback(), getDispatchFailureCallback());\n\n\n AuthEventPublicDispatch eventDispatchService = _dispatchPaymentFactory.createDispatch(sourceUrlPath, uri.getPath(), url);\n eventDispatchService.sendConfirmation(getEventDispatchSuccessCallback(), getEventDispatchFailureCallback());\n\n Intent browserLaunchIntent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(browserLaunchIntent);\n\n }", "@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}", "public void thePageIsLoaded() {\r\n this.page.isLoaded();\r\n }", "public abstract void onOpen();", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t}", "public void onEvent(Event event) throws Exception {\n\t\t\t\tif(locationUri.startsWith(\"http\")){\n\t\t\t\t\t//open a new browser tab\n\t\t\t\t\tExecutions.getCurrent().sendRedirect(locationUri);\n\t\t\t\t}else{\n\t\t\t\t\t//use iterable to find the first include only\n\t\t\t\t\tInclude include = (Include)Selectors.iterable(eastSideBarTabbox.getPage(), \"#mainInclude\").iterator().next();\n\t\t\t\t\tinclude.setSrc(locationUri);\n\t\t\t\t\tSessions.getCurrent().setAttribute(\"CURRENT_PAGE\", name);\n\t\t\t\t\t\n\t\t\t\t\t//advance bookmark control, \n\t\t\t\t\t//bookmark with a prefix\n\t\t\t\t\tif(name!=null){\n\n\t\t\t\t\t\tgetPage().getDesktop().setBookmark(Context.BOOKMARK_SEPARATOR + name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void loadStartPage()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "private void waitForFirstPageToBeLoaded() {\n IdlingResource idlingResource = new ElapsedTimeIdlingResource(LATENCY_IN_MS + 1000);\n IdlingRegistry.getInstance().register(idlingResource);\n\n //Check that first item has been loaded\n onView(withItemText(\"POPULAR MOVIE #1 (1999)\")).check(matches(isDisplayed()));\n\n //Clean up\n IdlingRegistry.getInstance().unregister(idlingResource);\n }", "@Override\r\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void onPageStarted(WebView view, String url, Bitmap favicon) {\n\t\t\t\tsuper.onPageStarted(view, url, favicon);\n\t\t\t\tmDialog.findViewById(R.id.rl).setVisibility(View.VISIBLE);\n\t\t\t\t// mDialog.findViewById(R.id.rl).startAnimation(AnimationUtils.loadAnimation(mActivity, android.R.anim.fade_in));\n\t\t\t\tLogger.e(DialogNotifyUpdate.class.getSimpleName() + \": \" + url);\n\t\t\t\tif (url.contains(\"openbrowser=1\")) {\n\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW, \n\t\t\t\t\t\t\tUri.parse(url));\n\t\t\t\t\tmActivity.startActivity(intent);\n\t\t\t\t} \n\t\t\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "abstract void onOpen();", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e)\n\t{\n\n\t}", "protected abstract void postOpen();", "@Override\n\tpublic void windowOpened( WindowEvent e ) {\n\t\t\n\t}", "public void onPageStarted(WebView view, String url, Bitmap favicon)\n {\n loadTimer = System.currentTimeMillis();\n pageFinished = false;\n }", "@Override\r\n public void run() {\n ax.browserPane.setTitleAt(0,ax.browser.getTitle());\r\n String stringToken1 = null; \r\n try {\r\n stringToken1 = (\"<Navigate Home>::\" + getHome());\r\n } catch (IOException ex) {\r\n Logger.getLogger(AxBrowser.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ax.consoleTextArea.setText(stringToken1);\r\n //Put the current html address in the addressbar\r\n ax.addressBar.setText(ax.browser.getCurrentLocation());\r\n \r\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}" ]
[ "0.67317176", "0.64411795", "0.6328131", "0.62612265", "0.61831653", "0.6160683", "0.61160296", "0.6081126", "0.60765326", "0.6074517", "0.6055209", "0.604885", "0.60458183", "0.60089606", "0.5998179", "0.5982323", "0.5981409", "0.5945202", "0.59389675", "0.59021634", "0.58747625", "0.58657163", "0.5864861", "0.5861586", "0.58587533", "0.58587533", "0.58577466", "0.58577466", "0.58577466", "0.58577466", "0.58577466", "0.58499646", "0.58490705", "0.584764", "0.58350426", "0.583321", "0.5829834", "0.5823879", "0.5823333", "0.58196783", "0.58196783", "0.5798697", "0.5794532", "0.57858634", "0.5784418", "0.5783542", "0.5783542", "0.5783542", "0.5783542", "0.5783542", "0.5783542", "0.5783542", "0.5771762", "0.57625604", "0.57625604", "0.57625604", "0.57625604", "0.57531834", "0.57531834", "0.57504857", "0.5735458", "0.5735458", "0.5735458", "0.5735458", "0.5734954", "0.5734954", "0.5734954", "0.5734954", "0.5734954", "0.5730666", "0.5729873", "0.57264316", "0.5723182", "0.57195747", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.57154495", "0.5707454", "0.5707454", "0.5707454", "0.5707454", "0.5707454", "0.5707454" ]
0.0
-1
Loads the info for the server status page
private void getComments() { servernames.clear(); player_count_labels.clear(); status_images.clear(); game_images.clear(); map_names.clear(); game_dirs.clear(); pings.clear(); alert_icons.clear(); ImageView wallpaper_view = findViewById(R.id.wallpaper_view); RecyclerView recycler = findViewById(R.id.recycler); wallpaper_view.setVisibility(VISIBLE); recycler.setVisibility(VISIBLE); wallpaper_view.setAlpha(0.5f); Call<NetworkQueryResult> call = networkQueryApi .getComments(); call.enqueue(new Callback<NetworkQueryResult>() { @Override public void onResponse(Call<NetworkQueryResult> call, Response<NetworkQueryResult> response) { if (!response.isSuccessful()) { return; } NetworkQueryResult comment = response.body(); for (int i = 0; i < comment.getData().size(); i++) { if (!(comment.getData().get(i).getLastSeen() == null)) { int currentplayercount = Integer.parseInt(comment.getData().get(i) .getQrd().getInfo().getNumberOfPlayers()); int maximumplayercount = Integer.parseInt(comment.getData().get(i) .getMaxPlayers()); String server_ping = String.valueOf(comment.getData().get(i) .getQrd().getPing()); String map = comment.getData().get(i).getMapDisplayName(); String servername = comment.getData().get(i).getShortName(); if(Integer.parseInt(comment.getData().get(i).getLastSeen()) < 100){ servernames.add(servername); player_count_labels.add("Players: " + currentplayercount + " / " + maximumplayercount); status_images.add(success); game_images.add(csgo); game_dirs.add("Counter-Strike: Global Offensive"); map_names.add(map); pings.add(server_ping + " ms"); alert_icons.add(csgo); } else { servernames.add(servername); player_count_labels.add("Players" + 0 + " / " + maximumplayercount); status_images.add(fail); game_images.add(fail); game_dirs.add("Counter-Strike: Global Offensive"); map_names.add(getString(R.string.unknown)); pings.add(getString(R.string.unknown)); alert_icons.add(fail); } } } initRecyclerView(); } @Override public void onFailure(Call<NetworkQueryResult> call, Throwable t) { servernames.add(getString(R.string.apiError)); player_count_labels.add(getString(R.string.unableToFetch)); status_images.add(fail); game_images.add(fail); map_names.add(getString(R.string.unableToFetch)); game_dirs.add(getString(R.string.unableToFetch)); pings.add(getString(R.string.unableToFetch)); alert_icons.add(fail); initRecyclerView(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadStatus (){\n\t}", "public static void getStatus() {\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tList<Object[]>serverDetails = ServerStatus.getServerDetails();\n\t\t\tfor (Object[] servers:serverDetails){\n\t\t\t\tServerStatus.verifyServerStatus(i,(String)servers[0], (String)servers[1], (String)servers[2]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public int fetchServerStatus (GUICalcProgressBar progress) {\n\n\t\t// Call the standard function in ServerCmd\n\n\t\tSystem.out.println ();\n\t\tint result = ServerCmd.gui_show_relay_status (progress);\n\n\t\treturn result;\n\t}", "public static List<Object[]> getServerDetails(){\n\t\t\n\t\tString filePath = Holders.getFlatConfig().get(\"statusFile.use\").toString();\n\n\t\treturn getServerDetailsFromCSV(filePath, \"hostname\", \"user\",\"password\");\n\t}", "private void populateStatus() {\n\t\t\n\t\tstatusList.add(new Status(MainActivity.profileUrls[1], \"Mohamed\", \"14 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[4], \"Ahmed Adel\", \"10 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[0], \"Manar\", \"Yesterday, 5:08 PM\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[5], \"Ramadan\", \"Today, 10:30 AM\"));\n\t\t\n\t}", "public String status() throws Exception {\n\n \t\tString apiUrl = \"api/status.json\";\n \t\t\n \t\tString url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t} else {\n\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t}\n\n\t\treturn response; \n \t}", "public void loadStatus() {\r\n\r\n\t\ttry {\r\n\t\t\tRemoteOffice objRemoteOffice = Application.UNITY_CLIENT_APPLICATION.getreRemoteOffice();\r\n\t\t\tif (objRemoteOffice != null) {\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"Going to load the status of the components from broadworks.\");\r\n\r\n\t\t\t\tboolean isActive = objRemoteOffice.isActive();\r\n\t\t\t\tString phnumber = objRemoteOffice.getPhoneNumber();\r\n\t\t\t\tobjRemoteOfficeEnableJCheckBox.setSelected(isActive);\r\n\t\t\t\tobjRemoteOfficeJTextField.setText(phnumber);\r\n\r\n\t\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(true);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(false);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status not loaded successfully\");\r\n\t\t}\r\n\t}", "public String showStatus();", "private static void displayStatus(final String method, final String path, final String pathInfo) {\n final String msg = String.format(\"HTTP REST API: %s %s %s\", method, path, pathInfo);\n StatusDisplayer.getDefault().setStatusText(msg);\n }", "public void showInfoWithStatus(String status) {\n this.show(status, infoImage, -1);\n }", "private void fetch(String serverUrl) {\n if(isOnline()) {\n currentStationStatus = \"Loading Stream...\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n } else {\n currentStationStatus = \"No Internet Connection\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n return;\n }\n //Log.i(LOG_TAG, \"Make Asynctask to fetch meta data\");\n new FetchMetaDataTask().execute(serverUrl);\n }", "private void updateInfo() {\n /* Show the current server address in use */\n String text = String.format(getResources().getString(R.string.main_activity_server_address),\n Utils.getAddress(), Utils.getPort());\n serverTextView.setText(text);\n\n /* Show information about current player */\n Player player = SharedDataManager.getPlayer(this);\n /* No player is logged in */\n if (player == null) {\n playerTextView.setText(getString(R.string.your_nickname));\n return;\n }\n /* Player is logged in, show some information about him */\n text = String.format(getResources().getString(R.string.main_activity_player_title),\n player.getNickname(), player.getScore());\n playerTextView.setText(text);\n }", "@GET\n @Path(\"/status\")\n @Produces(MediaType.TEXT_PLAIN)\n public String status() {\n Device device = getDevice();\n try {\n StreamingSession session = transportService.getSession(device.getId());\n return \"Status device:[\" + device.getId() + \"]\" + \" session [\" + session.toString() + \"]\";\n } catch (UnknownSessionException e) {\n return e.getMessage();\n }\n }", "private void printStatusHtmlStart\n\t\t(PrintWriter out,\n\t\t long now)\n\t\t{\n\t\tout.println (\"<HTML>\");\n\t\tout.println (\"<HEAD>\");\n\t\tout.print (\"<TITLE>\");\n\t\tout.print (myClusterName);\n\t\tout.println (\"</TITLE>\");\n\t\tout.print (\"<META HTTP-EQUIV=\\\"refresh\\\" CONTENT=\\\"20;url=\");\n\t\tprintWebInterfaceURL (out);\n\t\tout.println (\"\\\">\");\n\t\tout.println (\"<STYLE TYPE=\\\"text/css\\\">\");\n\t\tout.println (\"<!--\");\n\t\tout.println (\"* {font-family: Arial, Helvetica, Sans-Serif;}\");\n\t\tout.println (\"body {font-size: small;}\");\n\t\tout.println (\"h1 {font-size: 140%; font-weight: bold;}\");\n\t\tout.println (\"table {font-size: 100%;}\");\n\t\tout.println (\"-->\");\n\t\tout.println (\"</STYLE>\");\n\t\tout.println (\"</HEAD>\");\n\t\tout.println (\"<BODY>\");\n\t\tout.print (\"<H1>\");\n\t\tout.print (myClusterName);\n\t\tout.println (\"</H1>\");\n\t\tout.println (\"<P>\");\n\t\tout.print (\"<FORM ACTION=\\\"\");\n\t\tprintWebInterfaceURL (out);\n\t\tout.println (\"\\\" METHOD=\\\"get\\\">\");\n\t\tout.println (\"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\");\n\t\tout.println (\"<TR>\");\n\t\tout.print (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"center\\\">\");\n\t\tout.print (\"<INPUT TYPE=\\\"submit\\\" VALUE=\\\"Refresh\\\">\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD WIDTH=20> </TD>\");\n\t\tout.print (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"center\\\">\");\n\t\tout.print (new Date (now));\n\t\tout.print (\" -- \");\n\t\tout.print (Version.PJ_VERSION);\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"</TABLE>\");\n\t\tout.println (\"</FORM>\");\n\t\t}", "private void updateStatus() {\n Response block = blockTableModel.getChainHead();\n int height = (block != null ? block.getInt(\"height\") : 0);\n nodeField.setText(String.format(\"<html><b>NRS node: [%s]:%d</b></html>\",\n Main.serverConnection.getHost(),\n Main.serverConnection.getPort()));\n chainHeightField.setText(String.format(\"<html><b>Chain height: %d</b></html>\",\n height));\n connectionsField.setText(String.format(\"<html><b>Peer connections: %d</b></html>\",\n connectionTableModel.getActiveCount()));\n }", "@Override\n\tpublic void onStatusChanged(Object arg0, STATUS status) {\n\t\tSystem.out.println(status);\n\t\tswitch (status) {\n\n\t\tcase LAYER_LOADED:\n\t\t\tif (!isPathShow && goodsMap != null && goodsMap.size() > 0) {\n\t\t\t\tshelfList.clear();\n\t\t\t\tsearchTime = 0;\n\t\t\t\tqueryLocator();\n\t\t\t\tisPathShow = true;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "public void displayLoadingWindowServerDown()\r\n\t{\r\n\t\tloadingWindow.hideLoadingBar();\r\n\t\tloadingWindow.setDescription(\"The HVMK server is down. Please try again later.\");\r\n\t}", "public HostStatus() {\n addressesChecker = (AddressesChecker)ServicesRegisterManager.platformWaitForService(Parameters.NETWORK_ADDRESSES);\n hostID = addressesChecker.getHostIdentifier();\n hostAddresses = addressesChecker.getAllAddresses();\n contextManager = (ContextManager)ServicesRegisterManager.platformWaitForService(Parameters.CONTEXT_MANAGER);\n cpuLoad = contextManager.getCpuLoad();\n memoryLoad = contextManager.getMemoryLoad();\n batteryLevel = contextManager.getBatteryLevel();\n numberOfThreads = contextManager.getNumberOfThreads();\n networkPFInputTraffic = contextManager.getPFInputTrafic();\n networkPFOutputTraffic = contextManager.getPFOutputTrafic();\n networkApplicationInputTraffic = contextManager.getApplicationInputTrafic();\n networkApplicationOutputTraffic = contextManager.getApplicationOutputTrafic();\n ContainersManager gestionnaireDeConteneurs = (ContainersManager)ServicesRegisterManager.platformWaitForService(Parameters.CONTAINERS_MANAGER);\n numberOfBCs = gestionnaireDeConteneurs.getComposants().getComponentsNumber();\n numberOfConnectors = gestionnaireDeConteneurs.getConnecteurs().getConnectorsNumber();\n numberOfConnectorsNetworkInputs = gestionnaireDeConteneurs.getConnecteurs().getNetworkInputConnectorsNumber();\n numberOfConnectorsNetworkOutputs = gestionnaireDeConteneurs.getConnecteurs().getNetworkOutputConnectorsNumber();\n }", "@RequestMapping(value = \"/status\", method = RequestMethod.GET)\n public String status()\n {\n return \"status\";\n }", "public void showServerStats(double totalTime) {\n System.out.println(\"ServerID \" + \"Efficiency \" + \"CustomersServed \" + \"IdleTime \");\n for(int i = 0; i < cntServer; i++){\n serverArray[i].idleTime = totalTime - serverArray[i].busyTime;\n System.out.println(serverArray[i].toString());\n }\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "public static String getAccountStatusPage ()\n {\n return BASE + \"status.wm?initUsername=\" + URL.encodeComponent(CShell.creds.accountName);\n }", "private void requestServerToGetInformation() {\n Net net = Net.getInstance();\n Log.i(TAG, \"requestServerToGetInformation: Start connect server\");\n net.get(AppConstant.SERVER_COMBO_URL, new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.i(TAG, \"onFailure: connect error; \" + e.getMessage());\n }\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n // get the JSON from responses.\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }\n });\n }", "private static void statusCommand() {\n String lineFormat = \"%-8s | %-15s | %s\\n\";\n\n List<Job> neededJobs = fetchNeededJobs();\n\n // table header\n if (neededJobs.size() < 2) {\n System.out.printf(lineFormat, \"STATE\", \"START TIME\", \"JOB DIRECTORY\");\n for (int i = 0; i < 78; i++) {\n System.out.print(((9 == i || 27 == i) ? \"+\" : \"-\"));\n }\n System.out.println();\n }\n\n // table rows\n ObjectCounter<JobState> counter = new ObjectCounter<JobState>();\n for (Job job : neededJobs) {\n Date startDate = job.getStartDate();\n JobState state = job.getState();\n counter.add(state);\n String startDateStr = (null == startDate) ? \"N/A\" : new SimpleDateFormat(\"yyyyMMdd HHmmss\").format(startDate);\n System.out.printf(lineFormat, state.toString(), startDateStr, job.getDir());\n }\n\n // table footer\n System.out.println();\n String sumFormat = \"%6d %s\\n\";\n System.out.printf(sumFormat, heritrix.getJobs().size(), \"TOTAL JOBS\");\n for (JobState state : JobState.values()) {\n if (counter.getMap().keySet().contains(state)) {\n System.out.printf(sumFormat, counter.get(state), state.toString());\n }\n }\n }", "public Map serviceStatus(String id) throws IOException\n\t{\n\t\treturn request(GET, address(id, \"stats\"));\n\t}", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "private Integer getStatus(Map<String, Object> info) {\n return 200;\n }", "@Override\n public String getServletInfo() {\n return \"Louie Info Home\";\n }", "public void getSystemStatus() throws Exception\r\n\t{\r\n\t\tsystemDump.delete(0, systemDump.length());\r\n\r\n\t\tboolean needAlarm = memoryLogging();\r\n\r\n\t\tif (Database.appDatasource != null)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Database connection status: \\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number database connection\\t\\t\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number busy database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumBusyConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumIdleConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumUnclosedOrphanedConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tString queueWarningMessage = \"\";\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Local queue status: \\r\\n\");\r\n\r\n\t\tfor (String key : QueueFactory.localQueues.keySet())\r\n\t\t{\r\n\t\t\tLocalQueue localQueue = QueueFactory.getLocalQueue(key);\r\n\r\n\t\t\tsystemDump.append(\"Local queue (\");\r\n\t\t\tsystemDump.append(key);\r\n\t\t\tsystemDump.append(\"): \");\r\n\t\t\tsystemDump.append(localQueue.getSize());\r\n\r\n\t\t\tif (localQueue.getMaxSize() > 0)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"/\");\r\n\t\t\t\tsystemDump.append(localQueue.getMaxSize());\r\n\t\t\t}\r\n\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\t\tif (QueueFactory.getTotalLocalPending() > 0)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"Total pending counter : \");\r\n\t\t\tsystemDump.append(QueueFactory.getTotalLocalPending());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tif (queueDispatcherEnable)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Remote queue status: \\r\\n\");\r\n\r\n\t\t\tQueueSession session = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsession = getQueueSession();\r\n\r\n\t\t\t\tfor (int j = 0; j < externalQueues.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (externalQueues[j].equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString queueName = externalQueues[j];\r\n\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tQueue checkQueue = QueueFactory.getQueue(queueName);\r\n\r\n\t\t\t\t\t\tint size = QueueFactory.getQueueSize(session, checkQueue);\r\n\r\n\t\t\t\t\t\tQueueFactory.queueSnapshot.put(queueName, new Integer(size));\r\n\r\n\t\t\t\t\t\tsystemDump.append(\"Total command request for \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\" : \");\r\n\t\t\t\t\t\tsystemDump.append(size);\r\n\t\t\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\t\t\tqueueWarningMessage += queueWarning(checkQueue, queueName, size);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsystemDump.append(\"Error occur when get size of queue \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\": \");\r\n\t\t\t\t\t\tsystemDump.append(e.getMessage());\r\n\r\n\t\t\t\t\t\tlogMonitor(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"Can not get remote queue size: \");\r\n\t\t\t\tsystemDump.append(e.getMessage());\r\n\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\tlogMonitor(e);\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tQueueFactory.closeQueue(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"WARNING: Disk space is running low\");\r\n\t\t}\r\n\t\tif (!queueWarningMessage.equals(\"\"))\r\n\t\t{\r\n\t\t\tneedAlarm = true;\r\n\t\t\tsystemDump.append(queueWarningMessage);\r\n\t\t}\r\n\r\n\t\tlogMonitor(systemDump);\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsendInstanceAlarm(\"system-resource\", systemDump.toString());\r\n\t\t}\r\n\t}", "private void addStatus(HttpServletRequest req, JSONObject siteConfigJson, WebUser user, URI resource) throws JSONException {\r\n \t\tString id = siteConfigJson.getString(ProtocolConstants.KEY_ID);\r\n \t\tSiteConfiguration siteConfiguration = SiteConfiguration.fromId(id);\r\n \t\tIHostedSite site = HostingActivator.getDefault().getHostingService().get(siteConfiguration, user);\r\n \t\tJSONObject hostingStatus = new JSONObject();\r\n \t\tif (site != null) {\r\n \t\t\thostingStatus.put(SiteConfigurationConstants.KEY_HOSTING_STATUS_STATUS, \"started\"); //$NON-NLS-1$\r\n \t\t\tString portSuffix = \":\" + req.getLocalPort(); //$NON-NLS-1$\r\n \t\t\t// Whatever scheme was used to access the resource, assume it's used for the sites too\r\n\t\t\t// Hosted site also shares same contextPath \r\n\t\t\tString hostedUrl = resource.getScheme() + \"://\" + site.getHost() + portSuffix + req.getContextPath(); //$NON-NLS-1$\r\n \t\t\thostingStatus.put(SiteConfigurationConstants.KEY_HOSTING_STATUS_URL, hostedUrl);\r\n \t\t} else {\r\n \t\t\thostingStatus.put(SiteConfigurationConstants.KEY_HOSTING_STATUS_STATUS, \"stopped\"); //$NON-NLS-1$\r\n \t\t}\r\n \t\tsiteConfigJson.put(SiteConfigurationConstants.KEY_HOSTING_STATUS, hostingStatus);\r\n \t}", "@GET\n\t@Path(\"/status\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getStatus() {\n\t\treturn new JSONObject().put(\"currFloor\", Constants.currFloor).put(\"movingState\", Constants.movingState).toString();\n\t}", "@GET(\"system/status\")\n Call<InlineResponse200> getStatus();", "private void prepareStatus() {\n clock = new JLabel(new Date().toString());\n statusPanel = new JPanel();\n statusPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));\n this.add(statusPanel, BorderLayout.SOUTH);\n statusPanel.setPreferredSize(new Dimension(this.getWidth(), 16));\n statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));\n statusLabel = new JLabel(\"status\");\n statusLabel.setHorizontalAlignment(SwingConstants.LEFT);\n statusPanel.add(statusLabel);\n statusPanel.add(new JLabel(\" \"));\n clock.setHorizontalAlignment(SwingConstants.RIGHT);\n statusPanel.add(clock);\n \n ActionListener updateClockAction = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n clock.setText(new Date().toString()); \n }\n };\n Timer t = new Timer(1000, updateClockAction);\n t.start();\n }", "public void printStatus();", "String status();", "String status();", "private String renderStatusHtml() {\n\t\tString ret = \"\";\n\t\tif (model.getLastErrorTs()!= null) {\n\t\t\tret += String.format(template1, \n\t\t\t\t\tmodel.getLastErrorTs(), model.getLastErrorMessage());\n\t\t}\n\t\tif (model.getLastCheckTs()!= null) {\n\t\t\tret += String.format(template2,\n\t\t\t\t\tmodel.getLastCheckTs(), model.getLastCheckMessage());\n\t\t}\n\t\tif (model.getLastDownloadTs()!= null) {\n\t\t\tret += String.format(template3,\n\t\t\t\t\tmodel.getLastDownloadTs(), model.getLastDownloadMessage());\n\t\t}\n\t\tif (ret.length() == 0) {\n\t\t\tret = \"<br/><em>There are no updates to report yet</em><br>\";\n\t\t}\n\t\treturn ret;\n\t}", "public String getLoadInfo()\n {\n return ssProxy.getLoadInfo();\n }", "private void updateServerInfo() {\n ServerInfo serverInfo = new ServerInfo(serverConfig.getBaseURL(), serverConfig.getInfoURL(), serverRepositories.keySet());\n String serverInfoJson = new GsonBuilder().setPrettyPrinting().create().toJson(serverInfo);\n try {\n Files.write(Paths.get(\"\").resolve(Filenames.FILENAME_SERVERINFO), serverInfoJson.getBytes(StandardCharsets.UTF_8));\n } catch (IOException e) {\n log.error(\"could not write serverinfo file.\", e);\n }\n }", "private void setLaunchPageStatus() {\n double rWidth = rootPanel.getWidth();\n double rHeight = rootPanel.getHeight();\n // set login page advertisement icon\n loginAdsIcons[0] = new ImageIcon(rootPath.concat(\"/img/xingbake1.jpg\"));\n loginAdsIcons[1] = new ImageIcon(rootPath.concat(\"/img/xingbake2.jpg\"));\n loginAdsIcons[2] = new ImageIcon(rootPath.concat(\"/img/xingbake3.jpg\"));\n loginAdsIcons[3] = new ImageIcon(rootPath.concat(\"/img/kendeji1.jpg\"));\n loginAdsIcons[4] = new ImageIcon(rootPath.concat(\"/img/kendeji2.jpg\"));\n double raRatio = 0.33;\n for(ImageIcon icon: loginAdsIcons) {\n Utils.setIconByHeight(raRatio,rHeight,icon);\n }\n launchAdsLabel.setText(\"\");\n // set wifi icons\n wifiLaunchIcons[0] = new ImageIcon(rootPath + \"/img/launch1.png\");\n wifiLaunchIcons[1] = new ImageIcon(rootPath + \"/img/launch2.png\");\n wifiLaunchIcons[2] = new ImageIcon(rootPath + \"/img/launch3.png\");\n wifiLaunchIcons[3] = new ImageIcon(rootPath + \"/img/launch4.png\");\n double rlRatio = 0.2;\n for(ImageIcon icon: wifiLaunchIcons) {\n Utils.setIconByWidth(rlRatio,rWidth,icon);\n }\n launchIcon = wifiLaunchIcons[3];\n Utils.setIconByWidth(rlRatio,rWidth,rootPath.concat(\"/img/unLaunch.png\"));\n wifiIconLabel.setText(\"\");\n // set visibility\n connectStatusL.setVisible(false);\n connectStatusL.setText(\"\");\n // set connect status icon\n connectedIcon = new ImageIcon(rootPath + \"/img/connected.png\");\n connectedOpaqueIcon = new ImageIcon(rootPath + \"/img/connected_opaque.png\");\n unconnectedIcon = new ImageIcon(rootPath + \"/img/unconnected.png\");\n connectingIcon = new ImageIcon(rootPath + \"/img/connecting.png\");\n double rcRatio = 0.03;\n ImageIcon connIcons[] = {connectedIcon,connectedOpaqueIcon,unconnectedIcon,connectingIcon};\n for(ImageIcon icon: connIcons) {\n Utils.setIconByWidth(rcRatio,rWidth,icon);\n }\n // set icons\n connectStatusL.setIcon(connectedIcon);\n }", "private void initGUI() {\n statusLabel = new JLabel();\n add(statusLabel);\n updateStatus();\n }", "private void displayStatus(String status) {\n\t\tif (!status.equals(\"\")) {\n\t\t\tdouble x = LEFT_MARGIN;\n\t\t\tdouble y = nameY + IMAGE_MARGIN + IMAGE_HEIGHT + STATUS_MARGIN;\n\t\t\tGLabel pstatus = new GLabel(status);\n\t\t\tpstatus.setFont(PROFILE_STATUS_FONT);\n\t\t\tif (getElementAt(x, y) != null) {\n\t\t\t\tremove(getElementAt(x, y));\n\t\t\t}\n\t\t\tadd(pstatus, x, y);\n\t\t}\n\t}", "public String getStatus() { return status; }", "public String getStatusView() {\r\n return statusView;\r\n }", "private void getPlayerStatusFromServer()\r\n\t{\r\n\t\ttry {\r\n\t\t\t// Create data input stream\r\n\t\t\tDataInputStream playerStatusInputFromServer = new DataInputStream(\r\n\t\t\t\t\tsocket.getInputStream());\r\n\t\t\tisPlayerAlive = playerStatusInputFromServer.readBoolean();\r\n\t\t\thasPlayerWon = playerStatusInputFromServer.readBoolean();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void updateStatusBar(){\n\t\tstatus.setText(\"Sensors: \"+Sensor.idToSensor.size()+(TurnController.getInstance().getCurrentTurn()!=null?\", Turn: \"+TurnController.getInstance().getCurrentTurn().turn:\"\"));\n\t}", "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 }", "public void initGui()\n {\n this.screenTitle = I18n.format(\"gui.stats\");\n this.doesGuiPauseGame = true;\n this.mc.getConnection().sendPacket(new CPacketClientStatus(CPacketClientStatus.State.REQUEST_STATS));\n }", "public ServerInfo(Server server) {\n if (server == null) {\n throw new NullArgumentException(\"Server must not be null\");\n }\n\n this.logger = server.getLogger();\n\n BufferedImage image;\n\n try {\n image = ImageIO.read(new File(\"server-icon.png\"));\n }\n catch (Exception e) {\n image = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);\n }\n\n this.setImage(image);\n this.setMotd(server.getMotd());\n }", "public void clientInfo() {\n uiService.underDevelopment();\n }", "public void showStatus(){\n\t\tjlMoves.setText(\"\"+moves);\n\t\tjlCorrectMoves.setText(\"\"+correctMoves);\n\t\tjlWrongMoves.setText(\"\"+wrongMoves);\n\t\tjlOpenMoves.setText(\"\"+openMoves);\n\t\tjlNumberGames.setText(\"\"+numberGames);\n\t}", "private String getTstatStatusMessage() {\n\n String thStatusMsg = null;\n WebElement modeDialog = getElement(getDriver(), By.cssSelector(MODEL_DIALOG), TINY_TIMEOUT);\n if (modeDialog.isDisplayed()) {\n WebElement modeMessage = getElementBySubElement(getDriver(), modeDialog,\n By.className(ERROR_MODEBOX), TINY_TIMEOUT);\n thStatusMsg = getElementBySubElement(getDriver(), modeMessage,\n By.className(MODEL_LABEL), TINY_TIMEOUT).getText();\n setLogString(\"Location status message:\" + thStatusMsg, true, CustomLogLevel.HIGH);\n }\n return thStatusMsg;\n }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "private void getStatus() {\n\t\t\n\t}", "private void updateStatus() {\n String statusString = dataModel.getStatus().toString();\n if (dataModel.getStatus() == DefinitionStatus.MARKER_DEFINITION) {\n statusString += \" Number of markers: \" + dataModel.getNumberOfMarkers() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n if (dataModel.getStatus() == DefinitionStatus.POINTS_DEFINITION) {\n statusString += \" Number of point fields: \" + dataModel.getNumberOfPoints() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n statusLabel.setText(statusString);\n }", "public Map<String, Object> getStatus() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/_status\"));\n return mapper.readValue(httpResponse, new TypeReference<Map<String, Object>>() {\n });\n }", "public void loadPage() { \n\t \n\t if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {\n\t \tnew DownloadXmlTask().execute(URL);\n\t }\n\t else if ((sPref.equals(WIFI)) && (wifiConnected)) {\n\t new DownloadXmlTask().execute(URL);\n\t } else {\n\t // show error\n\t } \n\t }", "public boolean getStatus() {\n return _siteStatus;\n }", "public DacGetStatusResponse() {\n super();\n this.setStatusInfoList(new LazyArrayList<StatusInfo>());\n }", "public void run() {\n\t\tDate curTime;\n\t\twhile(true) {\n\t\t\tcurTime = new Date();\n\t\t\t\n\t\t\t//System.out.println(\"currentTime: \"+ curTime.getTime() +\" prevTime: \"+ _prevPingRequestTime.getTime() +\" diff: \" + (curTime.getTime() - _prevPingRequestTime.getTime()) +\" interval: \"+ _scsynthPingInterval);\n\n\t\t\t//if the previous status request is still pending...\n\t\t\tif (_serverLive && (_prevPingRequestTime.getTime() > _prevPingResponseTime.getTime())) {\n\t\t\t\t//We've not yet heard back from the previous status request.\n\t\t\t\t//Have we timed out?\n\t\t\t\tif (curTime.getTime() - _prevPingRequestTime.getTime() > _serverResponseTimeout) {\n\t\t\t\t\t//We've timed out on the previous status request.\n\t\t\t\t\tSystem.out.println(\"Timed out on previous status request.\");\n\n\t\t\t\t\tif (_notifyListener != null) {\n\t\t\t\t\t\t_notifyListener.receiveNotification_ServerStopped();\n\t\t\t\t\t}\n\t\t\t\t\tif (_controlPanel != null && _controlPanel._statsDisplay != null) {\n\t\t\t\t\t\t_controlPanel._statsDisplay.receiveNotification_ServerStopped();\n\t\t\t\t\t\t_scsclogger.receiveNotification_ServerStopped();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t_serverLive = false;\n\t\t\t\t\t_serverBooted = false;\n\t\t\t\t}\n\t\t\t\t//else we just keep waiting for a response or a timeout\n\t\t\t}\n\t\t\t//the previous status request is NOT still pending. Is it time to send another?\n\t\t\telse if (curTime.getTime() - _prevPingRequestTime.getTime() > _scsynthPingInterval) {\n\t\t\t\t//It's time to send another status request.\n\t\t\t\t\n\t\t\t\t//generally, ping with a /status message.\n\t\t\t\t//but, if we're live but not booted, query node 1 (the sign that init completed)\n\t\t\t\tif (_serverLive && !_serverBooted) { \n\t\t\t\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\t\t\t\t\tsendMessage(\"/n_query\", new Object[]{_motherGroupID});\n\t\t\t\t\t//System.out.println(\"Querying SCSC mother node\");\n\t\t\t\t\t//debugPrintln(\"Querying SCSC mother node\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if the server's booted, request a status update.\n\t\t\t\t\tsendMessage(\"/status\"); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_prevPingRequestTime = new Date();\n\t\t\t}\n\t\t\t//it's not time to send, and we're not watching \n\t\t\t//for a reply, so go to sleep until it's time to ping again\n\t\t\telse {\n\t\t\t\tlong sleeptime = Math.max(_scsynthPingInterval - (curTime.getTime() - _prevPingRequestTime.getTime()), 0);\n\t\t\t\t//System.out.println(\"sleep \" + sleeptime);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(sleeptime);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t//NOTE this thread shouldn't get interrupted.\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }", "public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }", "private static int checkStatus(String param) throws IOException {\n\t\tURL url = new URL(Utils.getURL() + \"/status?who=\" + param + \"&login=\" + login + \"&password=\" + password);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tString resp;\n\t\ttry (InputStream is = conn.getInputStream()) {\n\t\t\tGson gson = new GsonBuilder().create();\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\t\tbyte[] buff = new byte[10240];\n\t\t\tint r;\n\t\t\tdo {\n\t\t\t\tr = is.read(buff);\n\t\t\t\tif (r > 0) bos.write(buff, 0, r);\n\t\t\t} while (r != -1);\n\t\t\tresp = new String(bos.toByteArray(), StandardCharsets.UTF_8);\n\t\t\tMap<String, Boolean> onlineMap = gson.fromJson(resp, TreeMap.class);\n\t\t\tUtils.printOnlineStats(onlineMap);\n\t\t}\n\t\treturn conn.getResponseCode();\n\t}", "public NdexStatus getServerStatus() throws IOException, NdexException {\n\t\treturn getServerStatus(false);\t\n }", "private void printStatusHtmlBody\n\t\t(PrintWriter out,\n\t\t long now)\n\t\t{\n\t\tout.println (\"<P>\");\n\t\tout.println (\"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"center\\\" VALIGN=\\\"top\\\">\");\n\n\t\tout.println (\"Nodes\");\n\t\tout.println (\"<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\n\t\tout.println (\"<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>\");\n\t\tprintBackendLabels (out);\n\t\tint i = 0;\n\t\tfor (BackendInfo backend : myBackendInfo)\n\t\t\t{\n\t\t\tprintBackendInfo (out, now, backend, i);\n\t\t\t++ i;\n\t\t\t}\n\t\tout.println (\"</TABLE>\");\n\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"</TABLE>\");\n\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD WIDTH=40> </TD>\");\n\t\tout.println (\"<TD ALIGN=\\\"center\\\" VALIGN=\\\"top\\\">\");\n\n\t\tout.println (\"Jobs\");\n\t\tout.println (\"<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\n\t\tout.println (\"<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>\");\n\t\tprintJobLabels (out);\n\t\ti = 0;\n\t\tfor (JobInfo job : myRunningJobList)\n\t\t\t{\n\t\t\tprintJobInfo (out, now, job, i);\n\t\t\t++ i;\n\t\t\t}\n\t\tfor (JobInfo job : myWaitingJobList)\n\t\t\t{\n\t\t\tprintJobInfo (out, now, job, i);\n\t\t\t++ i;\n\t\t\t}\n\t\tout.println (\"</TABLE>\");\n\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"</TABLE>\");\n\n\t\tprintTotalComputeTime (out);\n\t\tout.print (\"<BR>\");\n\t\tprintJobCount (out);\n\t\tout.println (\"<BR>Since \" + new Date (myStartDateTime));\n\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"</TABLE>\");\n\t\t}", "@Override\n public String getServletInfo() {\n return \"Servlet is serving eBooksStoreAdminUsersPage.jsp\";\n }", "public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }", "void fetchingInfo(String remotePath);", "public void setStatus(String stat)\n {\n status = stat;\n }", "@Override\n public String getServletInfo() {\n return \"Short description : Time Refresh\";\n }", "public String statusUrl() {\n return this.statusUrl;\n }", "void askServerInfo();", "@Override\n protected void onPostExecute(String s){\n super.onPostExecute(s);\n TextView textview = findViewById(R.id.status);\n try {\n JSONObject obj = new JSONObject(s);\n if(obj.getBoolean(\"alive\")){\n textview.setText(\"Server is Alive!\");\n }\n }catch(JSONException e){\n textview.setText(\"Server Offline!\");\n }\n }", "public String getStatus(){\r\n\t\treturn status;\r\n\t}", "public static final void handleServerStatus(final MapleClient c) {\n final int numPlayer = LoginServer.getUsersOn();\n final int userLimit = LoginServer.getUserLimit();\n if (numPlayer >= userLimit) {\n c.sendPacket(LoginPacket.getServerStatus(2));\n } else if (numPlayer * 2 >= userLimit) {\n c.sendPacket(LoginPacket.getServerStatus(1));\n } else {\n c.sendPacket(LoginPacket.getServerStatus(0));\n }\n }", "@UiHandler(\"status\")\n \tpublic void onStatusClicked(ClickEvent e) {\n \t\tdelegate.showApplicationLoading(true);\n \t\tLog.info(\"onStatusClicked\");\n \t\tif (proxy.getStatus() == StandardizedPatientStatus.ANONYMIZED) {\n \t\t\tstatus.setVisible(false);\n \t\t} else {\n \t\t\tdelegate.statusClicked();\n \t\t}\n \t\tdelegate.showApplicationLoading(false);\n \t}", "Status stat() throws IOException {\n Protocol protocol = this;\n synchronized (protocol) {\n Status status;\n String string2;\n Response response = this.simpleCommand(\"STAT\");\n status = new Status();\n if (response.ok && (string2 = response.data) != null) {\n try {\n StringTokenizer stringTokenizer = new StringTokenizer(response.data);\n status.total = Integer.parseInt((String)stringTokenizer.nextToken());\n status.size = Integer.parseInt((String)stringTokenizer.nextToken());\n }\n catch (Exception exception) {}\n }\n return status;\n }\n }", "private void displayStatusPanel(String message, String title, int status) {\n JOptionPane.showMessageDialog(mainPanel, message, title, status);\n }", "private String statusExtractorV2(Printer printer) {\n Document document = getStatusDocument(printer.getUrl());\n\n String text = document.text();\n String preProcessed = text.substring(text.indexOf(\"Host Name\"));\n return preProcessed.substring(preProcessed.indexOf(\"System Status\")+14,preProcessed.indexOf(\"Toner Status \")-1);\n }", "public abstract String currentStatus();", "@SuppressWarnings(\"SleepWhileInLoop\")\n private StateChange profilingServerStatus() {\n LOGGER.log(Level.FINE,\n \"Profiling mode status hack for {0}\",\n new Object[]{instance.getName()});\n // Save process to be able to stop process waiting for profiler\n // to attach.\n support.setLocalStartProcess(instance.getProcess());\n // Try to sync the states after the profiler attaches.\n NODE_REFRESHER.post(new Runnable() {\n @Override\n public void run() {\n while (!PayaraState.isOnline(instance)) {\n try {\n Thread.sleep(200);\n } catch (InterruptedException ex) {\n }\n }\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n support.refresh();\n }\n });\n }\n });\n return new StateChange(this, TaskState.COMPLETED,\n TaskEvent.CMD_COMPLETED,\n \"MSG_SERVER_STARTED\", instanceName);\n }", "public void updateGIUnoResponse()\n {\n updateInfo.setText( \"Server is not up :(\" );\n }", "private void loadPage() {\n \t\n if (((sPref.equals(ANY)) && (wifiConnected || mobileConnected))\n || ((sPref.equals(WIFI)) && (wifiConnected))) {\n // AsyncTask subclass\n \t\n new DownloadXmlTask().execute(URL);\n } else {\n showErrorPage();\n }\n }", "public GameSummary(final com.google.gson.JsonObject infoFromServer) {\n\n data = infoFromServer;\n\n id = data.get(\"id\").getAsString();\n mode = data.get(\"mode\").getAsString();\n owner = data.get(\"owner\").getAsString();\n players = data.get(\"players\").getAsJsonArray();\n\n }", "@RequestLine(\"GET /status\")\n Status getNeustarNetworkStatus();", "int getServerState();", "public String getStatusDetails() { return statusDetails; }", "public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }", "void onStatusUpdate(int status);", "private String getServerDetails() {\n String sServerLine = \"Server: Ramon's Killer \";\n String sSocketType = (bIsSecure ? \"(SECURE)\" : \"(unsecure)\");\n sServerLine = sServerLine + sSocketType + \" Server\";\n return sServerLine;\n }", "@Override\n protected void onProgressUpdate(String... values) {\n labelStatus.setText(values[0]);\n }", "public GameInfo getGameInfo() throws InterruptedException, IOException, URISyntaxException {\n String json = caller.GET(\"game/status\");\n\n GsonBuilder builder = new GsonBuilder();\n builder.registerTypeAdapter(GameInfo.class, new GameInfoDeserializer());\n\n Gson gson = builder.create();\n\n return gson.fromJson(json, GameInfo.class);\n }", "public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }", "@RequestMapping(\"/reportStatus\")\n\tpublic String statusPage(Model model)\n\t{\n\t\tmodel.addAttribute(\"status\",new ReportStatus());\n\t\treturn \"reportStatus\";\n\t}", "private javax.swing.JLabel getTxtStatus() {\r\n\t\tif (txtStatus == null) {\r\n\t\t\ttxtStatus = new javax.swing.JLabel();\r\n\t\t\ttxtStatus.setName(\"txtStatus\");\r\n\t\t\ttxtStatus.setText(\"Initializing...\");\r\n\t\t\ttxtStatus.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\r\n\t\t\ttxtStatus.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);\r\n\t\t\ttxtStatus.setPreferredSize(new java.awt.Dimension(800,18));\r\n\t\t}\r\n\t\treturn txtStatus;\r\n\t}", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "public static String getStatus(Connection conn)\n {\n String status = \"Current Status\\n---------------\\nRooms: \";\n if(RoomDB.exist(conn) == -1)\n {\n status += \"No Database\\n\";\n }\n else if(RoomDB.exist(conn) == 0)\n {\n status += \"Empty\\n\";\n }\n else\n {\n status += \"Full\\n\";\n }\n status += \"Reservations: \";\n if(ResDB.exist(conn) == -1)\n {\n status += \"No Database\\n\";\n }\n else if(ResDB.exist(conn) == 0)\n {\n status += \"Empty\\n\";\n }\n else\n {\n status += \"Full\\n\";\n }\n \n return status;\n }" ]
[ "0.69594973", "0.6736511", "0.62801886", "0.60338753", "0.5978273", "0.58829314", "0.58686936", "0.5843331", "0.58388317", "0.58250654", "0.5821755", "0.57935953", "0.578146", "0.57583094", "0.572037", "0.56874704", "0.5667856", "0.5659748", "0.561655", "0.5613263", "0.5608153", "0.56066436", "0.55966365", "0.55662376", "0.55550516", "0.55361795", "0.5530955", "0.55308276", "0.5524889", "0.5509235", "0.54972863", "0.5490404", "0.5486224", "0.54850066", "0.5471764", "0.5471764", "0.5468027", "0.54655296", "0.54607564", "0.54577583", "0.5455441", "0.54524505", "0.5448572", "0.54411143", "0.5440339", "0.5432487", "0.54287845", "0.54241574", "0.5411178", "0.54072106", "0.5407207", "0.5398953", "0.5398488", "0.53842473", "0.5373169", "0.5371195", "0.5366483", "0.53616", "0.53458536", "0.533756", "0.5329715", "0.5329137", "0.5324937", "0.5314364", "0.52987033", "0.5296895", "0.5293558", "0.52926075", "0.52894646", "0.5285351", "0.52797574", "0.52787673", "0.5272704", "0.52713346", "0.5270953", "0.52687526", "0.5267735", "0.5256032", "0.5255737", "0.5252579", "0.5246021", "0.5235029", "0.52305895", "0.52295756", "0.52277094", "0.5220193", "0.52176327", "0.52148205", "0.5214119", "0.52077305", "0.52060336", "0.52006966", "0.51996356", "0.51931494", "0.51916564", "0.5188943", "0.5188943", "0.5188943", "0.5188943", "0.5188943", "0.5184912" ]
0.0
-1
////////////////////////////////////////////////////////////////////// Description: Initializes element. All flags are initialized to FALSE (0). Use: public
public void init(SoState state) // //////////////////////////////////////////////////////////////////////// { flags = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BasicElementList() {\n\t}", "public XMLElement() {\n this(new Properties(), false, true, true);\n }", "public XmlElement() {\n }", "Element() {\n\t}", "public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}", "public GenericElement() {\n\t}", "public OpticalElements() {\n }", "public ElementoInicial() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tprotected boolean Initialize() {\n\t\treturn false;\r\n\t}", "public XsdTreeStructImpl() {\n\t\tsuper(false, false);\n\t}", "public boolean init() {\n\t\treturn true;\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public boolean init() {\n\r\n return true;\r\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "public Flag() {\n }", "public BaseElement() {\n }", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public AbstractElement() {\n }", "private void init(boolean[] flags) {\n\t\tflags[0] = false; \n\t\tflags[1] = false; \n\t\t\n\t\tfor (int i=2; i<flags.length; i++) {\n\t\t\tflags[i] = true; \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 initialize() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void init() {\r\n resources = new Vector<ResourcesElement>();\r\n informations = new Vector<InformationElement>();\r\n output = null;\r\n spec = DEFAULT_SPEC;\r\n version = null;\r\n codeBase = null;\r\n href = null;\r\n allPermissions = false;\r\n j2eePermissions = false;\r\n isComponent = false;\r\n applicationDesc = null;\r\n appletDesc = null;\r\n installerDesc = null;\r\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}", "public XMLDocument ()\r\n\t{\r\n\t\tthis (DEFAULT_XML_VERSION, true);\r\n\t}", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "public void init() {\n\t\t\n\t}", "public boolean init()\n {\n \n boolean retVal = init_0(nativeObj);\n \n return retVal;\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "public void setElement(boolean value) {\r\n this.element = value;\r\n }", "public boolean init();", "public TempElementRestriction() {\n }", "public void init() {\r\n\r\n\t}", "public SparseBooleanArray() {\r\n\t\tthis(10);\r\n\t}", "private Node() {\n // Start empty.\n element = null;\n }", "public Boolean() {\n\t\tsuper(false);\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void initialize() {\n\t\t\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public AttributeSet() {\n\n elements = new Hashtable();\n }", "@Override public void init()\n\t\t{\n\t\t}", "public void init() {\n\t\t}", "public void init() {\n\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "protected void initialize()\n {\n // Initialize document\n\n Document document = createDefaultModel();\n\n field.setDocument(document);\n document.addDocumentListener(this);\n\n // Layout panel\n\n setLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\n flagLabel = new JLabel(GUI.getMandatoryIcon());\n\n flagLabel.addFocusListener(this);\n\n if (getTextField() != null)\n {\n getTextField().addFocusListener(this);\n }\n\n add(flagLabel);\n add(Box.createHorizontalStrut(3));\n add(field);\n\n if (field.getColumns() > 0)\n {\n setMaximumSize(new Dimension(getPreferredSize().width, field.getPreferredSize().height));\n setMinimumSize(new Dimension(getMinimumSize().width, field.getPreferredSize().height));\n }\n else\n {\n setMaximumSize(new Dimension(Integer.MAX_VALUE, getPreferredSize().height));\n setPreferredSize(new Dimension(Integer.MAX_VALUE, getPreferredSize().height));\n setMinimumSize(new Dimension(getMinimumSize().width, getPreferredSize().height));\n }\n\n performFlags();\n field.setCursor(GUI.ENTRY_CURSOR);\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public Element() {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tcolor = Color.gray;\r\n\t\thilite = true;\r\n\t}", "@Override\n\tprotected void initialise() {\n\t}", "public DPropertyElement() {\n super(null, null);\n }", "public void init() { }", "public void init() { }", "public void init() {\r\n\t\t// to override\r\n\t}", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean InitNew(Element v_elem, List v_next, boolean v_end){\n\tend = v_end ;\n\telem = v_elem ;\n\tnext = v_next ;\n\treturn true ;\n }" ]
[ "0.66380554", "0.6576668", "0.6440972", "0.6350715", "0.62753785", "0.6233419", "0.62330914", "0.6231925", "0.6227745", "0.61786646", "0.6130607", "0.60993737", "0.60983425", "0.6071096", "0.6069435", "0.605703", "0.60437423", "0.60404885", "0.601889", "0.6018874", "0.5972095", "0.5972095", "0.5972095", "0.5960617", "0.5958237", "0.595002", "0.595002", "0.595002", "0.595002", "0.595002", "0.594772", "0.5946099", "0.5942444", "0.59376436", "0.59115493", "0.590321", "0.590321", "0.590321", "0.59016794", "0.58971834", "0.5893433", "0.5891454", "0.58913535", "0.5887472", "0.588057", "0.5874452", "0.5868383", "0.5867121", "0.58617985", "0.58617985", "0.58617985", "0.58564615", "0.58491915", "0.5837125", "0.58272254", "0.5813128", "0.58126575", "0.5808308", "0.5803912", "0.5802052", "0.5793638", "0.5786678", "0.5786678", "0.5785094", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856", "0.5775856" ]
0.0
-1
////////////////////////////////////////////////////////////////////// Description: Pushes element, copying flags from previous top instance. Use: public
public void push(SoState state) // //////////////////////////////////////////////////////////////////////// { SoTextureOverrideElement elt = (SoTextureOverrideElement )getNextInStack(); flags = elt.flags; elt.capture(state); // Capture previous element }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(TYPE element);", "public void push(Object anElement);", "public void push(E elem) {\n if (elem != null) {\r\n contents[++top] = elem;\r\n }\r\n\r\n // Usually better to resize after an addition rather than before for\r\n // multi-threading reasons. Although, that is not important for this class.\r\n if (top == contents.length-1) resize();\r\n }", "@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}", "public void push(T elem);", "public void push(T element);", "public void push(T element);", "public void push (E element);", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "public void push(E element);", "public void push(int elem);", "void push(Object elem);", "public void push(T element) {\n\t\t//add the new element\n\t\telements.add(element);\n\n\t}", "public StackImpl<T> push(T ele) {\r\n\t\tNode oldTop = top;\r\n\t\ttop = new Node(ele);\r\n\t\ttop.next = oldTop;\r\n\t\tsize++;\r\n\t\t\r\n\t\treturn this;\r\n\t}", "void push(int element);", "public void push(Object element) {\r\n\t\tal.add(element, al.listSize);\r\n\t}", "public void push(E element){\n\t\tNode<E> temp = new Node<E>(element);\n\t\ttemp.next = top;\n\t\ttop = temp;\n\t}", "public void push(E element) {\r\n items.add(0, element);\r\n }", "public void push(Object element)\n\t{\n\t\tensureCapacity();\n\t\telements[size++] = element;\n\t}", "public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }", "public void push_front(T element);", "public void push(E object) {stackList.insertAtFront(object);}", "@Override\n public E push(final E obj) {\n // TODO\n top = new Node<>(obj, top);\n return obj;\n }", "public void push(T element){\n\t\tarray[noOfElements] = element;\n\t\tnoOfElements ++;\t\t\n\t}", "public void push()\n {\n\tsetIndentLevel(indentLevel + 1);\n }", "public void push(int value){\n //To be written by student\n localSize++;\n top++;\n if(localSize>A.getSize()){\n A.doubleSize();\n try{\n A.modifyElement(value,top);\n }catch(Exception c){c.printStackTrace();}\n }\n else{try{\n A.modifyElement(value,top);\n }catch(Exception a){a.printStackTrace();} }\n }", "public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }", "public void push(T newEntry) {\n ensureCapacity();\n stack[topIndex + 1] = newEntry;\n topIndex++;\n }", "public void push(Stapelelement pStapelelement)\n {\n if(this.isEmpty())\n {\n this.top = pStapelelement;\n }\n else\n {\n Stapelelement oldTop = this.top;\n this.top = pStapelelement;\n this.top.setNext(oldTop);\n }\n }", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Fixed Stack\");\r\n\t\t\r\n\t}", "@Override\n public void push(T element){\n arrayAsList.add(element);\n stackPointer++;\n }", "@Override\r\n\tpublic void push(E e) {\n\t\t\r\n\t}", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "public void push(E e) {\n\t\ttop = new SNode<E>(e, top);\n\t}", "public void push(T data) {\n if((stackPointer + 1) == Array.getLength(this.elements))\n expandStack();\n this.elements[++stackPointer] = data;\n }", "public void push(Node element) {\r\n\t\tif (size() == 0) {\r\n\t\t\tstart = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\telement.setNext(start);\r\n\t\t\tstart = element;\r\n\t\t}\r\n\t\telements++;\r\n\t}", "public void push (E item){\n this.stack.add(item);\n }", "public boolean push(E element){\r\n\t\t/**If array is full, create an array double the current size*/\r\n\t\tif(top==stack.length-1){\r\n\t\t\tstack = Arrays.copyOf(stack, 2*stack.length);\r\n\t\t}\r\n\t\tstack[++top] = element;\t\r\n\t\treturn true;\r\n\t}", "public void push(E it){\r\n Node<E> curr = new Node<E>(it);\r\n curr.setNext(top);\r\n top = curr;\r\n size++;\r\n }", "private static void push(Stack<Integer> top_ref, int new_data) {\n //Push the data onto the stack\n top_ref.push(new_data);\n }", "public void push(int element) {\n // ..... fill the stub function ......\n if(top==99)\n throw new RuntimeException(\"Stack overflow\");\n top++;\n myarray[top]=element;\n \n }", "public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }", "public void push(int element) {\n stack1.push(element);\n }", "public void push(Team element){\n \t//create new node\n \tNode front = new Node(element);\n \t//set next\n \tfront.setNext(first);\n \t//update head node\n \tfirst = front;\n //increment total\n total++;\n }", "public void push(E inValue)\n {\n stack.insertFirst(inValue);\n }", "private Node push(T entry, Node topNode)\n {\n if (isEmpty())\n {\n return new Node(entry);\n }\n else // not empty\n {\n Node temp = new Node(entry);\n temp.setNextNode(topNode);\n return temp;\n }\n }", "void push(RtfCompoundObject state) {\r\n _top = new RtfCompoundObjectStackCell(_top, state);\r\n }", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "public void push( Object obj )\n {\n this.top = new Node( obj, this.top );\n \n this.count++;\n }", "public void push(T x);", "void push(int a)\n\t{\n\t // Your code here\n\t top++;\n\t arr[top]=a;\n\t}", "public void push(T entry)\n { \n first = push(entry, first);\n }", "public void push(T o) {\r\n\t\tadd(o);\t\r\n\t}", "@Override\n\tpublic void push(E element) {\n\t\tif (size() == capacity) {\n\t\t\tthrow new FullStackException(\"Full Stack\");\n\t\t}\n\t\tarr[++top] = element;\n\t}", "static void push(Stack<Integer> top_ref, int new_data) {\r\n // Push the data onto the stack\r\n top_ref.push(new_data);\r\n }", "public void push(Object obj) {\n if (top < stack.length - 1) {\n stack[++top] = obj;\n }\n else\n {\n increaseStackSize(1);\n stack[++top] = obj; \n }\n }", "public void push(Object item)\r\n {\n this.top = new Node(item, this.top);\r\n }", "public void push(Item item)\n {\n top = new Node<Item>(item, top);\n N++;\n }", "@Override\r\n public boolean canBePushed()\r\n {\r\n return true;\r\n }", "public void push(Object ob){\n \t Stack n_item=new Stack(ob);\n \tn_item.next=top;\n \ttop=n_item;\n }", "public void push(E value);", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void push(Object element) {\n\t\tif(size == capacity) {\n\t\t\tthrow new IllegalArgumentException(\"Capacity has been reached.\");\n\t\t}\n\t\tlist.add(0, (E) element);\n\t\tsize++;\n\t\t\n\t}", "public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}", "public void push(E e) throws Exception;", "public synchronized void push(Object o) {\n itemcount++;\n addElement(o);\n notify();\n }", "public void push(T aValue);", "public void push(T value) {\n top = new Entry<>(value, top); // diamond operator (syntactic sugar)\n }", "public void enqueue(T pushed)\n\t{insert(pushed);}", "@Override\n public void push(Integer value) {\n ar[pos++] = value; \n }", "public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }", "void push(T item) {\n contents.addAtHead(item);\n }", "public void push(int data){\n \tif(top == size)\n \tSystem.out.println(\"Stack is overflow\");\n \telse{\n \ttop++;\n \telements[top]=data;\n \t} \n\t}", "@Override\r\n\tpublic boolean push(T e) {\r\n\t\tif(!isFull()) {\r\n\t\t\tstack[topIndex + 1] = e;\r\n\t\t\ttopIndex++;\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 void push(E item);", "public void push(AnyType e) throws StackException;", "void push(E Obj);", "private final void push(Object ob) {\r\n\t\teval_stack.add(ob);\r\n\t}", "public void push(int item) {\n if(isEmpty())\n top = new Node(item);\n else\n {\n Node newNode = new Node(item, top);\n top = newNode;\n }\n sz++;\n }", "public E push(E e) {\n Node node = new Node();\n node.data = e;\n node.next = isEmpty() ? null : top;\n top = node;\n return e;\n }", "@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}", "void push(E e);", "void push(E e);", "void push(T t);", "public void push(Item item){\n this.stack.add(item);\n\n }", "public E push(E element) \r\n {\r\n \tif (maxStack2.size() > 0)\r\n \t{\r\n \t \tif (maxStack2.lastElement().compareTo(element) <= 0)\r\n\t \t{\r\n\t \t\tmaxStack2.push(element);\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tmaxStack2.push(maxStack2.lastElement());\r\n\t \t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tmaxStack2.push(element);\r\n \t}\r\n \t\r\n return maxStack.push(element);\r\n }", "public void push(T item);", "public void push(E obj) {\n super.add(obj);\n }", "void push(T item);", "void push(T item);", "@Override\n\tpublic void push(int item) {\n\n\t}", "void push(int e) {\r\n\t\tif (top==stack.length) {\r\n\t\t\tmakeNewArray();\r\n\t\t}\r\n\t\tstack[top] = e;\r\n\t\ttop++;\r\n\t}", "public void push(E item) {\n addFirst(item);\n }", "public void push(E data);", "public void push(T item){\n Node<T> n;\n if(this.isEmpty()){\n n = new Node<>();\n n.setData(item);\n } else {\n n = new Node<>(item, this._top);\n }\n\n this._top = n;\n }", "public void push(T newItem);", "public void push(T ele)\n\t{\n\t\tif (ele == null)\n\t\t\tthrow new IllegalArgumentException(\"Tried to add a NULL element!\");\n\t\t\n\t\tlist.addFirst(ele);\n\t}", "void push(int i);", "void push(T x);", "public void push(T item)\r\n\t{\r\n\t\t if (size == Stack.length) \r\n\t\t {\r\n\t\t\t doubleSize();\r\n\t }\r\n\t\tStack[size++] = item;\r\n\t}", "void push() {\n\t\t// push logic here\n\t\t_pushes++;\n\t\t_money += _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}" ]
[ "0.72854894", "0.71971947", "0.7111874", "0.710315", "0.6889401", "0.6886215", "0.6886215", "0.6884614", "0.6866489", "0.68371713", "0.6827584", "0.6779246", "0.6733224", "0.67316216", "0.67051554", "0.67042035", "0.66852456", "0.66843694", "0.664481", "0.6593726", "0.65822005", "0.6573721", "0.65504336", "0.6535722", "0.65074855", "0.64676094", "0.6467497", "0.6464986", "0.6447744", "0.64041406", "0.638485", "0.63779724", "0.6363295", "0.6359216", "0.6352517", "0.6315599", "0.62649596", "0.62648606", "0.62567186", "0.62472993", "0.62332094", "0.62241644", "0.62187624", "0.6213449", "0.62123007", "0.6211951", "0.62060165", "0.6204617", "0.62039495", "0.6201478", "0.6196867", "0.6194117", "0.6189741", "0.61860675", "0.61834323", "0.618249", "0.6166353", "0.6159589", "0.6158546", "0.6149966", "0.6142769", "0.6130113", "0.61260784", "0.6125351", "0.61251277", "0.61226207", "0.6121472", "0.61148906", "0.6113822", "0.6108186", "0.6107266", "0.6105039", "0.61048937", "0.609624", "0.6096166", "0.6093624", "0.6090765", "0.60876226", "0.6085686", "0.60776424", "0.6073498", "0.6073498", "0.6070767", "0.60346687", "0.60181767", "0.6017021", "0.6014651", "0.6013341", "0.6013341", "0.60091716", "0.60035497", "0.60022855", "0.6001406", "0.59857786", "0.59844995", "0.5965058", "0.5964472", "0.59608984", "0.5958412", "0.5950697" ]
0.60930675
76
////////////////////////////////////////////////////////////////////// Description: Set texture quality override flag Use: public, static
public static boolean getQualityOverride(SoState state) // //////////////////////////////////////////////////////////////////////// { SoTextureOverrideElement elt; elt = ( SoTextureOverrideElement ) getConstElement(state, classStackIndexMap.get(SoTextureOverrideElement.class)); return (elt.flags & Flags.TEXTURE_QUALITY.getValue()) != 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void\nsetQualityOverride(SoState state,\n boolean override)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n if (override)\n elt.flags |= Flags.TEXTURE_QUALITY.getValue();\n else\n elt.flags &= ~Flags.TEXTURE_QUALITY.getValue();\n}", "public void setQuality(float quality);", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(int value) {\n this.quality = value;\n }", "public void setQuality(Integer quality) {\n this.quality = quality;\n }", "public void set_quality(int value) {\n setUIntBEElement(offsetBits_quality(), 16, value);\n }", "public void setQuality(int value)\n\t{\n\t\tconfigManager.setQuality(value);\n\t\tupdatePreviewSize();\n\t}", "int getImageQualityPref();", "public float getQuality();", "public void setCompressionQuality(float quality) {\n if (quality < 0.0F || quality > 1.0F) {\n throw new IllegalArgumentException(\"Quality out-of-bounds!\");\n }\n this.compressionQuality = 256 - (quality * 256);\n }", "boolean hasQualityMax();", "public Builder setQuality(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "@MavlinkFieldInfo(\n position = 7,\n unitSize = 1,\n description = \"JPEG quality. Values: [1-100].\"\n )\n public final Builder jpgQuality(int jpgQuality) {\n this.jpgQuality = jpgQuality;\n return this;\n }", "java.lang.String getQuality();", "public void setTexture(Bitmap texture) {\n photo = texture;\n int alt = texture.getWidth();\n int ample = texture.getHeight();\n int max = Math.max(alt, ample);\n float ratio = (float) ample / (float) alt;\n if (max > limit) {\n if (max == ample) {\n photoWidth = limit;\n photoHeight = (int) (limit * ratio);\n } else if (max == alt) {\n photoWidth = (int) (limit / ratio);\n photoHeight = limit;\n }\n }\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public Builder setQualityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "public static void\nsetImageOverride(SoState state,\n boolean override)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n if (override)\n elt.flags |= Flags.TEXTURE_IMAGE.getValue();\n else\n elt.flags &= ~Flags.TEXTURE_IMAGE.getValue();\n}", "public Builder setQuality(int percent) {\n if (percent > 0 || percent < 100) {\n this.quality = percent;\n }\n return this;\n }", "public double getQuality() {\n return quality;\n }", "boolean hasQuality();", "boolean hasQuality();", "protected static void setTextureParameter(@NotNull Shape shape) {\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n\n\t\tif (shape.texture.missing) {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n\t\t} else {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t}\n\t}", "public void setQualityGrid( QualityGridBO pQualityGrid )\r\n {\r\n mQualityGrid = pQualityGrid;\r\n }", "private void increaseQualityByOne(Item item) {\n item.quality = item.quality + 1;\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n int int0 = homeEnvironment0.getPhotoQuality();\n assertEquals(1260, int0);\n }", "public void setTexture(PImage image) {\n //m_tImage = image;\n m_texture = image.pixels;\n TEX_WIDTH = image.width;\n TEX_HEIGHT = image.height;\n F_TEX_WIDTH = TEX_WIDTH-1;\n F_TEX_HEIGHT = TEX_HEIGHT-1;\n INTERPOLATE_UV = true;\n \n if (image.format == ARGB) {\n m_drawFlags |= R_TEXTURE32;\n } else if (image.format == RGB) {\n m_drawFlags |= R_TEXTURE24;\n } else if (image.format == ALPHA) {\n m_drawFlags |= R_TEXTURE8;\n }\n }", "public abstract void setImageFormat(String format);", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setPhotoQuality((-2107));\n int int0 = homeEnvironment0.getPhotoQuality();\n assertEquals((-2107), int0);\n }", "@MavlinkFieldInfo(\n position = 7,\n unitSize = 1,\n description = \"JPEG quality. Values: [1-100].\"\n )\n public final int jpgQuality() {\n return this.jpgQuality;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkImageScale() {\n\t\tboolean flag = oTest.checkImageScale();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "private static void saveImageQualitySettings(Editor editor, CheckBox small, CheckBox medium, CheckBox original)\n\t{\n\t\tif (medium.isChecked())\n\t\t{\n\t\t\teditor.putInt(HikeConstants.IMAGE_QUALITY, ImageQuality.QUALITY_MEDIUM);\n\t\t}\n\t\telse if (original.isChecked())\n\t\t{\n\t\t\teditor.putInt(HikeConstants.IMAGE_QUALITY, ImageQuality.QUALITY_ORIGINAL);\n\t\t}\n\t\telse\n\t\t{\n\t\t\teditor.putInt(HikeConstants.IMAGE_QUALITY, ImageQuality.QUALITY_SMALL);\n\t\t}\n\t\teditor.commit();\n\t}", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n homeEnvironment0.clone();\n assertEquals(1260, homeEnvironment0.getPhotoQuality());\n }", "void setMaxScale(int value);", "java.lang.String getQualityMax();", "public Builder setQualityMax(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00008000;\n qualityMax_ = value;\n onChanged();\n return this;\n }", "public void setCompressParams(CompressFormat compressFormat, int quality)\n {\n this.mCompressFormat = compressFormat;\n this.mCompressQuality = quality;\n }", "public void setScale(float scale);", "public int get_quality() {\n return (int)getUIntBEElement(offsetBits_quality(), 16);\n }", "public static void setMaxTextureSize(int texSize) {\r\n\t\tmaxTextureSize = texSize;\r\n\t}", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public void setTexture(int set_texture) {\n\t\ttexture = set_texture;\n\t}", "public void setScaleFactor(float scale){\n scaleFactor = scale;\n }", "void setFormat(ImageFormat format);", "public void setModelQuality(DriftCheckModelQuality modelQuality) {\n this.modelQuality = modelQuality;\n }", "private void setScale() {\n this.particleScale = (1 - ((float) slowTime / 50)) * (1.5f * (float) offset);\n }", "public void setQualityScores(double[] qualityScores) throws LockedException { }", "public void setQualityScores(double[] qualityScores) throws LockedException { }", "public Builder setQualityMaxBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00008000;\n qualityMax_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setTexture(int texID) {\n\n\t}", "void setScale(ScaleSelector sensor, int scaleNo);", "private GATKRead addBaseQuality(final GATKRead read) {\n\n // convert to a flow base read\n final FlowBasedReadUtils.ReadGroupInfo rgInfo = FlowBasedReadUtils.getReadGroupInfo(getHeaderForReads(), read);\n final FlowBasedRead fbRead = new FlowBasedRead(read, rgInfo.flowOrder, rgInfo.maxClass, fbargs);\n final int flowOrderLength = calcFlowOrderLength(rgInfo.flowOrder);\n\n // generate base quality\n final double[] baseErrorProb = generateBaseErrorProbability(fbRead, flowOrderLength);\n final byte[] phred = convertErrorProbToPhred(baseErrorProb);\n\n // install in read\n if ( !replaceQualityMode ) {\n read.setAttribute(BASE_QUALITY_ATTRIBUTE_NAME, convertPhredToString(phred));\n } else {\n read.setAttribute(OLD_QUALITY_ATTRIBUTE_NAME, convertPhredToString(read.getBaseQualitiesNoCopy()));\n read.setBaseQualities(phred);\n }\n\n // return reused read\n return read;\n }", "Quality getQ();", "@Override\n public void setScale(float scale) {\n this.scale = scale;\n }", "public void setTextureWidth(int texWidth) {\n\tthis.texWidth = texWidth;\n\tcalculateWidthRatio();\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setVideoQuality(76);\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals(76, int0);\n }", "private String getQuality()\n {\n \n if(high.isSelected())\n {\n return \"High\";\n }\n else if(medium.isSelected())\n {\n return \"Medium\";\n }\n else if(mild.isSelected())\n {\n return \"Mild\";\n }\n else\n {\n \n return null;\n }\n }", "public void setSrcQualityRating(String value) {\r\n setAttributeInternal(SRCQUALITYRATING, value);\r\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setPhotoQuality((-2107));\n homeEnvironment0.clone();\n assertEquals((-2107), homeEnvironment0.getPhotoQuality());\n }", "public void setTextureHeight(int texHeight) {\n\tthis.texHeight = texHeight;\n\tcalculateHeightRatio();\n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "void setHResolution(short resolution);", "private void setMediaAssetScaleTypeValue(int value) {\n mediaAssetScaleType_ = value;\n }", "public double resolution(final Slit slit, final double imgQuality) {\n return resolution(slit);\n }", "public void setCanScale(boolean scale){\n mScale = scale;\n }", "public String initialVideoQuality() {\n int backCameraId = CameraHolder.instance().getBackCameraId();\n String defaultStr = null;\n if (mCameraId == backCameraId) {\n// defaultStr = mContext.getString(R.string.pref_back_video_quality_default);\n defaultStr = SystemProperties.get(BACK_CAMERA_DEFAULT_VIDEO_QUALITY_VALUE,\"\");\n } else {\n// defaultStr = mContext.getString(R.string.pref_front_video_quality_default);\n defaultStr = SystemProperties.get(FRONT_CAMERA_DEFAULT_VIDEO_QUALITY_VALUE,\"\");\n }\n int quality = 0;\n if(defaultStr == null || defaultStr.length() < 1) {\n ArrayList<String> supprotedQuality = getSupportedVideoQuality();\n String[] candidateArray = (mCameraId == backCameraId) ?\n mContext.getResources().getStringArray(R.array.pref_video_quality_entryvalues) :\n mContext.getResources().getStringArray(R.array.pref_front_video_quality_entryvalues);\n\n for(String candidate:candidateArray) {\n if(supprotedQuality.indexOf(candidate) >= 0) {\n defaultStr = candidate;\n break;\n }\n }\n }\n if(defaultStr != null) {\n quality = Integer.valueOf(defaultStr);\n if (CamcorderProfile.hasProfile(mCameraId, quality)) {\n SharedPreferences.Editor editor = ComboPreferences\n .get(mContext).edit();\n editor.putString(KEY_VIDEO_QUALITY, defaultStr);\n editor.apply();\n return defaultStr;\n }\n }\n return Integer.toString(CamcorderProfile.QUALITY_HIGH);\n }", "void glTexParameteri(int target, int pname, int param);", "public boolean hasQualityMax() {\n return ((bitField0_ & 0x00008000) == 0x00008000);\n }", "public static int offsetBits_quality() {\n return 48;\n }", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "public Builder clearQuality() {\n bitField0_ = (bitField0_ & ~0x00004000);\n quality_ = getDefaultInstance().getQuality();\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "void setThumbnail(boolean thumbnail);", "public ImageProperties setScale(ImageScale scale) {\n this.scale = scale;\n return this;\n }", "public static int sizeBits_quality() {\n return 16;\n }", "public void setFilters(int min, int mag) {\r\n \t\r\n \tthis.minFilter = min;\r\n \tthis.magFilter = mag;\r\n \tGLES10.glTexParameterf(GLES10.GL_TEXTURE_2D, GLES10.GL_TEXTURE_MIN_FILTER, this.minFilter);\r\n \tGLES10.glTexParameterf(GLES10.GL_TEXTURE_2D, GLES10.GL_TEXTURE_MAG_FILTER, this.magFilter);\r\n }", "public boolean hasQuality() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }", "void setScale(int objIndex,Vector3f scale){\n look[objIndex].setScale(scale);\n usedScale.set(objIndex);\n }", "private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }", "public void setScale(double scale) {\r\n if (scale >= 0.1) {\r\n this.scale = scale;\r\n }\r\n }", "public void setTexture(TextureRegion region) {\n \ttexture = region;\n \torigin = new Vector2(texture.getRegionWidth()/2.0f,texture.getRegionHeight()/2.0f);\n }", "public PBRTProperty setTextureSetting(String name, String value) {\n\t\tif (name == null)\n\t\t\tthrow new NullPointerException(\"the given name is null!\");\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"the given value is null!\");\n\t\tremoveSetting(name);\n\t\ttextures.put(name, value);\n\t\treturn this;\n\t}", "public static void setSpeedScalingFactor(double speedFactor)\n\t{\n\t\tspeedScalingFactor = speedFactor;\n\t//\telse speedScalingFactor = SpeedBasedDetection.DEF_SCALING_FACTOR;\n\t\t//\t\tSystem.out.println(\"speedScalingFactor: \"+speedScalingFactor);\n\t\t//Prefs.speedScalingFactor = speedScalingFactor;\n\t}", "public void setSiegeWeaponDamage(short siegeWeaponDamage);", "public void setHistologicalQuality(String histologicalQuality)\r\n \t{\r\n \t\tthis.histologicalQuality = histologicalQuality;\r\n \t}", "public final void setBestFit() {\r\n setZoom(ZOOM_BEST_FIT);\r\n }", "public void setTargetResolution(int w, int h) {\n captureW = w;\n captureH = h;\n }", "void setBitsPerPixel(int bitsPerPixel);", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setVideoQuality(76);\n homeEnvironment0.clone();\n assertEquals(76, homeEnvironment0.getVideoQuality());\n }", "private void setParam(int param, int value) {\n bind();\n glTexParameteri(GL_TEXTURE_2D, param, value);\n }", "public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\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 quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static int offset_quality() {\n return (48 / 8);\n }", "public boolean hasQualityMax() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }", "public void setScale( float scale ) {\n\t\tthis.scale = scale;\n\t}", "@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }", "public void setResolution(Size resolution, long scale) {\n\t\tAssert.assertNotNull(resolution);\n\n\t\tJWLC.nativeHandler().wlc_output_set_resolution(this.to(),\n\t\t\t\tresolution.to(), Utils.getAsUnsignedInt(scale));\n\t}" ]
[ "0.8257847", "0.7528094", "0.6915229", "0.6915229", "0.68557507", "0.67577094", "0.65711975", "0.65129554", "0.6439568", "0.6150707", "0.60705584", "0.5808821", "0.58047056", "0.57949793", "0.5784069", "0.5751676", "0.5726987", "0.5726987", "0.5726987", "0.56977105", "0.56702024", "0.5659619", "0.56425554", "0.5608126", "0.5608126", "0.5574063", "0.55683285", "0.55591476", "0.55158484", "0.5505135", "0.54971015", "0.54493815", "0.5436549", "0.5426846", "0.54157734", "0.5413712", "0.540533", "0.5364919", "0.53610086", "0.5349689", "0.53367203", "0.5328054", "0.5320492", "0.53154206", "0.529883", "0.52657694", "0.5259618", "0.52498096", "0.5214976", "0.5207673", "0.5207673", "0.5172996", "0.51723856", "0.5163854", "0.5147032", "0.5144799", "0.5143017", "0.5115899", "0.51149774", "0.5102423", "0.5101488", "0.5092967", "0.5092538", "0.5081662", "0.5070055", "0.506709", "0.506154", "0.50596815", "0.5053655", "0.5053622", "0.5042259", "0.5042063", "0.50296175", "0.5025301", "0.50166476", "0.5014441", "0.5007673", "0.5004888", "0.4997613", "0.49925724", "0.49797183", "0.49745202", "0.49693045", "0.49683547", "0.49616995", "0.4960467", "0.49569064", "0.49565592", "0.49515593", "0.49416256", "0.4933607", "0.49127048", "0.49126706", "0.49108797", "0.49025297", "0.48933256", "0.48827133", "0.48671806", "0.48615736", "0.48559847" ]
0.7721831
1
////////////////////////////////////////////////////////////////////// Description: Set texture image override flag Use: public, static
public static boolean getImageOverride(SoState state) // //////////////////////////////////////////////////////////////////////// { SoTextureOverrideElement elt; elt = ( SoTextureOverrideElement ) getConstElement(state, classStackIndexMap.get(SoTextureOverrideElement.class)); return (elt.flags & Flags.TEXTURE_IMAGE.getValue()) != 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void\nsetImageOverride(SoState state,\n boolean override)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n if (override)\n elt.flags |= Flags.TEXTURE_IMAGE.getValue();\n else\n elt.flags &= ~Flags.TEXTURE_IMAGE.getValue();\n}", "public void setTexture(PImage image) {\n //m_tImage = image;\n m_texture = image.pixels;\n TEX_WIDTH = image.width;\n TEX_HEIGHT = image.height;\n F_TEX_WIDTH = TEX_WIDTH-1;\n F_TEX_HEIGHT = TEX_HEIGHT-1;\n INTERPOLATE_UV = true;\n \n if (image.format == ARGB) {\n m_drawFlags |= R_TEXTURE32;\n } else if (image.format == RGB) {\n m_drawFlags |= R_TEXTURE24;\n } else if (image.format == ALPHA) {\n m_drawFlags |= R_TEXTURE8;\n }\n }", "public static void\nsetQualityOverride(SoState state,\n boolean override)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n if (override)\n elt.flags |= Flags.TEXTURE_QUALITY.getValue();\n else\n elt.flags &= ~Flags.TEXTURE_QUALITY.getValue();\n}", "@Override\n\tpublic void setTexture(int texID) {\n\n\t}", "public void setTexture(int set_texture) {\n\t\ttexture = set_texture;\n\t}", "public native void setTexturePath ( String texturePath );", "public void setTexture(String texture) {\n this.texture = texture;\n }", "protected static void setTextureParameter(@NotNull Shape shape) {\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n\n\t\tif (shape.texture.missing) {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n\t\t} else {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t}\n\t}", "public void setHoldTextureData(boolean holdTextureData) {\n/* 67 */ this.holdTextureData = holdTextureData;\n/* */ }", "@Override\r\n\tprotected ResourceLocation getEntityTexture(EntityAngel entity)\r\n {\r\n return ANGEL_TEXTURE;\r\n }", "@Override\n public void loadTexture() {\n\n }", "public void setTexture(TextureRegion region) {\n \ttexture = region;\n \torigin = new Vector2(texture.getRegionWidth()/2.0f,texture.getRegionHeight()/2.0f);\n }", "public void setImg() {\n\t\tif (custom) {\n\t\t\tImage img1;\n\t\t\ttry {\n\t\t\t\timg1 = new Image(new FileInputStream(\"tmpImg.png\"));\n\t\t\t\tmainAvatar.setImage(img1); // Sets main user avatar as the custom image\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "protected ResourceLocation getEntityTexture(EntityBat entity)\n {\n return BAT_TEXTURES;\n }", "public void setTexture(Bitmap texture) {\n photo = texture;\n int alt = texture.getWidth();\n int ample = texture.getHeight();\n int max = Math.max(alt, ample);\n float ratio = (float) ample / (float) alt;\n if (max > limit) {\n if (max == ample) {\n photoWidth = limit;\n photoHeight = (int) (limit * ratio);\n } else if (max == alt) {\n photoWidth = (int) (limit / ratio);\n photoHeight = limit;\n }\n }\n }", "public static boolean\ngetQualityOverride(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = ( SoTextureOverrideElement )\n getConstElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n return (elt.flags & Flags.TEXTURE_QUALITY.getValue()) != 0;\n}", "@Override\n\tprotected ResourceLocation getEntityTexture(Entity entity) {\n\t\treturn texture;\n\t}", "@Override\n\t\tprotected ResourceLocation getEntityTexture(EntityLivingBase entity) {\n\t\t\treturn texture;\n\t\t}", "public abstract void setImageFormat(String format);", "@Override\n\tpublic int getTexture() {\n\t\treturn 0;\n\t}", "protected void setPic() {\n }", "public void setTexture(int side, TextureComponent2D srcImage)\n throws InvalidWriteTimingException\n {\n if(isLive() && updateHandler != null &&\n !updateHandler.isDataWritePermitted(this))\n throw new InvalidWriteTimingException(getDataWriteTimingMessage());\n\n texture[side] = srcImage;\n stateChanged = true;\n }", "void glBindTexture(int target, int texture);", "void lSetImage(Image img);", "public final native void setTexturePath(String path)/*-{\r\n\tthis.setTexturePath(path);\r\n\t}-*/;", "private static void loadAlternateTextures(GameTexture texture, int xTile, int yTile) {\n texture.addImage(TextureTheme.TILE_ALTERNATE_PALETTE1, TILE_SHEET.getSubimage(275 + (17 * xTile), 194 + (17 * yTile), 16, 16));\n texture.addImage(TextureTheme.TILE_ALTERNATE_PALETTE2, TILE_SHEET.getSubimage(275 + (17 * xTile), 271 + (17 * yTile), 16, 16));\n }", "public Texture changeImg(String ImageFile2) {\r\n Texture imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile2));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n return imgTexture;\r\n }", "void setImageResource(String imageResource) throws IOException;", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "private void setTexture(Graphics2D graphic, Graphic gr, Feature feature) {\n BufferedImage image = getExternalGraphic(gr);\n \n if (image != null) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"got an image in graphic fill\");\n }\n } else {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"going for the mark from graphic fill\");\n }\n \n Mark mark = getMark(gr, feature);\n int size = 200;\n \n image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);\n \n Graphics2D g1 = image.createGraphics();\n double rotation = 0.0;\n \n rotation = ((Number) gr.getRotation().getValue(feature)).doubleValue();\n \n fillDrawMark(g1, markCentrePoint, mark, (int) (size * .9), rotation, feature);\n \n MediaTracker track = new MediaTracker(obs);\n track.addImage(image, 1);\n \n try {\n track.waitForID(1);\n } catch (InterruptedException e) {\n LOGGER.warning(e.toString());\n }\n }\n \n double width = image.getWidth();\n double height = image.getHeight();\n double unitSize = Math.max(width, height);\n int size = 6;\n \n size = ((Number) gr.getSize().getValue(feature)).intValue();\n \n double drawSize = (double) size / unitSize;\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"size = \" + size + \" unitsize \" + unitSize + \" drawSize \" + drawSize);\n }\n \n AffineTransform at = graphic.getTransform();\n double scaleX = drawSize / at.getScaleX();\n double scaleY = drawSize / -at.getScaleY();\n \n /* This is needed because the image must be a fixed size in pixels\n * but when the image is used as the fill it is transformed by the\n * current transform.\n * However this causes problems as the image size can become very\n * small e.g. 1 or 2 pixels when the drawScale is large, this makes\n * the image fill look very poor - I have no idea how to fix this.\n */\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"scale \" + scaleX + \" \" + scaleY);\n }\n \n width *= scaleX;\n height *= scaleY;\n \n Double rect = new Double(0.0, 0.0, width, height);\n TexturePaint imagePaint = new TexturePaint(image, rect);\n graphic.setPaint(imagePaint);\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"applied TexturePaint \" + imagePaint);\n }\n }", "public void testGetSetImageImage() {\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/smallpill.png\").getImage());\n\t\t\n\t\t//SET NEW IMAGE\n\t\ttestNormal.setImage(testImage);\n\t\tassertEquals(testNormal.getImage(), testImage);\n\t}", "@Deprecated\n/* */ protected void setTextureIndex(int idx) {\n/* 94 */ setData((byte)(getData() & 0x8 | idx));\n/* */ }", "public PBRTProperty setTextureSetting(String name, String value) {\n\t\tif (name == null)\n\t\t\tthrow new NullPointerException(\"the given name is null!\");\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"the given value is null!\");\n\t\tremoveSetting(name);\n\t\ttextures.put(name, value);\n\t\treturn this;\n\t}", "private void setPhotoAttcher() {\n\n }", "public void setUseTextureView(boolean useTextureView) {\n this.useTextureView = useTextureView;\n }", "public void setTexture(int index, Texture texture)\n\t{\n\t\tif (tmpReg == null)\n\t\t\ttmpReg = new TextureRegion[textures.length];\n\t\tif (tmpReg[index] == null) //minimize object creation since a lot of users will use this every frame\n\t\t\ttmpReg[index] = new TextureRegion();\n\t\ttmpReg[index].setRegion(texture);\n\t\tsetTexture(index, tmpReg[index]);\n\t}", "public void setBackground(String texture)\r\n {\r\n \tFileInputStream inFile = null;\r\n \t try\r\n \t {\r\n \t inFile = new FileInputStream(texture);\r\n \t JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(inFile);\r\n \t BufferedImage bgBuffImg = decoder.decodeAsBufferedImage();\r\n \t ImageComponent2D bgImange = new ImageComponent2D(BufferedImage.TYPE_INT_RGB, bgBuffImg);\r\n \t bg.setImage(bgImange);\r\n \t inFile.close();\r\n \t }\r\n \t catch (Exception e)\r\n\t\t{\r\n \t \tSystem.out.println(e + \"\\n\" + \"Texture Import failed!\");\r\n \t }\r\n }", "public void func_180435_a(TextureAtlasSprite p_180435_1_) {\n/* 215 */ int var2 = getFXLayer();\n/* */ \n/* 217 */ if (var2 == 1) {\n/* */ \n/* 219 */ this.particleIcon = p_180435_1_;\n/* */ }\n/* */ else {\n/* */ \n/* 223 */ throw new RuntimeException(\"Invalid call to Particle.setTex, use coordinate methods\");\n/* */ } \n/* */ }", "protected ResourceLocation getEntityTexture(T entity) {\n\t\treturn ORECART_TEXTURES;\n\t}", "abstract protected boolean mustApplyTexture(DrawContext dc);", "private void setImage(ActorType type) {\n switch (type) {\n case TREE: image = new Image(\"src/res/images/tree.png\"); break;\n case GOLDENTREE: image = new Image(\"src/res/images/gold-tree.png\"); break;\n case STOCKPILE: image = new Image(\"src/res/images/cherries.png\"); break;\n case HOARD: image = new Image(\"src/res/images/hoard.png\"); break;\n case PAD: image = new Image(\"src/res/images/pad.png\"); break;\n case FENCE: image = new Image(\"src/res/images/fence.png\"); break;\n case SIGNUP: image = new Image(\"src/res/images/up.png\"); break;\n case SIGNDOWN: image = new Image(\"src/res/images/down.png\"); break;\n case SIGNLEFT: image = new Image(\"src/res/images/left.png\"); break;\n case SIGNRIGHT: image = new Image(\"src/res/images/right.png\"); break;\n case POOL: image = new Image(\"src/res/images/pool.png\"); break;\n case GATHERER: image = new Image(\"src/res/images/gatherer.png\"); break;\n case THIEF: image = new Image(\"src/res/images/thief.png\"); break;\n default: System.err.println(\"error: no preset image for this actor type: \"+type.toString());\n }\n }", "protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture((EntityBat)p_110775_1_);\n }", "void setImage(String image);", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "protected ResourceLocation getEntityTexture(EntitySquid entity)\n {\n return SQUID_TEXTURES;\n }", "public void setTempImage()\n {\n URL url = this.getClass().getResource(lastselection.getImage());\n\t\tImage image = Toolkit.getDefaultToolkit().getImage(url);\n\t\ttempImage = new PImage(image);\n\t\ttempImage.setBounds(0,0,65,170);\n\t\ttempImage.setTransparency(0);\n\t\tlayer.addChild(tempImage);\n\t}", "public void setParticleTextureIndex(int p_70536_1_) {\n/* 232 */ if (getFXLayer() != 0)\n/* */ {\n/* 234 */ throw new RuntimeException(\"Invalid call to Particle.setMiscTex\");\n/* */ }\n/* */ \n/* */ \n/* 238 */ this.particleTextureIndexX = p_70536_1_ % 16;\n/* 239 */ this.particleTextureIndexY = p_70536_1_ / 16;\n/* */ }", "public Texture setPlayerImage(){\n\t\tList<String> playerSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal player images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> playerArray = selection.getChildrenByName(\"player\");\n\t\tfor (int i = 0; i < playerArray.size; i++)\n\t\t\tplayerSelection.add(playerArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the player List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement playe = root.getChildByName(\"artist\");\n\t\tElement artist = playe.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> playerSelectArray = artist.getChildrenByName(\"player\");\n\t\tfor (int i = 0; i < playerSelectArray.size; i++)\n\t\t\tplayerSelection.add(playerSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n//\t\tRandom number generator to choose a random image as the player image\n\t\tint randomPlayer = (int) Math.random() * playerSelection.size();\n\t\tFileHandle playerImage = Gdx.files.internal(playerSelection.get(randomPlayer));\n\t\treturn new Texture(playerImage);\n\t}", "void texImage2D(int target, int level, int resourceId, int border);", "public Texture setBackgroundImage(){\n\t\tList<String> backgroundSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal background images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> backgroundArray = selection.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the balls List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"artist\");\n\t\tElement artist = selection.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> backgroundSelectArray = artist.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundSelectArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tRandom number generator to choose a random image as the ball image\n\t\tint randomBackground = (int) Math.random() * backgroundSelection.size();\n\t\tFileHandle backgroundImage = Gdx.files.internal(backgroundSelection.get(randomBackground));\n\t\treturn new Texture(backgroundImage) ;\n\t}", "@Override\n\tpublic void init() {\n\t\tthis.image = Helper.getImageFromAssets(AssetConstants.IMG_ROAD_NORMAL);\n\t}", "public void setTextureCoordB(E3DVector2F textureCoord){\r\n this.vertices[1].setTextureCoord(textureCoord);\r\n }", "protected ResourceLocation getEntityTexture(EntityBat p_110775_1_)\n {\n return batTextures;\n }", "public void setFlag(Drawable flag){\n ImageView mFlagImageView = findViewById(R.id.guesshint_image_flag);\n mFlagImageView.setImageDrawable(flag);\n }", "public void loadTexture(int imageNum, Texture atex)\r\n\t{\r\n\t\tgl.glEnable(GL_TEXTURE_2D);\r\n\t\tgl.glShadeModel(GL_FLAT);\r\n\t\tgl.glTexImage2D(GL_TEXTURE_2D, imageNum, 3, atex.gTexW, atex.gTexH, 0,\r\n\t\t GL_BGRA_EXT, GL_UNSIGNED_BYTE, atex.pixels);\r\n\t}", "public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }", "protected void setActive(boolean activate) {\n\t\tif (this.active ^ activate) {\r\n\t\t\tthis.active = activate;\r\n\t\t\t\r\n\t\t\tthis.img = AbstractRelicModRelic.getRelicTexture(this.relicId, activate);\r\n\t\t}\r\n\t}", "public void setProfileImg() {\n }", "public void setImage(String tmp) {\n this.image = tmp;\n }", "public void reload() {\n mHandle = new Texture(mBitmap, mMinMode, mMagMode, mWrapS, mWrapT).getHandle();\n }", "public void setEatImage(java.lang.String param) {\n localEatImageTracker = true;\n\n this.localEatImage = param;\n }", "public void setUpTextures(int program, GL2 gl2) {\n\t\t// sets the parameters for texture\n\t\tgl2.glGenTextures(1, buffer);\n\t\tgl2.glActiveTexture(gl2.GL_TEXTURE0);\n\t\tgl2.glBindTexture(gl2.GL_TEXTURE_2D,\n\t\t\t\tgl2.glGetUniformLocation(program, \"abc\"));\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MIN_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MAG_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexImage2D(gl2.GL_TEXTURE_2D, 0, gl2.GL_RGBA,\n\t\t\t\tbufferimage.getWidth(), bufferimage.getHeight(), 0,\n\t\t\t\tgl2.GL_BGRA, gl2.GL_UNSIGNED_BYTE, buffer);\n\t}", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "int GL_ACTIVE_TEXTURE();", "private void loadResource() {\n\t\ttry {\n\t\t\ttarmacTexture = scaleResourceImagePaint(\"/textures/tarmac2.jpg\", 300, 300);\n\t\t\tgrassTexture = scaleResourceImagePaint(\"/textures/grass.jpg\", 300, 300);\n\t\t\tstopwayTexture = scaleResourceImagePaint(\"/textures/stopway.jpg\", 300, 300);\n\t\t} catch (IOException e) {\n\t\t\tsetUsingTextures(false);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Texture getTexture(String resourceName, BufferedImage resourceimage, int target, int dstPixelFormat, int minFilter, int magFilter) throws IOException {\n/* 92 */ ImageIOImageData data = new ImageIOImageData(); int srcPixelFormat = 0;\n/* */ \n/* */ \n/* 95 */ int textureID = InternalTextureLoader.createTextureID();\n/* 96 */ TextureImpl texture = new TextureImpl(resourceName, target, textureID);\n/* */ \n/* */ \n/* 99 */ Renderer.get().glEnable(3553);\n/* */ \n/* */ \n/* 102 */ Renderer.get().glBindTexture(target, textureID);\n/* */ \n/* 104 */ BufferedImage bufferedImage = resourceimage;\n/* 105 */ texture.setWidth(bufferedImage.getWidth());\n/* 106 */ texture.setHeight(bufferedImage.getHeight());\n/* */ \n/* 108 */ if (bufferedImage.getColorModel().hasAlpha()) {\n/* 109 */ srcPixelFormat = 6408;\n/* */ } else {\n/* 111 */ srcPixelFormat = 6407;\n/* */ } \n/* */ \n/* */ \n/* 115 */ ByteBuffer textureBuffer = data.imageToByteBuffer(bufferedImage, false, false, null);\n/* 116 */ texture.setTextureHeight(data.getTexHeight());\n/* 117 */ texture.setTextureWidth(data.getTexWidth());\n/* 118 */ texture.setAlpha((data.getDepth() == 32));\n/* */ \n/* 120 */ if (target == 3553) {\n/* 121 */ Renderer.get().glTexParameteri(target, 10241, minFilter);\n/* 122 */ Renderer.get().glTexParameteri(target, 10240, magFilter);\n/* */ \n/* 124 */ if (Renderer.get().canTextureMirrorClamp()) {\n/* 125 */ Renderer.get().glTexParameteri(3553, 10242, 34627);\n/* 126 */ Renderer.get().glTexParameteri(3553, 10243, 34627);\n/* */ } else {\n/* 128 */ Renderer.get().glTexParameteri(3553, 10242, 10496);\n/* 129 */ Renderer.get().glTexParameteri(3553, 10243, 10496);\n/* */ } \n/* */ } \n/* */ \n/* 133 */ Renderer.get().glTexImage2D(target, \n/* 134 */ 0, \n/* 135 */ dstPixelFormat, \n/* 136 */ texture.getTextureWidth(), \n/* 137 */ texture.getTextureHeight(), \n/* 138 */ 0, \n/* 139 */ srcPixelFormat, \n/* 140 */ 5121, \n/* 141 */ textureBuffer);\n/* */ \n/* 143 */ return (Texture)texture;\n/* */ }", "public Texture set(Texture src) {\n memCopy(src.address(), address(), SIZEOF);\n return this;\n }", "public void setTextureCoordA(E3DVector2F textureCoord){\r\n this.vertices[0].setTextureCoord(textureCoord);\r\n }", "@Override\n public void setNormal()\n {\n setImage(\"Minus.png\");\n }", "public static boolean generateBaseTextures() {\n return getArgumentList().contains(\"generateBaseTextures\");\n }", "public void setImageResource(String resPath) {\n \t\timageResource = resPath;\n \t\tif (resPath.contains(\"_holo\") || resPath.contains(\"_alt\")) {\n \t\t\tsetAlternateArt(true);\n \t\t}\n \t\t// setName(id);\n \t}", "@Override\n public ResourceLocation getTextureLocation(DroneEntity entity) {\n return entity.isAttacking() ? mobShootingTexture : mobTexture;\n }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }", "public void setColorTexture(String name) {\n this.colorTexture = name;\n }", "protected void applyTextureUniforms () {\n final boolean wasPendantic = ShaderProgram.pedantic;\n ShaderProgram.pedantic = false; // Allow shaders that don't use all the textures.\n for (int i = 0; i < textureUnitUniforms.length; i++)\n getShader().setUniformi(textureUnitUniforms[i], i);\n ShaderProgram.pedantic = wasPendantic;\n }", "public void changeBodyTexture(String aTextureName)\n {\n // If you want, you can target a specific part of the robot\n // and only change the texture of this part by using the getChildByName(\"\")\n \t/* Passing through all the children of the robot\n \t * and applying a new texture on them */\n for(int i = 0;i<androidRobot3DObject.numChildren();i++)\n {\n String name = androidRobot3DObject.getChildAt(i).name();\n Log.d(\"min3d\", \"Texture name: \" + name);\n\n if(name.indexOf(\"body\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(aTextureName);\n }\n }\n }", "public Texture loadTexture(String file, Format format, boolean useMipMap);", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic String getTextureFile() \n\t{\n\t\treturn \"/reactioncraft/rcs/Blocks.png\";\n\t}", "public void setSecondRawTexture(GLTexture secondRawTexture) {\n this.secondRawTexture = secondRawTexture;\n }", "protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }", "public ResourceLocation getEntityTexture(T entity) {\n return MINECART_TEXTURES;\n }", "public void setImg(String mapSelect){\n\t\ttry {\n\t\t if (mapSelect.equals(\"map01.txt\")){\n\t\t\timg = ImageIO.read(new File(\"space.jpg\"));\n\t\t\timg2 = ImageIO.read(new File(\"metal.png\"));\n\n\t\t }\t\n\t\t if (mapSelect.equals(\"map02.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"forest.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"leaf.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"log.png\"));\n\t\t }\n\t\t if (mapSelect.equals(\"map03.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"spinx.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"pyramid.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"sandy.png\"));\n\t\t\t\t\n\t\t }\n\t\t if (mapSelect.equals(\"map04.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"doublebg.png\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"cloud.png\"));\n\t\t\t\t\n\t\t }\n\t\t\t\n\t\t}\n\t\t catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}", "protected ResourceLocation getEntityTexture(EntitySentientSpecter entity)\n {\n return texture;\n }", "private void setParam(int param, int value) {\n bind();\n glTexParameteri(GL_TEXTURE_2D, param, value);\n }", "public void changePhoto() {\r\n\t\tisPictFetche = false;\r\n\t\tlaPhoto = new Photo();\r\n\t\tlaPhotoCandidate = new Photo();\r\n\t}", "public void\nsetObjectTextureCoords(final SbVec4f texCoords)\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Transform the object space coords by the current texture matrix\n // to get the image space texture coords\n imageTexCoords.copyFrom( multVecMatrix4(SoMultiTextureMatrixElement.get(state,0),\n texCoords));\n}", "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 setUnpressedTexture(TextureRegion unpressedTexture){\n this.unpressed = unpressedTexture;\n }", "protected ResourceLocation getEntityTexture(EntityZombie p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }", "public void setTextureCoordC(E3DVector2F textureCoord){\r\n this.vertices[2].setTextureCoord(textureCoord);\r\n }", "public void resetImageToFaceState() {\n String iconPath = Global.IMAGE_PATH;\n switch (game.getFinished()) {\n case 0:\n iconPath += \"face-normal.png\";\n break;\n\n case 1:\n iconPath += \"face-win.png\";\n break;\n\n case 2:\n iconPath += \"face-lose.png\";\n break;\n\n default:\n iconPath += \"face-normal.png\";\n break;\n }\n face.setIcon(new ImageIcon(iconPath));\n }", "public String getTexture(){\n\t\treturn texture;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\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 setLanguageGermanButtonImageAsset(ImageAsset imageAsset) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_languageGermanButton_propertyImageSource\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_languageGermanButton_propertyImageSource\", imageAsset.getFilename());\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(ReplyActionType.SET_IMAGE_ASSET, \"setLanguageGermanButtonImageAsset(\", imageAsset);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }" ]
[ "0.84497225", "0.7155416", "0.7128719", "0.68462664", "0.6756074", "0.63154393", "0.6271764", "0.6204915", "0.61863035", "0.61754304", "0.61648023", "0.6097051", "0.60388714", "0.60340935", "0.6020097", "0.60049796", "0.59926933", "0.5985049", "0.59759545", "0.59398705", "0.5938303", "0.5932841", "0.5931776", "0.592821", "0.5916015", "0.5839472", "0.5828691", "0.58278334", "0.5813698", "0.57018024", "0.5695747", "0.5691201", "0.5682788", "0.5667159", "0.56648546", "0.56612486", "0.5660955", "0.5644108", "0.5641877", "0.564102", "0.5623356", "0.56098336", "0.56022507", "0.55969197", "0.5590822", "0.55839384", "0.5566491", "0.556277", "0.5545648", "0.5545393", "0.55263793", "0.55190456", "0.5517489", "0.55117905", "0.5501293", "0.5497603", "0.54963577", "0.5493671", "0.54856837", "0.5484849", "0.548236", "0.5480133", "0.5471509", "0.54712206", "0.5464979", "0.545942", "0.54558", "0.5455192", "0.543681", "0.54365176", "0.5426989", "0.5417468", "0.54167324", "0.5411181", "0.54020375", "0.54007995", "0.5399163", "0.539886", "0.53985196", "0.53953356", "0.53900534", "0.53897834", "0.5389314", "0.5382", "0.5381952", "0.53802127", "0.5375343", "0.5373523", "0.53692824", "0.5361134", "0.53558743", "0.5348602", "0.5343687", "0.5339183", "0.53358287", "0.5323779", "0.5323779", "0.5319543", "0.53124726", "0.53097516" ]
0.75170505
1
////////////////////////////////////////////////////////////////////// Description: Set texture quality override flag Use: public, static
public static void setQualityOverride(SoState state, boolean override) // //////////////////////////////////////////////////////////////////////// { SoTextureOverrideElement elt; elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class)); if (override) elt.flags |= Flags.TEXTURE_QUALITY.getValue(); else elt.flags &= ~Flags.TEXTURE_QUALITY.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean\ngetQualityOverride(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = ( SoTextureOverrideElement )\n getConstElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n return (elt.flags & Flags.TEXTURE_QUALITY.getValue()) != 0;\n}", "public void setQuality(float quality);", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(int value) {\n this.quality = value;\n }", "public void setQuality(Integer quality) {\n this.quality = quality;\n }", "public void set_quality(int value) {\n setUIntBEElement(offsetBits_quality(), 16, value);\n }", "public void setQuality(int value)\n\t{\n\t\tconfigManager.setQuality(value);\n\t\tupdatePreviewSize();\n\t}", "int getImageQualityPref();", "public float getQuality();", "public void setCompressionQuality(float quality) {\n if (quality < 0.0F || quality > 1.0F) {\n throw new IllegalArgumentException(\"Quality out-of-bounds!\");\n }\n this.compressionQuality = 256 - (quality * 256);\n }", "boolean hasQualityMax();", "public Builder setQuality(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "@MavlinkFieldInfo(\n position = 7,\n unitSize = 1,\n description = \"JPEG quality. Values: [1-100].\"\n )\n public final Builder jpgQuality(int jpgQuality) {\n this.jpgQuality = jpgQuality;\n return this;\n }", "java.lang.String getQuality();", "public void setTexture(Bitmap texture) {\n photo = texture;\n int alt = texture.getWidth();\n int ample = texture.getHeight();\n int max = Math.max(alt, ample);\n float ratio = (float) ample / (float) alt;\n if (max > limit) {\n if (max == ample) {\n photoWidth = limit;\n photoHeight = (int) (limit * ratio);\n } else if (max == alt) {\n photoWidth = (int) (limit / ratio);\n photoHeight = limit;\n }\n }\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public Builder setQualityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "public static void\nsetImageOverride(SoState state,\n boolean override)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n if (override)\n elt.flags |= Flags.TEXTURE_IMAGE.getValue();\n else\n elt.flags &= ~Flags.TEXTURE_IMAGE.getValue();\n}", "public Builder setQuality(int percent) {\n if (percent > 0 || percent < 100) {\n this.quality = percent;\n }\n return this;\n }", "public double getQuality() {\n return quality;\n }", "boolean hasQuality();", "boolean hasQuality();", "protected static void setTextureParameter(@NotNull Shape shape) {\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n\n\t\tif (shape.texture.missing) {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n\t\t} else {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t}\n\t}", "public void setQualityGrid( QualityGridBO pQualityGrid )\r\n {\r\n mQualityGrid = pQualityGrid;\r\n }", "private void increaseQualityByOne(Item item) {\n item.quality = item.quality + 1;\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n int int0 = homeEnvironment0.getPhotoQuality();\n assertEquals(1260, int0);\n }", "public void setTexture(PImage image) {\n //m_tImage = image;\n m_texture = image.pixels;\n TEX_WIDTH = image.width;\n TEX_HEIGHT = image.height;\n F_TEX_WIDTH = TEX_WIDTH-1;\n F_TEX_HEIGHT = TEX_HEIGHT-1;\n INTERPOLATE_UV = true;\n \n if (image.format == ARGB) {\n m_drawFlags |= R_TEXTURE32;\n } else if (image.format == RGB) {\n m_drawFlags |= R_TEXTURE24;\n } else if (image.format == ALPHA) {\n m_drawFlags |= R_TEXTURE8;\n }\n }", "public abstract void setImageFormat(String format);", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setPhotoQuality((-2107));\n int int0 = homeEnvironment0.getPhotoQuality();\n assertEquals((-2107), int0);\n }", "@MavlinkFieldInfo(\n position = 7,\n unitSize = 1,\n description = \"JPEG quality. Values: [1-100].\"\n )\n public final int jpgQuality() {\n return this.jpgQuality;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkImageScale() {\n\t\tboolean flag = oTest.checkImageScale();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "private static void saveImageQualitySettings(Editor editor, CheckBox small, CheckBox medium, CheckBox original)\n\t{\n\t\tif (medium.isChecked())\n\t\t{\n\t\t\teditor.putInt(HikeConstants.IMAGE_QUALITY, ImageQuality.QUALITY_MEDIUM);\n\t\t}\n\t\telse if (original.isChecked())\n\t\t{\n\t\t\teditor.putInt(HikeConstants.IMAGE_QUALITY, ImageQuality.QUALITY_ORIGINAL);\n\t\t}\n\t\telse\n\t\t{\n\t\t\teditor.putInt(HikeConstants.IMAGE_QUALITY, ImageQuality.QUALITY_SMALL);\n\t\t}\n\t\teditor.commit();\n\t}", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n homeEnvironment0.clone();\n assertEquals(1260, homeEnvironment0.getPhotoQuality());\n }", "void setMaxScale(int value);", "java.lang.String getQualityMax();", "public Builder setQualityMax(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00008000;\n qualityMax_ = value;\n onChanged();\n return this;\n }", "public void setCompressParams(CompressFormat compressFormat, int quality)\n {\n this.mCompressFormat = compressFormat;\n this.mCompressQuality = quality;\n }", "public void setScale(float scale);", "public int get_quality() {\n return (int)getUIntBEElement(offsetBits_quality(), 16);\n }", "public static void setMaxTextureSize(int texSize) {\r\n\t\tmaxTextureSize = texSize;\r\n\t}", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public void setTexture(int set_texture) {\n\t\ttexture = set_texture;\n\t}", "public void setScaleFactor(float scale){\n scaleFactor = scale;\n }", "void setFormat(ImageFormat format);", "public void setModelQuality(DriftCheckModelQuality modelQuality) {\n this.modelQuality = modelQuality;\n }", "private void setScale() {\n this.particleScale = (1 - ((float) slowTime / 50)) * (1.5f * (float) offset);\n }", "public void setQualityScores(double[] qualityScores) throws LockedException { }", "public void setQualityScores(double[] qualityScores) throws LockedException { }", "public Builder setQualityMaxBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00008000;\n qualityMax_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setTexture(int texID) {\n\n\t}", "void setScale(ScaleSelector sensor, int scaleNo);", "private GATKRead addBaseQuality(final GATKRead read) {\n\n // convert to a flow base read\n final FlowBasedReadUtils.ReadGroupInfo rgInfo = FlowBasedReadUtils.getReadGroupInfo(getHeaderForReads(), read);\n final FlowBasedRead fbRead = new FlowBasedRead(read, rgInfo.flowOrder, rgInfo.maxClass, fbargs);\n final int flowOrderLength = calcFlowOrderLength(rgInfo.flowOrder);\n\n // generate base quality\n final double[] baseErrorProb = generateBaseErrorProbability(fbRead, flowOrderLength);\n final byte[] phred = convertErrorProbToPhred(baseErrorProb);\n\n // install in read\n if ( !replaceQualityMode ) {\n read.setAttribute(BASE_QUALITY_ATTRIBUTE_NAME, convertPhredToString(phred));\n } else {\n read.setAttribute(OLD_QUALITY_ATTRIBUTE_NAME, convertPhredToString(read.getBaseQualitiesNoCopy()));\n read.setBaseQualities(phred);\n }\n\n // return reused read\n return read;\n }", "Quality getQ();", "@Override\n public void setScale(float scale) {\n this.scale = scale;\n }", "public void setTextureWidth(int texWidth) {\n\tthis.texWidth = texWidth;\n\tcalculateWidthRatio();\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setVideoQuality(76);\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals(76, int0);\n }", "private String getQuality()\n {\n \n if(high.isSelected())\n {\n return \"High\";\n }\n else if(medium.isSelected())\n {\n return \"Medium\";\n }\n else if(mild.isSelected())\n {\n return \"Mild\";\n }\n else\n {\n \n return null;\n }\n }", "public void setSrcQualityRating(String value) {\r\n setAttributeInternal(SRCQUALITYRATING, value);\r\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setPhotoQuality((-2107));\n homeEnvironment0.clone();\n assertEquals((-2107), homeEnvironment0.getPhotoQuality());\n }", "public void setTextureHeight(int texHeight) {\n\tthis.texHeight = texHeight;\n\tcalculateHeightRatio();\n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "void setHResolution(short resolution);", "private void setMediaAssetScaleTypeValue(int value) {\n mediaAssetScaleType_ = value;\n }", "public double resolution(final Slit slit, final double imgQuality) {\n return resolution(slit);\n }", "public void setCanScale(boolean scale){\n mScale = scale;\n }", "public String initialVideoQuality() {\n int backCameraId = CameraHolder.instance().getBackCameraId();\n String defaultStr = null;\n if (mCameraId == backCameraId) {\n// defaultStr = mContext.getString(R.string.pref_back_video_quality_default);\n defaultStr = SystemProperties.get(BACK_CAMERA_DEFAULT_VIDEO_QUALITY_VALUE,\"\");\n } else {\n// defaultStr = mContext.getString(R.string.pref_front_video_quality_default);\n defaultStr = SystemProperties.get(FRONT_CAMERA_DEFAULT_VIDEO_QUALITY_VALUE,\"\");\n }\n int quality = 0;\n if(defaultStr == null || defaultStr.length() < 1) {\n ArrayList<String> supprotedQuality = getSupportedVideoQuality();\n String[] candidateArray = (mCameraId == backCameraId) ?\n mContext.getResources().getStringArray(R.array.pref_video_quality_entryvalues) :\n mContext.getResources().getStringArray(R.array.pref_front_video_quality_entryvalues);\n\n for(String candidate:candidateArray) {\n if(supprotedQuality.indexOf(candidate) >= 0) {\n defaultStr = candidate;\n break;\n }\n }\n }\n if(defaultStr != null) {\n quality = Integer.valueOf(defaultStr);\n if (CamcorderProfile.hasProfile(mCameraId, quality)) {\n SharedPreferences.Editor editor = ComboPreferences\n .get(mContext).edit();\n editor.putString(KEY_VIDEO_QUALITY, defaultStr);\n editor.apply();\n return defaultStr;\n }\n }\n return Integer.toString(CamcorderProfile.QUALITY_HIGH);\n }", "void glTexParameteri(int target, int pname, int param);", "public static int offsetBits_quality() {\n return 48;\n }", "public boolean hasQualityMax() {\n return ((bitField0_ & 0x00008000) == 0x00008000);\n }", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "public Builder clearQuality() {\n bitField0_ = (bitField0_ & ~0x00004000);\n quality_ = getDefaultInstance().getQuality();\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "public ImageProperties setScale(ImageScale scale) {\n this.scale = scale;\n return this;\n }", "void setThumbnail(boolean thumbnail);", "public static int sizeBits_quality() {\n return 16;\n }", "public void setFilters(int min, int mag) {\r\n \t\r\n \tthis.minFilter = min;\r\n \tthis.magFilter = mag;\r\n \tGLES10.glTexParameterf(GLES10.GL_TEXTURE_2D, GLES10.GL_TEXTURE_MIN_FILTER, this.minFilter);\r\n \tGLES10.glTexParameterf(GLES10.GL_TEXTURE_2D, GLES10.GL_TEXTURE_MAG_FILTER, this.magFilter);\r\n }", "public boolean hasQuality() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }", "void setScale(int objIndex,Vector3f scale){\n look[objIndex].setScale(scale);\n usedScale.set(objIndex);\n }", "private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }", "public void setScale(double scale) {\r\n if (scale >= 0.1) {\r\n this.scale = scale;\r\n }\r\n }", "public PBRTProperty setTextureSetting(String name, String value) {\n\t\tif (name == null)\n\t\t\tthrow new NullPointerException(\"the given name is null!\");\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"the given value is null!\");\n\t\tremoveSetting(name);\n\t\ttextures.put(name, value);\n\t\treturn this;\n\t}", "public void setTexture(TextureRegion region) {\n \ttexture = region;\n \torigin = new Vector2(texture.getRegionWidth()/2.0f,texture.getRegionHeight()/2.0f);\n }", "public static void setSpeedScalingFactor(double speedFactor)\n\t{\n\t\tspeedScalingFactor = speedFactor;\n\t//\telse speedScalingFactor = SpeedBasedDetection.DEF_SCALING_FACTOR;\n\t\t//\t\tSystem.out.println(\"speedScalingFactor: \"+speedScalingFactor);\n\t\t//Prefs.speedScalingFactor = speedScalingFactor;\n\t}", "public void setSiegeWeaponDamage(short siegeWeaponDamage);", "public void setHistologicalQuality(String histologicalQuality)\r\n \t{\r\n \t\tthis.histologicalQuality = histologicalQuality;\r\n \t}", "public final void setBestFit() {\r\n setZoom(ZOOM_BEST_FIT);\r\n }", "public void setTargetResolution(int w, int h) {\n captureW = w;\n captureH = h;\n }", "void setBitsPerPixel(int bitsPerPixel);", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setVideoQuality(76);\n homeEnvironment0.clone();\n assertEquals(76, homeEnvironment0.getVideoQuality());\n }", "private void setParam(int param, int value) {\n bind();\n glTexParameteri(GL_TEXTURE_2D, param, value);\n }", "public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\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 quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static int offset_quality() {\n return (48 / 8);\n }", "public boolean hasQualityMax() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }", "public void setScale( float scale ) {\n\t\tthis.scale = scale;\n\t}", "@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }", "public void setResolution(Size resolution, long scale) {\n\t\tAssert.assertNotNull(resolution);\n\n\t\tJWLC.nativeHandler().wlc_output_set_resolution(this.to(),\n\t\t\t\tresolution.to(), Utils.getAsUnsignedInt(scale));\n\t}" ]
[ "0.7720885", "0.7528898", "0.69170266", "0.69170266", "0.68575865", "0.6759604", "0.65731084", "0.6514372", "0.6439399", "0.6151638", "0.6071836", "0.58086586", "0.58068854", "0.5796104", "0.57848954", "0.57520545", "0.5728276", "0.5728276", "0.5728276", "0.56996566", "0.5668078", "0.56612176", "0.5643925", "0.5608072", "0.5608072", "0.5573636", "0.5569142", "0.5561061", "0.5516366", "0.5505984", "0.54970807", "0.54502666", "0.5438046", "0.54281217", "0.5416068", "0.54138947", "0.540592", "0.536558", "0.5362831", "0.53497696", "0.53377885", "0.5329556", "0.5321761", "0.53158474", "0.52998304", "0.5267495", "0.52596587", "0.52503115", "0.52157396", "0.5208161", "0.5208161", "0.51743746", "0.51734936", "0.5164511", "0.5147188", "0.5146191", "0.5144585", "0.5116816", "0.5115782", "0.51039", "0.51018876", "0.5093467", "0.50927055", "0.5082042", "0.5070626", "0.5067393", "0.50642693", "0.5060262", "0.50531703", "0.5052326", "0.50429475", "0.5042695", "0.5029776", "0.50256485", "0.5019055", "0.5015201", "0.50078267", "0.5007327", "0.49985167", "0.4992236", "0.4980378", "0.49763444", "0.4970401", "0.49696726", "0.49619368", "0.49618867", "0.49578625", "0.4956594", "0.49511755", "0.49413776", "0.49350205", "0.49138737", "0.4912919", "0.49113783", "0.4904981", "0.48945338", "0.48831418", "0.48689663", "0.48640105", "0.48581815" ]
0.8256089
0
////////////////////////////////////////////////////////////////////// Description: Set texture image override flag Use: public, static
public static void setImageOverride(SoState state, boolean override) // //////////////////////////////////////////////////////////////////////// { SoTextureOverrideElement elt; elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class)); if (override) elt.flags |= Flags.TEXTURE_IMAGE.getValue(); else elt.flags &= ~Flags.TEXTURE_IMAGE.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean\ngetImageOverride(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = ( SoTextureOverrideElement )\n getConstElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n return (elt.flags & Flags.TEXTURE_IMAGE.getValue()) != 0;\n}", "public void setTexture(PImage image) {\n //m_tImage = image;\n m_texture = image.pixels;\n TEX_WIDTH = image.width;\n TEX_HEIGHT = image.height;\n F_TEX_WIDTH = TEX_WIDTH-1;\n F_TEX_HEIGHT = TEX_HEIGHT-1;\n INTERPOLATE_UV = true;\n \n if (image.format == ARGB) {\n m_drawFlags |= R_TEXTURE32;\n } else if (image.format == RGB) {\n m_drawFlags |= R_TEXTURE24;\n } else if (image.format == ALPHA) {\n m_drawFlags |= R_TEXTURE8;\n }\n }", "public static void\nsetQualityOverride(SoState state,\n boolean override)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = (SoTextureOverrideElement )getElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n if (override)\n elt.flags |= Flags.TEXTURE_QUALITY.getValue();\n else\n elt.flags &= ~Flags.TEXTURE_QUALITY.getValue();\n}", "@Override\n\tpublic void setTexture(int texID) {\n\n\t}", "public void setTexture(int set_texture) {\n\t\ttexture = set_texture;\n\t}", "public native void setTexturePath ( String texturePath );", "public void setTexture(String texture) {\n this.texture = texture;\n }", "protected static void setTextureParameter(@NotNull Shape shape) {\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n\n\t\tif (shape.texture.missing) {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n\t\t} else {\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shape.isSmoothTexture() ? GL_LINEAR : GL_NEAREST);\n\t\t}\n\t}", "public void setHoldTextureData(boolean holdTextureData) {\n/* 67 */ this.holdTextureData = holdTextureData;\n/* */ }", "@Override\r\n\tprotected ResourceLocation getEntityTexture(EntityAngel entity)\r\n {\r\n return ANGEL_TEXTURE;\r\n }", "@Override\n public void loadTexture() {\n\n }", "public void setTexture(TextureRegion region) {\n \ttexture = region;\n \torigin = new Vector2(texture.getRegionWidth()/2.0f,texture.getRegionHeight()/2.0f);\n }", "public void setImg() {\n\t\tif (custom) {\n\t\t\tImage img1;\n\t\t\ttry {\n\t\t\t\timg1 = new Image(new FileInputStream(\"tmpImg.png\"));\n\t\t\t\tmainAvatar.setImage(img1); // Sets main user avatar as the custom image\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "protected ResourceLocation getEntityTexture(EntityBat entity)\n {\n return BAT_TEXTURES;\n }", "public void setTexture(Bitmap texture) {\n photo = texture;\n int alt = texture.getWidth();\n int ample = texture.getHeight();\n int max = Math.max(alt, ample);\n float ratio = (float) ample / (float) alt;\n if (max > limit) {\n if (max == ample) {\n photoWidth = limit;\n photoHeight = (int) (limit * ratio);\n } else if (max == alt) {\n photoWidth = (int) (limit / ratio);\n photoHeight = limit;\n }\n }\n }", "public static boolean\ngetQualityOverride(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt;\n elt = ( SoTextureOverrideElement )\n getConstElement(state, classStackIndexMap.get(SoTextureOverrideElement.class));\n return (elt.flags & Flags.TEXTURE_QUALITY.getValue()) != 0;\n}", "@Override\n\tprotected ResourceLocation getEntityTexture(Entity entity) {\n\t\treturn texture;\n\t}", "@Override\n\t\tprotected ResourceLocation getEntityTexture(EntityLivingBase entity) {\n\t\t\treturn texture;\n\t\t}", "public abstract void setImageFormat(String format);", "@Override\n\tpublic int getTexture() {\n\t\treturn 0;\n\t}", "protected void setPic() {\n }", "public void setTexture(int side, TextureComponent2D srcImage)\n throws InvalidWriteTimingException\n {\n if(isLive() && updateHandler != null &&\n !updateHandler.isDataWritePermitted(this))\n throw new InvalidWriteTimingException(getDataWriteTimingMessage());\n\n texture[side] = srcImage;\n stateChanged = true;\n }", "void glBindTexture(int target, int texture);", "void lSetImage(Image img);", "public final native void setTexturePath(String path)/*-{\r\n\tthis.setTexturePath(path);\r\n\t}-*/;", "private static void loadAlternateTextures(GameTexture texture, int xTile, int yTile) {\n texture.addImage(TextureTheme.TILE_ALTERNATE_PALETTE1, TILE_SHEET.getSubimage(275 + (17 * xTile), 194 + (17 * yTile), 16, 16));\n texture.addImage(TextureTheme.TILE_ALTERNATE_PALETTE2, TILE_SHEET.getSubimage(275 + (17 * xTile), 271 + (17 * yTile), 16, 16));\n }", "public Texture changeImg(String ImageFile2) {\r\n Texture imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile2));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n return imgTexture;\r\n }", "void setImageResource(String imageResource) throws IOException;", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "private void setTexture(Graphics2D graphic, Graphic gr, Feature feature) {\n BufferedImage image = getExternalGraphic(gr);\n \n if (image != null) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"got an image in graphic fill\");\n }\n } else {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"going for the mark from graphic fill\");\n }\n \n Mark mark = getMark(gr, feature);\n int size = 200;\n \n image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);\n \n Graphics2D g1 = image.createGraphics();\n double rotation = 0.0;\n \n rotation = ((Number) gr.getRotation().getValue(feature)).doubleValue();\n \n fillDrawMark(g1, markCentrePoint, mark, (int) (size * .9), rotation, feature);\n \n MediaTracker track = new MediaTracker(obs);\n track.addImage(image, 1);\n \n try {\n track.waitForID(1);\n } catch (InterruptedException e) {\n LOGGER.warning(e.toString());\n }\n }\n \n double width = image.getWidth();\n double height = image.getHeight();\n double unitSize = Math.max(width, height);\n int size = 6;\n \n size = ((Number) gr.getSize().getValue(feature)).intValue();\n \n double drawSize = (double) size / unitSize;\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"size = \" + size + \" unitsize \" + unitSize + \" drawSize \" + drawSize);\n }\n \n AffineTransform at = graphic.getTransform();\n double scaleX = drawSize / at.getScaleX();\n double scaleY = drawSize / -at.getScaleY();\n \n /* This is needed because the image must be a fixed size in pixels\n * but when the image is used as the fill it is transformed by the\n * current transform.\n * However this causes problems as the image size can become very\n * small e.g. 1 or 2 pixels when the drawScale is large, this makes\n * the image fill look very poor - I have no idea how to fix this.\n */\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"scale \" + scaleX + \" \" + scaleY);\n }\n \n width *= scaleX;\n height *= scaleY;\n \n Double rect = new Double(0.0, 0.0, width, height);\n TexturePaint imagePaint = new TexturePaint(image, rect);\n graphic.setPaint(imagePaint);\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"applied TexturePaint \" + imagePaint);\n }\n }", "public void testGetSetImageImage() {\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/smallpill.png\").getImage());\n\t\t\n\t\t//SET NEW IMAGE\n\t\ttestNormal.setImage(testImage);\n\t\tassertEquals(testNormal.getImage(), testImage);\n\t}", "@Deprecated\n/* */ protected void setTextureIndex(int idx) {\n/* 94 */ setData((byte)(getData() & 0x8 | idx));\n/* */ }", "public PBRTProperty setTextureSetting(String name, String value) {\n\t\tif (name == null)\n\t\t\tthrow new NullPointerException(\"the given name is null!\");\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"the given value is null!\");\n\t\tremoveSetting(name);\n\t\ttextures.put(name, value);\n\t\treturn this;\n\t}", "private void setPhotoAttcher() {\n\n }", "public void setUseTextureView(boolean useTextureView) {\n this.useTextureView = useTextureView;\n }", "public void setTexture(int index, Texture texture)\n\t{\n\t\tif (tmpReg == null)\n\t\t\ttmpReg = new TextureRegion[textures.length];\n\t\tif (tmpReg[index] == null) //minimize object creation since a lot of users will use this every frame\n\t\t\ttmpReg[index] = new TextureRegion();\n\t\ttmpReg[index].setRegion(texture);\n\t\tsetTexture(index, tmpReg[index]);\n\t}", "public void setBackground(String texture)\r\n {\r\n \tFileInputStream inFile = null;\r\n \t try\r\n \t {\r\n \t inFile = new FileInputStream(texture);\r\n \t JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(inFile);\r\n \t BufferedImage bgBuffImg = decoder.decodeAsBufferedImage();\r\n \t ImageComponent2D bgImange = new ImageComponent2D(BufferedImage.TYPE_INT_RGB, bgBuffImg);\r\n \t bg.setImage(bgImange);\r\n \t inFile.close();\r\n \t }\r\n \t catch (Exception e)\r\n\t\t{\r\n \t \tSystem.out.println(e + \"\\n\" + \"Texture Import failed!\");\r\n \t }\r\n }", "public void func_180435_a(TextureAtlasSprite p_180435_1_) {\n/* 215 */ int var2 = getFXLayer();\n/* */ \n/* 217 */ if (var2 == 1) {\n/* */ \n/* 219 */ this.particleIcon = p_180435_1_;\n/* */ }\n/* */ else {\n/* */ \n/* 223 */ throw new RuntimeException(\"Invalid call to Particle.setTex, use coordinate methods\");\n/* */ } \n/* */ }", "protected ResourceLocation getEntityTexture(T entity) {\n\t\treturn ORECART_TEXTURES;\n\t}", "abstract protected boolean mustApplyTexture(DrawContext dc);", "private void setImage(ActorType type) {\n switch (type) {\n case TREE: image = new Image(\"src/res/images/tree.png\"); break;\n case GOLDENTREE: image = new Image(\"src/res/images/gold-tree.png\"); break;\n case STOCKPILE: image = new Image(\"src/res/images/cherries.png\"); break;\n case HOARD: image = new Image(\"src/res/images/hoard.png\"); break;\n case PAD: image = new Image(\"src/res/images/pad.png\"); break;\n case FENCE: image = new Image(\"src/res/images/fence.png\"); break;\n case SIGNUP: image = new Image(\"src/res/images/up.png\"); break;\n case SIGNDOWN: image = new Image(\"src/res/images/down.png\"); break;\n case SIGNLEFT: image = new Image(\"src/res/images/left.png\"); break;\n case SIGNRIGHT: image = new Image(\"src/res/images/right.png\"); break;\n case POOL: image = new Image(\"src/res/images/pool.png\"); break;\n case GATHERER: image = new Image(\"src/res/images/gatherer.png\"); break;\n case THIEF: image = new Image(\"src/res/images/thief.png\"); break;\n default: System.err.println(\"error: no preset image for this actor type: \"+type.toString());\n }\n }", "protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture((EntityBat)p_110775_1_);\n }", "void setImage(String image);", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "protected ResourceLocation getEntityTexture(EntitySquid entity)\n {\n return SQUID_TEXTURES;\n }", "public void setTempImage()\n {\n URL url = this.getClass().getResource(lastselection.getImage());\n\t\tImage image = Toolkit.getDefaultToolkit().getImage(url);\n\t\ttempImage = new PImage(image);\n\t\ttempImage.setBounds(0,0,65,170);\n\t\ttempImage.setTransparency(0);\n\t\tlayer.addChild(tempImage);\n\t}", "public void setParticleTextureIndex(int p_70536_1_) {\n/* 232 */ if (getFXLayer() != 0)\n/* */ {\n/* 234 */ throw new RuntimeException(\"Invalid call to Particle.setMiscTex\");\n/* */ }\n/* */ \n/* */ \n/* 238 */ this.particleTextureIndexX = p_70536_1_ % 16;\n/* 239 */ this.particleTextureIndexY = p_70536_1_ / 16;\n/* */ }", "public Texture setPlayerImage(){\n\t\tList<String> playerSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal player images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> playerArray = selection.getChildrenByName(\"player\");\n\t\tfor (int i = 0; i < playerArray.size; i++)\n\t\t\tplayerSelection.add(playerArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the player List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement playe = root.getChildByName(\"artist\");\n\t\tElement artist = playe.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> playerSelectArray = artist.getChildrenByName(\"player\");\n\t\tfor (int i = 0; i < playerSelectArray.size; i++)\n\t\t\tplayerSelection.add(playerSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n//\t\tRandom number generator to choose a random image as the player image\n\t\tint randomPlayer = (int) Math.random() * playerSelection.size();\n\t\tFileHandle playerImage = Gdx.files.internal(playerSelection.get(randomPlayer));\n\t\treturn new Texture(playerImage);\n\t}", "void texImage2D(int target, int level, int resourceId, int border);", "public Texture setBackgroundImage(){\n\t\tList<String> backgroundSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal background images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> backgroundArray = selection.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the balls List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"artist\");\n\t\tElement artist = selection.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> backgroundSelectArray = artist.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundSelectArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tRandom number generator to choose a random image as the ball image\n\t\tint randomBackground = (int) Math.random() * backgroundSelection.size();\n\t\tFileHandle backgroundImage = Gdx.files.internal(backgroundSelection.get(randomBackground));\n\t\treturn new Texture(backgroundImage) ;\n\t}", "@Override\n\tpublic void init() {\n\t\tthis.image = Helper.getImageFromAssets(AssetConstants.IMG_ROAD_NORMAL);\n\t}", "public void setTextureCoordB(E3DVector2F textureCoord){\r\n this.vertices[1].setTextureCoord(textureCoord);\r\n }", "protected ResourceLocation getEntityTexture(EntityBat p_110775_1_)\n {\n return batTextures;\n }", "public void setFlag(Drawable flag){\n ImageView mFlagImageView = findViewById(R.id.guesshint_image_flag);\n mFlagImageView.setImageDrawable(flag);\n }", "public void loadTexture(int imageNum, Texture atex)\r\n\t{\r\n\t\tgl.glEnable(GL_TEXTURE_2D);\r\n\t\tgl.glShadeModel(GL_FLAT);\r\n\t\tgl.glTexImage2D(GL_TEXTURE_2D, imageNum, 3, atex.gTexW, atex.gTexH, 0,\r\n\t\t GL_BGRA_EXT, GL_UNSIGNED_BYTE, atex.pixels);\r\n\t}", "public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }", "protected void setActive(boolean activate) {\n\t\tif (this.active ^ activate) {\r\n\t\t\tthis.active = activate;\r\n\t\t\t\r\n\t\t\tthis.img = AbstractRelicModRelic.getRelicTexture(this.relicId, activate);\r\n\t\t}\r\n\t}", "public void setProfileImg() {\n }", "public void setImage(String tmp) {\n this.image = tmp;\n }", "public void reload() {\n mHandle = new Texture(mBitmap, mMinMode, mMagMode, mWrapS, mWrapT).getHandle();\n }", "public void setEatImage(java.lang.String param) {\n localEatImageTracker = true;\n\n this.localEatImage = param;\n }", "public void setUpTextures(int program, GL2 gl2) {\n\t\t// sets the parameters for texture\n\t\tgl2.glGenTextures(1, buffer);\n\t\tgl2.glActiveTexture(gl2.GL_TEXTURE0);\n\t\tgl2.glBindTexture(gl2.GL_TEXTURE_2D,\n\t\t\t\tgl2.glGetUniformLocation(program, \"abc\"));\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MIN_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MAG_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexImage2D(gl2.GL_TEXTURE_2D, 0, gl2.GL_RGBA,\n\t\t\t\tbufferimage.getWidth(), bufferimage.getHeight(), 0,\n\t\t\t\tgl2.GL_BGRA, gl2.GL_UNSIGNED_BYTE, buffer);\n\t}", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "int GL_ACTIVE_TEXTURE();", "private void loadResource() {\n\t\ttry {\n\t\t\ttarmacTexture = scaleResourceImagePaint(\"/textures/tarmac2.jpg\", 300, 300);\n\t\t\tgrassTexture = scaleResourceImagePaint(\"/textures/grass.jpg\", 300, 300);\n\t\t\tstopwayTexture = scaleResourceImagePaint(\"/textures/stopway.jpg\", 300, 300);\n\t\t} catch (IOException e) {\n\t\t\tsetUsingTextures(false);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Texture getTexture(String resourceName, BufferedImage resourceimage, int target, int dstPixelFormat, int minFilter, int magFilter) throws IOException {\n/* 92 */ ImageIOImageData data = new ImageIOImageData(); int srcPixelFormat = 0;\n/* */ \n/* */ \n/* 95 */ int textureID = InternalTextureLoader.createTextureID();\n/* 96 */ TextureImpl texture = new TextureImpl(resourceName, target, textureID);\n/* */ \n/* */ \n/* 99 */ Renderer.get().glEnable(3553);\n/* */ \n/* */ \n/* 102 */ Renderer.get().glBindTexture(target, textureID);\n/* */ \n/* 104 */ BufferedImage bufferedImage = resourceimage;\n/* 105 */ texture.setWidth(bufferedImage.getWidth());\n/* 106 */ texture.setHeight(bufferedImage.getHeight());\n/* */ \n/* 108 */ if (bufferedImage.getColorModel().hasAlpha()) {\n/* 109 */ srcPixelFormat = 6408;\n/* */ } else {\n/* 111 */ srcPixelFormat = 6407;\n/* */ } \n/* */ \n/* */ \n/* 115 */ ByteBuffer textureBuffer = data.imageToByteBuffer(bufferedImage, false, false, null);\n/* 116 */ texture.setTextureHeight(data.getTexHeight());\n/* 117 */ texture.setTextureWidth(data.getTexWidth());\n/* 118 */ texture.setAlpha((data.getDepth() == 32));\n/* */ \n/* 120 */ if (target == 3553) {\n/* 121 */ Renderer.get().glTexParameteri(target, 10241, minFilter);\n/* 122 */ Renderer.get().glTexParameteri(target, 10240, magFilter);\n/* */ \n/* 124 */ if (Renderer.get().canTextureMirrorClamp()) {\n/* 125 */ Renderer.get().glTexParameteri(3553, 10242, 34627);\n/* 126 */ Renderer.get().glTexParameteri(3553, 10243, 34627);\n/* */ } else {\n/* 128 */ Renderer.get().glTexParameteri(3553, 10242, 10496);\n/* 129 */ Renderer.get().glTexParameteri(3553, 10243, 10496);\n/* */ } \n/* */ } \n/* */ \n/* 133 */ Renderer.get().glTexImage2D(target, \n/* 134 */ 0, \n/* 135 */ dstPixelFormat, \n/* 136 */ texture.getTextureWidth(), \n/* 137 */ texture.getTextureHeight(), \n/* 138 */ 0, \n/* 139 */ srcPixelFormat, \n/* 140 */ 5121, \n/* 141 */ textureBuffer);\n/* */ \n/* 143 */ return (Texture)texture;\n/* */ }", "public Texture set(Texture src) {\n memCopy(src.address(), address(), SIZEOF);\n return this;\n }", "public void setTextureCoordA(E3DVector2F textureCoord){\r\n this.vertices[0].setTextureCoord(textureCoord);\r\n }", "@Override\n public void setNormal()\n {\n setImage(\"Minus.png\");\n }", "public static boolean generateBaseTextures() {\n return getArgumentList().contains(\"generateBaseTextures\");\n }", "public void setImageResource(String resPath) {\n \t\timageResource = resPath;\n \t\tif (resPath.contains(\"_holo\") || resPath.contains(\"_alt\")) {\n \t\t\tsetAlternateArt(true);\n \t\t}\n \t\t// setName(id);\n \t}", "@Override\n public ResourceLocation getTextureLocation(DroneEntity entity) {\n return entity.isAttacking() ? mobShootingTexture : mobTexture;\n }", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }", "public void setColorTexture(String name) {\n this.colorTexture = name;\n }", "protected void applyTextureUniforms () {\n final boolean wasPendantic = ShaderProgram.pedantic;\n ShaderProgram.pedantic = false; // Allow shaders that don't use all the textures.\n for (int i = 0; i < textureUnitUniforms.length; i++)\n getShader().setUniformi(textureUnitUniforms[i], i);\n ShaderProgram.pedantic = wasPendantic;\n }", "public void changeBodyTexture(String aTextureName)\n {\n // If you want, you can target a specific part of the robot\n // and only change the texture of this part by using the getChildByName(\"\")\n \t/* Passing through all the children of the robot\n \t * and applying a new texture on them */\n for(int i = 0;i<androidRobot3DObject.numChildren();i++)\n {\n String name = androidRobot3DObject.getChildAt(i).name();\n Log.d(\"min3d\", \"Texture name: \" + name);\n\n if(name.indexOf(\"body\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(aTextureName);\n }\n }\n }", "public Texture loadTexture(String file, Format format, boolean useMipMap);", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic String getTextureFile() \n\t{\n\t\treturn \"/reactioncraft/rcs/Blocks.png\";\n\t}", "public void setSecondRawTexture(GLTexture secondRawTexture) {\n this.secondRawTexture = secondRawTexture;\n }", "protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }", "public ResourceLocation getEntityTexture(T entity) {\n return MINECART_TEXTURES;\n }", "public void setImg(String mapSelect){\n\t\ttry {\n\t\t if (mapSelect.equals(\"map01.txt\")){\n\t\t\timg = ImageIO.read(new File(\"space.jpg\"));\n\t\t\timg2 = ImageIO.read(new File(\"metal.png\"));\n\n\t\t }\t\n\t\t if (mapSelect.equals(\"map02.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"forest.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"leaf.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"log.png\"));\n\t\t }\n\t\t if (mapSelect.equals(\"map03.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"spinx.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"pyramid.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"sandy.png\"));\n\t\t\t\t\n\t\t }\n\t\t if (mapSelect.equals(\"map04.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"doublebg.png\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"cloud.png\"));\n\t\t\t\t\n\t\t }\n\t\t\t\n\t\t}\n\t\t catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}", "protected ResourceLocation getEntityTexture(EntitySentientSpecter entity)\n {\n return texture;\n }", "private void setParam(int param, int value) {\n bind();\n glTexParameteri(GL_TEXTURE_2D, param, value);\n }", "public void changePhoto() {\r\n\t\tisPictFetche = false;\r\n\t\tlaPhoto = new Photo();\r\n\t\tlaPhotoCandidate = new Photo();\r\n\t}", "public void\nsetObjectTextureCoords(final SbVec4f texCoords)\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Transform the object space coords by the current texture matrix\n // to get the image space texture coords\n imageTexCoords.copyFrom( multVecMatrix4(SoMultiTextureMatrixElement.get(state,0),\n texCoords));\n}", "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 setUnpressedTexture(TextureRegion unpressedTexture){\n this.unpressed = unpressedTexture;\n }", "protected ResourceLocation getEntityTexture(EntityZombie p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }", "public void setTextureCoordC(E3DVector2F textureCoord){\r\n this.vertices[2].setTextureCoord(textureCoord);\r\n }", "public void resetImageToFaceState() {\n String iconPath = Global.IMAGE_PATH;\n switch (game.getFinished()) {\n case 0:\n iconPath += \"face-normal.png\";\n break;\n\n case 1:\n iconPath += \"face-win.png\";\n break;\n\n case 2:\n iconPath += \"face-lose.png\";\n break;\n\n default:\n iconPath += \"face-normal.png\";\n break;\n }\n face.setIcon(new ImageIcon(iconPath));\n }", "public String getTexture(){\n\t\treturn texture;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\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 setLanguageGermanButtonImageAsset(ImageAsset imageAsset) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_languageGermanButton_propertyImageSource\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_languageGermanButton_propertyImageSource\", imageAsset.getFilename());\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(ReplyActionType.SET_IMAGE_ASSET, \"setLanguageGermanButtonImageAsset(\", imageAsset);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }" ]
[ "0.75170505", "0.7155416", "0.7128719", "0.68462664", "0.6756074", "0.63154393", "0.6271764", "0.6204915", "0.61863035", "0.61754304", "0.61648023", "0.6097051", "0.60388714", "0.60340935", "0.6020097", "0.60049796", "0.59926933", "0.5985049", "0.59759545", "0.59398705", "0.5938303", "0.5932841", "0.5931776", "0.592821", "0.5916015", "0.5839472", "0.5828691", "0.58278334", "0.5813698", "0.57018024", "0.5695747", "0.5691201", "0.5682788", "0.5667159", "0.56648546", "0.56612486", "0.5660955", "0.5644108", "0.5641877", "0.564102", "0.5623356", "0.56098336", "0.56022507", "0.55969197", "0.5590822", "0.55839384", "0.5566491", "0.556277", "0.5545648", "0.5545393", "0.55263793", "0.55190456", "0.5517489", "0.55117905", "0.5501293", "0.5497603", "0.54963577", "0.5493671", "0.54856837", "0.5484849", "0.548236", "0.5480133", "0.5471509", "0.54712206", "0.5464979", "0.545942", "0.54558", "0.5455192", "0.543681", "0.54365176", "0.5426989", "0.5417468", "0.54167324", "0.5411181", "0.54020375", "0.54007995", "0.5399163", "0.539886", "0.53985196", "0.53953356", "0.53900534", "0.53897834", "0.5389314", "0.5382", "0.5381952", "0.53802127", "0.5375343", "0.5373523", "0.53692824", "0.5361134", "0.53558743", "0.5348602", "0.5343687", "0.5339183", "0.53358287", "0.5323779", "0.5323779", "0.5319543", "0.53124726", "0.53097516" ]
0.84497225
0
is drop turned on for this component?
public ContentMetadataTransferHandler(ContentMetadataTablePanel panel, boolean dropEnabled) { this.dropEnabled = dropEnabled; contentMetadataTablePanel = panel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDropped();", "public void setDropEnabled(boolean enabled) { this.dropEnabled = enabled; }", "public boolean isDropped(){\r\n\t\treturn getDirectHolder() == World.world;\r\n\t}", "public boolean isDropper() {\n return this.type == Type.DROPPER;\n }", "@java.lang.Override\n public boolean getCausesDrop() {\n return causesDrop_;\n }", "@java.lang.Override\n public boolean getCausesDrop() {\n return causesDrop_;\n }", "static void setNotDraging(){isDraging=false;}", "public boolean canStartDrag()\n\t{\n\t\treturn !isDragging();\n\t}", "public boolean isDragging()\n\t{\n\t\treturn dragged != null;\n\t}", "public void setDropped(boolean dropped);", "public boolean isDroppedOnMap() { return dropped; }", "abstract boolean getIsDragging();", "public boolean onDragStarted();", "public boolean isDragEnabled() {\n return mDragEnabled;\n }", "protected abstract boolean dragged();", "public boolean getIsDraggingPuck() {\n return draggingPuck;\n }", "public boolean getDropStop () {\r\n return dropStop;\r\n }", "public boolean isDragging( ) {\n\t\tif ( draggable ) {\n\t\t\tif ( dragging ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void changeIconDropStatus() { dropped = !dropped; }", "public void dropActionChanged(DropTargetDragEvent dtde){}", "@Override\r\n\t\t\t\t\tpublic void dropAccept(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\tpublic void dragDropped() {\n\n\t}", "public static boolean useDragAndDrop() {\n\t\treturn (isMac() || isWindows() || isLinux() || isSolaris());\n\t}", "public boolean isAllowedAsDragSource()\r\n\t{\r\n\t\treturn tree.getDragMode() == TreeDragMode.NODE;\r\n\t}", "boolean isDrooping();", "@Override\r\n\t\t\tpublic void dropAccept(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "public boolean dragFromSubComponents();", "public boolean canDrop(){\n return this.collectedItems < STORAGE_AMOUNT && System.currentTimeMillis() - lastDrop >= delayInMillis;\n }", "public boolean isSetDrop_priv() {\n return this.__isset.drop_priv;\n }", "@Override\n public void mouseDrop()\n {\n }", "public boolean isDrooping() {\n return false;\n }", "boolean hasBonusItemDrop();", "protected boolean isAcceptableDropLocation(DropTargetDragEvent dtde) {\n OtDragDropObject ddo = OtTreeDragSource._dragObject;\n if (ddo == null) {\n return false;\n }\n\n // MFO from ot-0.5\n // get the node under the mouse\n OtTreeNodeWidget node = getNode(dtde.getLocation());\n if (node == null) {\n return false;\n }\n\n return (getSpInsertData(ddo, node) != null);\n }", "@Override\n\tpublic boolean isDropOk () {\n\t\treturn isAllowed ( selectedAttribute ) ;\n\t}", "@Override\r\n public void dropActionChanged(DropTargetDragEvent dtde) {}", "@java.lang.Override\n public boolean hasDrop() {\n return stepInfoCase_ == 15;\n }", "public boolean isKeepNBTOnDrop() {\n\t\treturn true;\n\t}", "@java.lang.Override\n public boolean hasDrop() {\n return stepInfoCase_ == 15;\n }", "@Override\r\n\t\tpublic void dropActionChanged(DropTargetDragEvent dtde) {\n\t\t\t\r\n\t\t}", "protected boolean modifiersActive(int dropAction) {\n int mods = DragHandler.getModifiers();\n if (mods == DragHandler.UNKNOWN_MODIFIERS) {\n if (dropAction == DragHandler.LINK\n || dropAction == DragHandler.COPY) {\n return true;\n }\n // Can't (yet) distinguish between a forced and a default move\n // without help from DragHandler\n return false;\n }\n return mods != 0;\n }", "public boolean getDrops() {\r\n\t\treturn drops;\r\n\t}", "@Override\r\n\t\t\t\t\tpublic void dragOperationChanged(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n public void dragOver(DropTargetDragEvent dtde) {}", "@Override\r\n\t\tpublic void dragOver(DropTargetDragEvent dtde) {\n\t\t\t\r\n\t\t}", "void onDropped();", "public void dropActionChanged(DragSourceDragEvent evt) {\n }", "@Override\r\n\t\t\tpublic void dragOperationChanged(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "protected boolean isAlwaysExperienceDropper() {\n/* 1849 */ return true;\n/* */ }", "@DISPID(204)\r\n public boolean beginDrag() {\r\n throw new UnsupportedOperationException();\r\n }", "public boolean execute(DropTargetDropEvent evt) {\n\t\t\tdropIt();\n\n\t\t\treturn true;\n\t\t}", "private boolean processXdndDrop(XClientMessageEvent xclient) {\n if (sourceWindow != xclient.get_data(0)) {\n return false;\n }\n\n if (targetXWindow != null) {\n notifyProtocolListener(targetXWindow, sourceX, sourceY, userAction,\n xclient, MouseEvent.MOUSE_RELEASED);\n }\n\n return true;\n }", "public void setIconDropStatus(boolean newStatus) { \n\t\tdropped = newStatus;\n\t}", "public void dropActionChanged(DropTargetDragEvent dtde) {\n // empty\n }", "@DISPID(-2147412077)\n @PropGet\n java.lang.Object ondragstart();", "public boolean isDragScroll() {\r\n return dragScroll;\r\n }", "@SuppressWarnings(\"deprecation\")\n protected boolean isDragPossible(MouseEvent e) {\n JTextComponent c = (JTextComponent)e.getSource();\n if (c.isEnabled()) {\n Caret caret = c.getCaret();\n int dot = caret.getDot();\n int mark = caret.getMark();\n if (dot != mark) {\n Point p = new Point(e.getX(), e.getY());\n int pos = c.viewToModel(p);\n\n int p0 = Math.min(dot, mark);\n int p1 = Math.max(dot, mark);\n if ((pos >= p0) && (pos < p1)) {\n return true;\n }\n }\n }\n return false;\n }", "protected static boolean canAccomodateItemDrop(Block block) {\n return block.isPassable() || Util.isNotFullBlock(block.getType());\n }", "@Override\r\n\t\t\t\t\tpublic void dragOver(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public boolean isShootDown() {\n return shootDown;\n }", "public void dropActionChanged(DropTargetDragEvent dtde) {\n\t\t\n\t}", "@Override\r\n\tprotected boolean canDropLoot() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n\t\t\tpublic void dragOver(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "private boolean isDragFlavorSupported(DropTargetDragEvent e) {\n\t\tboolean ok = false;\n\t\tif (e.isDataFlavorSupported(ElementDrag.DEFAULT_FLAVOR)) {\n\t\t\tok = true;\n\t\t}\n\t\treturn ok;\n\t}", "public boolean isShooting()\r\n\t{\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void handleDroppedCFComponent(CFComponent component) {\n\n\t}", "private void showDropOverlay() {\n dropOverlay.setVisible(true);\n dropOverlayLabel.setVisible(true);\n }", "public void onDrag(int dragSource, int dropTarget) {\n\t}", "public void dragOver(DropTargetDragEvent dtde) {\n // empty\n }", "public void \tdragOver(DropTargetDragEvent dtde){}", "public Builder setCausesDrop(boolean value) {\n\n causesDrop_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "public DropType getDropType() {\n return _dropType;\n }", "public boolean isDropAcceptable(DropTargetDropEvent e) {\n\t\t\tif ((e.getDropAction() & DnDConstants.ACTION_MOVE) == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Only accept this particular flavor\n\t\t\tif (!e.isDataFlavorSupported(CTransferableTreePath.TREEPATH_FLAVOR)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Do this if you want to prohibit dropping onto the drag source...\n\t\t\tPoint pt = e.getLocation();\n\t\t\tTreePath path = getClosestPathForLocation(pt.x, pt.y);\n\t\t\tlogger.info(path.toString() + \" \" + pathSource.toString());\n\t\t\tif (path.equals(pathSource)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Check whether we're dragging an ancestor into a descendent (not\n\t\t\t// allowed for move)\n\t\t\tif (pathSource.isDescendant(path)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * // Do this if you want to select the best flavor on offer...\n\t\t\t * DataFlavor[] flavors = e.getCurrentDataFlavors(); for (int i = 0;\n\t\t\t * i < flavors.length; i++ ) { DataFlavor flavor = flavors[i]; if\n\t\t\t * (flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType))\n\t\t\t * return true; }\n\t\t\t */\n\t\t\treturn true;\n\t\t}", "@Override\n\tpublic boolean touchDragged(int arg0, int arg1, int arg2) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int arg0, int arg1, int arg2) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean canDropInventory(IBlockState state)\n\t{\n\t\treturn false;\n\t}", "public boolean isShootUp() {\n return shootUp;\n }", "public boolean isShotDown(){\n return this.shotDown;\n }", "public boolean damagable() {\n return !this.state.equals(\"knockedBack\")\n && !this.state.equals(\"dodge\");\n }", "public boolean canSlotDrop(int num) {\n\t\treturn true;\n\t}", "public void dragOver(DropTargetDragEvent dtde) {\n\t\t\n\t}", "public boolean isAffectingDropsAndPowerups() {\n \t\treturn level >= Upgrades.SLOW_UPGRADE_NO_AFFECT_DROPS_AND_POWERUPS;\n \t}", "public void setDropType(DropType dropType) {\n _dropType = dropType;\n }", "private void hideDropOverlay() {\n dropOverlay.setVisible(false);\n dropOverlayLabel.setVisible(false);\n }", "void onDragged();", "@Override\r\n public void doDragOver(DropTargetDragEvent dtde) {\r\n if (!isDragSupported(dtde)) {\r\n dtde.rejectDrag();\r\n return;\r\n }\r\n super.doDragOver(dtde);\r\n }", "@Override\n\t\t\tpublic void dragEnter(DropTargetDragEvent e) {\n\t\t\t}", "@Override\r\n\t\tpublic boolean validateDrop(Object target, int operation, TransferData transferType) {\n\t\t\treturn true;\r\n\t\t}", "private static boolean supportsDnD()\r\n { // Static Boolean\r\n if (supportsDnD == null)\r\n {\r\n boolean support = false;\r\n try\r\n {\r\n //Class arbitraryDndClass = Class.forName(\"java.awt.dnd.DnDConstants\");\r\n support = true;\r\n } // end try\r\n catch (Exception e)\r\n {\r\n support = false;\r\n } // end catch\r\n supportsDnD = new Boolean(support);\r\n } // end if: first time through\r\n return supportsDnD.booleanValue();\r\n }", "public boolean acceptDropOnPoint(Point p, DataFlavor flavor) {\n TreePath path = tree.getPathForLocation(p.x, p.y);\n if(path != null) {\n DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)path.getLastPathComponent();\n MBTNode node = (MBTNode) (currentNode).getUserObject();\n boolean acceptDrop = node.acceptDrop(flavor);\n if (acceptDrop){\n tree.setCellRenderer(new MdxBuilderTreeRenderer(node, Color.green));\n }else{\n tree.setCellRenderer(new MdxBuilderTreeRenderer(node, Color.red));\n }\n// S.out(\"accept drop returning \" + acceptDrop);\n return acceptDrop;\n }\n return false;\n }", "@Override\r\n\t\t\t\t\tpublic void dragEnter(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "private boolean isDropped(double value) {\n double tar = rd.nextDouble();\n return value > tar;\n }", "public void onDrag(int dragSource, int dropTarget) {\n\t\t}", "@Override\r\n\t\t\tpublic void dragEnter(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "private void enableDDSupport() {\n dragSource = new TreePanelDragSource(super.tree);\n dragSource.addDNDListener(new DNDListener() {\n \n @Override\n public void dragStart(DNDEvent e) {\n ModelData sel = tree.getSelectionModel().getSelectedItem();\n if (sel != null\n && sel == tree.getStore().getRootItems().get(0)) {\n e.setCancelled(true);\n e.getStatus().setStatus(false);\n return;\n }\n super.dragStart(e);\n ((TreePanelDragSource) e.getSource()).fireEvent(\n LayerEvents.GP_DRAG_START, new TreeStoreEvent<GPBeanTreeModel>(\n tree.getStore()));\n }\n });\n \n GPDNDListener gpDNDListener = new GPDNDListener(this.visitorDisplay);\n dragSource.addListener(LayerEvents.GP_DRAG_START, gpDNDListener);\n dragSource.addListener(LayerEvents.GP_DRAG_LOST, gpDNDListener);\n \n //Listener for launch Drag Lost Events\n Listener listenerDragLost = new Listener() {\n \n @Override\n public void handleEvent(BaseEvent be) {\n ((TreePanelDragSource) be.getSource()).fireEvent(\n LayerEvents.GP_DRAG_LOST, new TreeStoreEvent<GPBeanTreeModel>(\n tree.getStore()));\n //System.out.println(\"DragSource: Ho intercettato il drag cancelled\");\n }\n };\n //Intercepting Drag Lost Events\n dragSource.addListener(Events.DragCancel, listenerDragLost);\n dragSource.addListener(Events.DragEnd, listenerDragLost);\n dragSource.addListener(Events.DragFail, listenerDragLost);\n \n final TreePanelDropTarget dropTarget = new GPTreePanelDropTarget(super.tree);\n dropTarget.setAllowSelfAsSource(true);\n dropTarget.setAllowDropOnLeaf(false);\n dropTarget.setFeedback(Feedback.BOTH);\n \n dropTarget.addListener(LayerEvents.GP_DROP, gpDNDListener);\n \n super.store.addListener(Store.Add, gpDNDListener);\n //Important code to fix problem with D&D scroll support\n this.tree.addListener(Events.Render, new Listener() {\n \n @Override\n public void handleEvent(BaseEvent be) {\n dropTarget.getScrollSupport().setScrollElement(treePanel.getLayoutTarget());\n }\n }); \n }", "public boolean saveNBTToDroppedItem() {\n return true;\n }", "@Override\r\n public void drop(DropTargetDropEvent dtde) {\r\n onDropFile(dtde);\r\n }", "public boolean isDrooping() {\n return (((this.theta % 360) + 360) % 360) > 180\n || tree.isDrooping();\n }", "public boolean canDropFromExplosion(Explosion explosionIn)\n {\n return false;\n }", "@Override\n public boolean shouldDropItemsOnExplosion(Explosion explosion) {\n return super.shouldDropItemsOnExplosion(explosion);\n }", "@Override\n public void onDragEnd() {\n // Do nothing.\n }", "public void onDragEnded();" ]
[ "0.79471594", "0.7855235", "0.74866784", "0.7455501", "0.7448492", "0.74057263", "0.7400805", "0.73429644", "0.72341037", "0.72170305", "0.7144071", "0.7129026", "0.70427877", "0.70329934", "0.69655204", "0.6892083", "0.6878152", "0.6838271", "0.68320537", "0.67982405", "0.67890143", "0.67436165", "0.67298275", "0.6721941", "0.67219114", "0.6717062", "0.6711865", "0.6698445", "0.6691701", "0.666596", "0.6644393", "0.6631979", "0.66072804", "0.66010934", "0.65941685", "0.6574345", "0.6571814", "0.65692514", "0.65634865", "0.6486322", "0.6478152", "0.6444062", "0.64028305", "0.6392419", "0.63874507", "0.6381893", "0.63813317", "0.63508236", "0.63350964", "0.632228", "0.6315893", "0.6193651", "0.61867356", "0.6167726", "0.6153422", "0.61351335", "0.61293936", "0.6121792", "0.6114745", "0.6112459", "0.61051285", "0.6097971", "0.6092302", "0.60539085", "0.60489917", "0.6047779", "0.6044282", "0.60358053", "0.6034139", "0.60260653", "0.6023981", "0.6014772", "0.6000428", "0.6000428", "0.59779125", "0.5942535", "0.59328586", "0.59280384", "0.5925181", "0.59160835", "0.591438", "0.5906639", "0.59057635", "0.58805954", "0.58783203", "0.5865308", "0.5864095", "0.5860481", "0.58575034", "0.5851452", "0.58369607", "0.5822669", "0.581439", "0.5804614", "0.5803672", "0.58017284", "0.5797008", "0.5796504", "0.57960606", "0.5792937", "0.57924867" ]
0.0
-1
keep the indices (needed for cleanup)
protected Transferable createTransferable(JComponent component) { rows = contentMetadataTablePanel.getTable().getSelectedRows(); // return a new transferable return new MediaItemsTransferable(contentMetadataTablePanel.getContentIds()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void indexReset();", "public abstract void deselectAllIndexes();", "public void clear()\n\t\t{\n\t\t\tindices.clear();\n\t\t}", "private void reIndex()\n {\n for(int i = 0; i < NodeList.size(); i++)\n NodeList.get(i).setID(i);\n ID = NodeList.size();\n }", "void clearAllIndexes();", "public void onIndexReset();", "public void reset() {\n index = 0;\n }", "public void clear() {\n index.clear();\n }", "public int[] getIndexCopy(){\r\n \tint[] indcopy = new int[this.nrow];\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tindcopy[i]=this.index[i];\r\n \t}\r\n \treturn indcopy;\r\n \t}", "@Override\n protected boolean preserveIndicesUponCompletion() {\n return true;\n }", "void createIndex(){\n int index=0;\n for(int i=0;i<ancogs.size();i++)\n if(!cogToIndex.containsKey(ancogs.get(i).getValue2()))\n cogToIndex.put(ancogs.get(i).getValue2(), index++);\n}", "private void resetCurrentMemoryIndex() throws Exception {\n // by using the globalParameters, the memory index can startup counters etc.\n // we set the documentCount to ensure all documents are given a unique number.\n tupleFlowParameters.getJSON().set(\"documentNumberOffset\", this.globalDocumentCount);\n currentMemoryIndex = new MemoryIndex(tupleFlowParameters);\n }", "public void Reset() \r\n {\r\n _index = -1;\r\n }", "Index getIndices(int index);", "void stopIndexing();", "public void updateIndex() {\n int i = this.index;\n if (i == -1 || i > HashBiMap.this.size || !Objects.equal(HashBiMap.this.keys[this.index], this.key)) {\n this.index = HashBiMap.this.findEntryByKey(this.key);\n }\n }", "private void setIndices() {\r\n\r\n\t\t// Index where dry sample is written\r\n\t writeIndex = 0;\r\n\t\treadIndexBLow = 0;\r\n\t\treadIndexBHigh = 0;\r\n\r\n\t\tif (sweepUp) {\r\n\t\t\t// Sweeping upward, start at max delay\r\n\t\t readIndexALow = AudioConstants.SAMPLEBUFFERSIZE;\r\n\t\t\r\n\t\t}\telse\t{\r\n\t\t\r\n\t\t\t// Sweeping downward, start at min delay\r\n\t\t\tif (numberOfChannels == 1)\r\n\t\t\t\treadIndexALow = delayBufferSize - 2;\r\n\t\t\telse\r\n\t\t\t\treadIndexALow = delayBufferSize - 4;\r\n\t\t}\r\n\t\t// Initialize other read ptr\r\n\t\tif (numberOfChannels == 1)\r\n\t\t\treadIndexAHigh = readIndexALow + 1;\r\n\t\telse\r\n\t\t\treadIndexAHigh = readIndexALow + 2;\r\n\t}", "private void resetToBase(){\n\t\t//find number of markers after base\n\t\tSystem.out.println(\"here is the base: \" + base);\n\t\tint numMarkers = 0;\n\n\t\tfor(int i=base+1; i<indices.length; i++){\n\t\t\tif(indices[i]==1){\n\t\t\t\tindices[i] = 0;\n\t\t\t\tnumMarkers++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=base; i<base+numMarkers; i++){\n\t\t\tindices[i+1] = 1;\n\t\t}\n\t}", "public abstract void reset(int index);", "public void clear(){\n\t\tcontenido = getName() + ':';\n\t\tindices.clear();\n\t\tindices.add(0);\n\t}", "private int getRealIndex()\r\n\t{\r\n\t\treturn index - 1;\r\n\t}", "@Override\n public Map<Chunk.Id<?>, Storage.Index> getIndices(final Address start, final Address end) throws IOException, InterruptedException {\n Map<Chunk.Id<?>, Storage.Index> indices = this.cache.getIndices(start, end);\n // System.out.println(\"hit \" + this.hit + \" miss \" + this.miss);\n if (indices != null) {\n // this.hit++;\n return indices;\n } else {\n // this.miss++;\n indices = this.base.getIndices(start, end);\n this.cache.add(start, end, new HashMap<>(indices)); // 防御的複製。\n return indices;\n }\n }", "public void reset() {\n this.index = this.startIndex;\n }", "public void clear(long index);", "@Override\n public Index getIndices(int index) {\n return indices_.get(index);\n }", "public int[] getIndices() {\r\n\t\treturn indices;\r\n\t}", "public void cleanup() {\n this.index = new TreeMap<String, PostingsList>();\n this.count = 0;\n }", "@Override\n public int getIndicesCount() {\n return indices_.size();\n }", "public InvertedIndex() {\n\t\tthis.invertedIndex = new TreeMap<>();\n\t\tthis.counts = new TreeMap<>();\n\t}", "private static IntBuffer processIndices(AIMesh aiMesh) {\n\t\tint numFaces = aiMesh.mNumFaces();\r\n\t\tAIFace.Buffer aiFaces = aiMesh.mFaces();\r\n\t\t\r\n\t\t// TODO Investigate whether mNumIndices works on the buffer itself, or if each AIFace has its own value.\r\n\t\tvar indexBuffer = MemoryUtil.memAllocInt(numFaces * aiFaces.mNumIndices());\r\n\r\n\t\tfor (int i = 0; i < numFaces; i++) {\r\n\t\t\tAIFace aiFace = aiFaces.get(i);\r\n\t\t\tIntBuffer buffer = aiFace.mIndices();\r\n\t\t\tindexBuffer.put(buffer);\r\n\t\t}\r\n\t\tindexBuffer.flip();\r\n\r\n\t\treturn indexBuffer;\r\n\t}", "public int[] reset() {\n return store;\n }", "private int newIndex() {\n //return indexes.remove(0);\n return random.nextInt(81);\n }", "void index() {\n for (Binding<?> binding : bindings.values()) {\n index(binding);\n }\n }", "private void buildIndex(Collection<Edge> edges) {\n\t\tfor (Edge e : edges) {\r\n\t\t\tList<Integer> ids = getCells(e);\r\n\t\t\tfor (int j = 0; j < ids.size(); j++) {\r\n\t\t\t\tList<Edge> list = dict.get(ids.get(j));\r\n\t\t\t\tif (list == null) {\r\n\t\t\t\t\tlist = new ArrayList<Edge>();\r\n\t\t\t\t\tdict.put(ids.get(j), list);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(e);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void reset() {\n\t\tterminateAll($$eqHashIndex_0.iterator());\n\t}", "public void reset() {\n this.setIndex(0);\n }", "public void resetCoordinates(){\n pos=0;\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE;}\n else{\n this.coordinates[0]=0;}\n if(this.pIndex%3==0){\n this.coordinates[1]=0;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE;} \n }", "public void unsetStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STARTINDEX$10);\n }\n }", "public ByteBuffer getIndicesBuffer() {\n \treturn indicesBuf;\n }", "public abstract void updateIndex();", "private static void changeHomeworkIndices(ArrayList<Integer> index_order) {\n ArrayList<ArrayList<Homework>> clone = new ArrayList<>(homework.size());\n\n for(int i = 0; i < homework.size(); i++) {\n int newid = index_order.indexOf(i);\n clone.add(newid, homework.get(i));\n for(Homework h: clone.get(newid)) {\n h.setIndex(newid);\n }\n }\n\n homework = (ArrayList<ArrayList<Homework>>) clone.clone();\n }", "private void listAllIndices(Client client){\n\t\t\ttry {\n\t\t\t\t String[] indexList = client.admin().cluster().prepareState().execute().actionGet().getState().getMetaData().concreteAllIndices();\n\t\t\t\t System.out.println(\"Index List Size size : \" + indexList.length);\n\t\t\t\t for (String index : indexList) {\n\t\t\t\t\t System.out.println(\"Index Name \" + index);\n\t\t\t\t\t deleteIndex(client,index);\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t }", "public int[] getIndexReference(){\r\n \treturn this.index;\r\n \t}", "@Override\n public java.util.List<Index> getIndicesList() {\n return indices_;\n }", "@Override\n\tpublic void restoreState() {\n // Rather than copying the stored stuff back, just swap the pointers...\n int[] tmp1 = currentMatricesIndices;\n currentMatricesIndices = storedMatricesIndices;\n storedMatricesIndices = tmp1;\n\n int[] tmp2 = currentPartialsIndices;\n currentPartialsIndices = storedPartialsIndices;\n storedPartialsIndices = tmp2;\n\n\n }", "public void setIndexedVariable() {\n indexed = true;\n }", "private void changeUnusedIndices(int treeIndex, boolean removeFromUnused) {\n if (removeFromUnused) {\n this.unusedTreeIndices.remove(treeIndex);\n } else {\n if (treeIndex < this.treeSize) {\n this.unusedTreeIndices.add(treeIndex);\n }\n }\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getRecreateIndexes();", "private void setIndexArray() throws IOException {\n\n byte[] recBuf = new byte[INDEX_RECORD_LENGTH];\n long rafPos = ShapeConst.SHAPE_FILE_HEADER_LENGTH;\n int iaIndex = 0;\n ArrayList indexArrayVector = new ArrayList(10000);\n\n raf.seek(rafPos);\n // loop over index records, until EOF\n while (raf.read(recBuf, 0, INDEX_RECORD_LENGTH) != -1) {\n IndexRecord ir = new IndexRecord(recBuf);\n\n // set ArrayVector item as index record\n indexArrayVector.add(ir);\n\n // array index adjustment\n ++iaIndex;\n\n // filepos adjustment\n rafPos = rafPos + INDEX_RECORD_LENGTH;\n raf.seek(rafPos);\n } // end of while\n\n // iaIndex holds Record Number\n RecordNum = iaIndex;\n\n // copy vector into indexArray\n indexArray = (IndexRecord[]) indexArrayVector.toArray(new IndexRecord[RecordNum]);\n }", "private void setIndexData() {\n // allocate connectivity\n final int tris = 4 * ((zSamples - 2) * (radialSamples) + 2);\n setTriangleIndicesSize (tris);\n\n // generate connectivity\n int index = 0;\n for ( int iZ = 0, iZStart = 0; iZ < (zSamples - 3); iZ++ ) {\n int i0 = iZStart;\n int i1 = i0 + 1;\n iZStart += (radialSamples + 1);\n int i2 = iZStart;\n int i3 = i2 + 1;\n for ( int i = 0; i < radialSamples; i++, index += 6 ) {\n if ( !viewInside ) {\n putTriangleIndex (i0++, i1, i2);\n putTriangleIndex (i1++, i3++, i2++);\n } else // inside view\n {\n putTriangleIndex (i0++, i2, i1);\n putTriangleIndex (i1++, i2++, i3++);\n }\n }\n }\n\n /*\n * // south pole triangles for ( int i = 0; i < radialSamples; i++,\n * index += 3 ) { if ( !viewInside ) { putTriangleIndex (i,\n * getVertexCount () - 2, i + 1); } else // inside view {\n * putTriangleIndex (i, i + 1, getVertexCount () - 2); } }\n *\n * // north pole triangles final int iOffset = (zSamples - 3) *\n * (radialSamples + 1); // (zSamples - 3) * (radialSamples + 1); // +1\n * for ( int i = 0; i < radialSamples; i++, index += 3 ) { if (\n * !viewInside ) { putTriangleIndex (i + iOffset, i + 1 + iOffset,\n * getVertexCount () - 1); } else // inside view { putTriangleIndex (i +\n * iOffset, getVertexCount () - 1, i + 1 + iOffset); } }\n */\n }", "private void removeSeenInfo(int index) {\n ensureSeenInfoIsMutable();\n seenInfo_.remove(index);\n }", "private void readIndex() throws IOException {\n\t\t\tif (this.keys != null)\n\t\t\t\treturn;\n\t\t\tkeys = new HashMap<K, Long>(1024);\n\t\t\ttry {\n\t\t\t\twhile (index.hasNext()) {\n\t\t\t\t\tPair<K, Long> pair;// = new Pair<K, Long>(index.getSchema());\n\t\t\t\t\tpair = index.next();\n\t\t\t\t\tkeys.put(pair.key(), pair.value());\n\t\t\t\t\tif (firstKey == null)\n\t\t\t\t\t\tfirstKey = pair.key();\n\t\t\t\t\tfinalKey = pair.key();\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\n\t\t\t}finally {\n\t\t\t\tindexClosed = true;\n\t\t\t\tindex.close();\n\t\t\t}\n\t\t}", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "void setIdx(int i);", "@Override\r\n\tpublic void removeToIndex(int index) {\n\t}", "public void removeIndex(int i) {\n // YOUR CODE HERE\n }", "@Deprecated\n\tpublic int pushIndex() {\n\t\tint i = (positions.size()-2)/2;\n\t\tindices.add(i);\n\t\treturn i;\n\t}", "public int[] reset() {\n\t\treturn memos;\n\t}", "public Builder clearIndex() {\n \n index_ = 0;\n onChanged();\n return this;\n }", "public int getIndex()\n/* */ {\n/* 46 */ return this.index;\n/* */ }", "public void finishedDirectIndexBuild()\n\t{\n\t\tif(logger.isInfoEnabled()){\n\t\t\tlogger.info(\"flushing utf block lexicon to disk after the direct index completed\");\n\t\t}\n\t\t//only write a temporary lexicon if there are any items in it\n\t\tif (TempLex.getNumberOfNodes() > 0)\n\t\t\twriteTemporaryLexicon();\n\n\t\t//merges the temporary lexicons\n\t\tif (tempLexFiles.size() > 0)\n\t\t{\n\t\t\ttry{\n\t\t\t\tmerge(tempLexFiles);\n\t\n\t\t\t\t//creates the offsets file\n\t\t\t\tfinal String lexiconFilename = \n\t\t\t\t\tindexPath + ApplicationSetup.FILE_SEPARATOR + \n\t\t\t\t\tindexPrefix + ApplicationSetup.LEXICONSUFFIX;\n\t\t\t\tLexiconInputStream lis = getLexInputStream(lexiconFilename);\n\t\t\t\tcreateLexiconIndex(\n\t\t\t\t\tlis,\n\t\t\t\t\tlis.numberOfEntries(),\n\t\t\t\t\t/* after inverted index is built, the lexicon will be transformed into a\n\t\t\t\t\t * normal lexicon, without block frequency */\n\t\t\t\t\tUTFLexicon.lexiconEntryLength\n\t\t\t\t\t); \n\t\t\t\tTermCount = lis.numberOfEntries();\n\t\t\t\tif (index != null)\n\t\t\t\t{\n\t\t\t\t\tindex.addIndexStructure(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexicon\");\n\t\t\t\t\tindex.addIndexStructureInputStream(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexiconInputStream\");\n\t\t\t\t\tindex.setIndexProperty(\"num.Terms\", \"\"+lis.numberOfEntries());\n\t\t\t\t\tindex.setIndexProperty(\"num.Pointers\", \"\"+lis.getNumberOfPointersRead());\n\t\t\t\t}\n\t\t\t} catch(IOException ioe){\n\t\t\t\tlogger.error(\"Indexing failed to write a lexicon index file to disk\", ioe);\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t\tlogger.warn(\"No temporary lexicons to merge, skipping\");\n\t\t\n\t}", "private void remove(int index){\r\n \tkeys[index] = null;\r\n \tvals[index] = null;\r\n deleteCheck(index);\r\n }", "protected final int getIndex() {\n return index;\n }", "public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }", "public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }", "private Reindex() {}", "private Reindex() {}", "@Override\n public void clear() {\n elements.clear();\n indexByElement.clear();\n }", "int getIndicesCount();", "public Builder clearIndex() {\n \n index_ = 0;\n onChanged();\n return this;\n }", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "private void reLoadIndexesFromFileToIndexMap(File file) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n for (String line = reader.readLine(); line != null; line = reader\n .readLine()) {\n String[] termIndex = line.split(\" \");\n String key = termIndex[0];\n LinkedList<TermPositions> value = new LinkedList<>();\n String postingList = termIndex[1];\n // split the posting lists 1:1,2,4;2:4\n String[] subPostings = postingList.split(\";\");\n for (String posting : subPostings) {\n String[] docPosting = posting.split(\":\");\n int docId = Integer.parseInt(docPosting[0]);\n String[] positions = docPosting[1].split(\",\");\n LinkedList<Integer> positionsList = new LinkedList<>();\n for (String position : positions) {\n positionsList.add(Integer.parseInt(position));\n }\n TermPositions termPositions = new TermPositions(docId, positionsList);\n value.add(termPositions);\n }\n indexMap.put(key, value);\n\n }\n\n }", "void remove(int idx);", "public final void Reset()\n\t{\n\t\t_curindex = -1;\n\t}", "public abstract long getIndex();", "protected HashMap<String, BPTree<Double, FoodItem>> getIndexes(){\n \treturn this.indexes;\n }", "public Builder clearChunkIndex() {\n\n chunkIndex_ = 0;\n onChanged();\n return this;\n }", "public Builder clearChunkIndex() {\n\n chunkIndex_ = 0;\n onChanged();\n return this;\n }", "private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }", "public void clear(){\r\n\t\tbeginMarker.next = endMarker;\r\n\t\tendMarker.prev = beginMarker;\r\n\t\tnumAdded=0;\r\n\t\tsize=0;\r\n \tmodCount++;\r\n\t}", "private void resetIdsToFind()\r\n\t{\r\n\t\t/*\r\n\t\t * Reset all lists of given search items to empty lists, indicating full\r\n\t\t * search without filtering, if no search items are added.\r\n\t\t */\r\n\t\tsetSpectrumIdsTarget(new ArrayList<String>());\r\n\t}", "void initiateRemoveIndexes(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "public abstract int getNumIndexes();", "private static void changeGradeIndices(ArrayList<Integer> index_order) {\n ArrayList<ArrayList<Grade>> clone = new ArrayList<>(grades.size());\n\n for(int i = 0; i < grades.size(); i++) {\n int newid = index_order.indexOf(i);\n clone.add(newid, grades.get(i));\n for(Grade g: clone.get(newid)) {\n g.setIndex(newid);\n }\n }\n\n grades = (ArrayList<ArrayList<Grade>>) clone.clone();\n }", "private void setUpRouteIDsAndIndexes() {\n\n\n for (int i = 0; i < routeIDsOfBillboards.size(); i++) {\n\n List<Integer> routeIDs = routeIDsOfBillboards.get(i);\n\n for (int j = 0; j < routeIDs.size(); j++) {\n\n int routeID = routeIDs.get(j);\n routeIDSet.add(routeID);\n }\n }\n\n buildHash();\n\n for (int i = 0; i < routeIDsOfBillboards.size(); i++) {\n\n List<Integer> routeIndexes = new ArrayList<>();\n List<Integer> routeIDs = routeIDsOfBillboards.get(i);\n for (int j = 0; j < routeIDs.size(); j++) {\n\n int routeID = routeIDs.get(j);\n int routeIndex = (int) routeIDMap.get(routeID);\n routeIndexes.add(routeIndex);\n }\n routeIndexesOfBillboards.add(routeIndexes);\n }\n }", "private int[] reset() {\n return data;\n }", "private void setComponentsOfIndex() {\n\t\tint t = this.numbersIdex + 1;\n\t\tif (t == NUMBEROFEACHCARD) {\n\t\t\tthis.numbersIdex = 0;\n\t\t\tsetColorIndex();\n\t\t} else {\n\t\t\tthis.numbersIdex = t;\n\t\t}\n\t}", "@Override\n public int hashCode() {\n return Arrays.hashCode(path) ^ Arrays.hashCode(indices);\n }", "public Index invert() {\n \t\tint n=length();\n \t\tIndex ni=new Index(n);\n \t\tfor (int i=0; i<n; i++) {\n \t\t\tni.set(this.get(i), i);\n \t\t}\n \t\treturn ni;\n \t}", "private void flushCurrentIndexBlock() throws IOException {\n if (currentMemoryIndex.documentsInIndex() < 1) {\n return;\n }\n\n logger.info(\"Flushing current memory Index. id = \" + indexBlockCount);\n\n final MemoryIndex flushingMemoryIndex = currentMemoryIndex;\n final File shardFolder = getNextIndexShardFolder(1);\n\n try {\n // reset the current index\n // - this makes the flush operation thread safe while continuing to add new documents.\n resetCurrentMemoryIndex();\n } catch (Exception ex) {\n throw new IOException(ex);\n }\n\n try {\n // first flush the index to disk\n FlushToDisk.flushMemoryIndex(flushingMemoryIndex, shardFolder.getAbsolutePath(), false);\n\n // indicate that the flushing part of this thread is done\n synchronized (geometricParts) {\n // add flushed index to the set of bins -- needs to be a synconeous action\n geometricParts.add(0, shardFolder.getAbsolutePath());\n updateIndex();\n flushingMemoryIndex.close();\n }\n\n } catch (IOException e) {\n logger.severe(e.toString());\n }\n }", "public synchronized void resetCurrentIndex()\n {\n // Reset the current index to start from 1 (speechgen0001.mp3)\n currentIndex = 1;\n }", "public static void reset_access_counter() { tuple_counter = 0; }", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "public AutoIndexMap()\n\t\t{\n\t\t\t// Initialise instance variables\n\t\t\tindices = new IdentityHashMap<>();\n\t\t}", "private void computeStoreIndices(CCTerm index, CCTerm array1,\n\t\t\tCCTerm array2, Set<CCTerm> storeIndices) {\n\t\tfinal ArrayNode node1 = mCongRoots.get(array1.getRepresentative());\n\t\tfinal ArrayNode node2 = mCongRoots.get(array2.getRepresentative());\n\t\tfinal Cursor cursor1 = new Cursor(array1, node1); \n\t\tfinal Cursor cursor2 = new Cursor(array2, node2); \n\t\tassert index == index.getRepresentative();\n\t\tcursor1.collect(index, cursor2, storeIndices);\n\t}", "private void createInvertedIndex() {\n\t\tArrayList<Index> invertedIndex=new ArrayList<>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\part-r-00001\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\"\\t\");\n\t\t\t\tparts[1]=parts[1].replace(\"{\", \"\").replace(\"}\", \"\");\n\t\t\t\tString counts[]=parts[1].split(\",\");\n\t\t\t\tHashMap<String,Integer> fileList=new HashMap<String,Integer>();\n\t\t\t\tfor (String count : counts) {\n\t\t\t\t\tString file[]=count.split(\"=\");\n\t\t\t\t\tfileList.put(file[0].trim().replace(\".txt\", \"\"), Integer.parseInt(file[1].trim()));\n\t\t\t\t}\n\t\t\t\tIndex index=new Index();\n\t\t\t\tindex.setWord(parts[0]);\n\t\t\t\tindex.setFileList(fileList);\n\t\t\t\tinvertedIndex.add(index);\n\t\t\t}\n\t\t\tin.close();\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertIndex(invertedIndex);\n\t}", "public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }", "static SparseArray<TaskDetail> getCurrentMappingsDuplicated() {\n SparseArray<TaskDetail> toReturn = new SparseArray<>();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n toReturn.put(TaskDetail.actionToTask.keyAt(i), detail.duplicate());\n }\n return toReturn;\n }", "private TileSet rebuildList(Map<Integer, List<Tile>> index) {\n\t\tTileSet tileset = new TileSet();\n\t\tfor (List<Tile> list : index.values()) {\n\t\t\tfor (Tile tile : list) {\n\t\t\t\tboolean isUnique = true;\n\t\t\t\tfor (Tile uTile : tileset) {\n\t\t\t\t\tif (tile == uTile) {\n\t\t\t\t\t\tisUnique = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isUnique) {\n\t\t\t\t\ttileset.add(tile);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tileset;\n\t}" ]
[ "0.7089279", "0.69297296", "0.6636842", "0.66291636", "0.66021764", "0.63395095", "0.6334954", "0.6309191", "0.6211532", "0.6200909", "0.61678225", "0.6153325", "0.6132033", "0.61115134", "0.5988047", "0.5987674", "0.59608126", "0.59592384", "0.5931642", "0.58985513", "0.5875865", "0.5873297", "0.5862504", "0.58588487", "0.5858354", "0.58334124", "0.58069426", "0.5788105", "0.5770123", "0.5767809", "0.57577866", "0.5757574", "0.57231426", "0.572052", "0.5715933", "0.57158256", "0.5701806", "0.5696228", "0.56903195", "0.5665589", "0.56636745", "0.5659005", "0.56463975", "0.5644609", "0.5637693", "0.5632295", "0.5631777", "0.56145656", "0.56026846", "0.55964845", "0.55764586", "0.55734485", "0.5566089", "0.5566089", "0.5566089", "0.5557657", "0.55543417", "0.55489004", "0.55449575", "0.55271244", "0.5521747", "0.5514907", "0.5500749", "0.5493218", "0.54862475", "0.548354", "0.54753524", "0.5473194", "0.5473194", "0.5458818", "0.54496133", "0.54436314", "0.5443572", "0.5430823", "0.54269797", "0.5426761", "0.54240066", "0.5403345", "0.5394556", "0.5394556", "0.53904855", "0.53851634", "0.5382491", "0.5378039", "0.5368606", "0.53679305", "0.5364512", "0.5360077", "0.5354425", "0.5352834", "0.5343922", "0.53426534", "0.53395516", "0.5338075", "0.53318477", "0.5326945", "0.532189", "0.5318425", "0.53165525", "0.53149444", "0.53126466" ]
0.0
-1
XXX:0:20050112iain: assume that if drop is not enabled, table is immutable
public int getSourceActions(JComponent c) { return dropEnabled ? COPY_OR_MOVE : COPY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}", "public void doDropTable();", "public void dropTable() {\n }", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"alter table\");\n assertTrue(boolean0);\n }", "public void dropTable();", "abstract void dropTable() throws SQLException;", "boolean dropTable();", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"executealter table\");\n assertFalse(boolean0);\n }", "@Test(enabled = false)\n public void testAlterTableDropColumn() throws Exception {\n String tableName = createTable();\n String colDropped = \"id\";\n String query = \"alter table \" + tableName + \" replace columns (name string)\";\n\n runCommand(query);\n\n assertColumnIsNotRegistered(HiveMetaStoreBridge.getColumnQualifiedName(HiveMetaStoreBridge.getTableQualifiedName(CLUSTER_NAME, DEFAULT_DB, tableName), colDropped));\n\n //Verify the number of columns present in the table\n List<AtlasEntity> columns = getColumns(DEFAULT_DB, tableName);\n\n assertEquals(columns.size(), 1);\n assertEquals(columns.get(0).getAttribute(NAME), \"name\");\n\n String tblId = assertTableIsRegistered(DEFAULT_DB, tableName);\n AtlasEntity tblEntity = atlasClientV2.getEntityByGuid(tblId).getEntity();\n List ddlQueries = (List) tblEntity.getRelationshipAttribute(ATTRIBUTE_DDL_QUERIES);\n\n Assert.assertNotNull(ddlQueries);\n Assert.assertEquals(ddlQueries.size(), 2);\n }", "void load(String table_name, boolean read_only) throws IOException;", "public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "@Override\n public SqlDatabaseTable ensureUnique(SqlDatabaseTable table) {\n return table;\n }", "@Test\n public void testDropTable() throws Exception {\n String tableName = createTable(true, true, false);\n\n assertTableIsRegistered(DEFAULT_DB, tableName);\n assertColumnIsRegistered(HiveMetaStoreBridge.getColumnQualifiedName(HiveMetaStoreBridge.getTableQualifiedName(CLUSTER_NAME, DEFAULT_DB, tableName), \"id\"));\n assertColumnIsRegistered(HiveMetaStoreBridge.getColumnQualifiedName(HiveMetaStoreBridge.getTableQualifiedName(CLUSTER_NAME, DEFAULT_DB, tableName), NAME));\n\n String query = String.format(\"drop table %s \", tableName);\n\n runCommandWithDelay(query, 3000);\n\n assertColumnIsNotRegistered(HiveMetaStoreBridge.getColumnQualifiedName(HiveMetaStoreBridge.getTableQualifiedName(CLUSTER_NAME, DEFAULT_DB, tableName), \"id\"));\n assertColumnIsNotRegistered(HiveMetaStoreBridge.getColumnQualifiedName(HiveMetaStoreBridge.getTableQualifiedName(CLUSTER_NAME, DEFAULT_DB, tableName), NAME));\n assertTableIsNotRegistered(DEFAULT_DB, tableName);\n }", "public int dropTable() \n throws InterruptedException, IOException \n {\n return dropTable(false);\n }", "private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void dropTable(DropTableQuery query);", "public interface DropableDao {\n static final String CANNOT_DROP_TABLE = \"Cannot Drop Table\";\n\n /**\n * Check if table exist in database\n *\n * @return true if table exist , otherwise false.\n * @throws SQLException if failed to execute statement.\n */\n abstract boolean tableExist() throws SQLException;\n\n /**\n * Create table in database .\n *\n * @throws SQLException if failed to execute statement.\n */\n abstract void dropTable() throws SQLException;\n}", "@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }", "public void doCreateTable();", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"delete\");\n assertTrue(boolean0);\n assertNotNull(boolean0);\n }", "LogicalTableModify.Operation getTableModOp();", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"drop materialized view\");\n assertTrue(boolean0);\n }", "public void DataRow_RejectChanges() throws Exception {\n DataTable table = new DataTable(\"table\");\r\n DataColumn idColumn = new DataColumn(\"id\", TClrType.getType(\"System.Int32\"));\r\n idColumn.setAutoIncrement(true);\r\n DataColumn itemColumn = new DataColumn(\"item\", TClrType.getType(\"System.String\"));\r\n table.getColumns().Add(idColumn);\r\n table.getColumns().Add(itemColumn);\r\n\r\n // Add ten rows.\r\n DataRow newRow;\r\n\r\n for (int i = 0; i < 10; i++) {\r\n newRow = table.NewRow();\r\n newRow.setItem(1, \"Item \" + i);\r\n table.getRows().Add(newRow);\r\n }\r\n table.AcceptChanges();\r\n\r\n DataRowCollection itemColumns = table.getRows();\r\n itemColumns.getItem(0).Delete();\r\n itemColumns.getItem(2).Delete();\r\n itemColumns.getItem(3).Delete();\r\n itemColumns.getItem(5).Delete();\r\n System.out.println(itemColumns.getItem(3).getRowState());\r\n\r\n // Reject changes on one deletion.\r\n itemColumns.getItem(3).RejectChanges();\r\n\r\n // Change the value of the column so it stands out.\r\n itemColumns.getItem(3).setItem(1, \"Deleted, Undeleted, Edited\");\r\n\r\n // Accept changes on others.\r\n table.AcceptChanges();\r\n\r\n System.out.println(idColumn.getAutoIncrement());\r\n System.out.println(itemColumns.getItem(3).getItem(1));\r\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"alter tabledeleteset{sciistream(int, inputstre8m, long)\");\n assertTrue(boolean0);\n assertNotNull(boolean0);\n }", "public static void preDropTable(DDLMessage.DDLChange change, DataDictionary dd, DependencyManager dm) throws StandardException{\n if (LOG.isDebugEnabled())\n SpliceLogUtils.debug(LOG,\"preDropTable with change=%s\",change);\n try {\n TxnView txn = DDLUtils.getLazyTransaction(change.getTxnId());\n SpliceTransactionResourceImpl transactionResource = new SpliceTransactionResourceImpl();\n boolean prepared = false;\n try{\n prepared=transactionResource.marshallTransaction(txn);\n TableDescriptor td=dd.getTableDescriptor(ProtoUtil.getDerbyUUID(change.getDropTable().getTableId()));\n if(td==null) // Table Descriptor transaction never committed\n return;\n dm.invalidateFor(td,DependencyManager.DROP_TABLE,transactionResource.getLcc());\n }finally{\n if(prepared)\n transactionResource.close();\n }\n } catch (Exception e) {\n throw StandardException.plainWrapException(e);\n }\n }", "@org.junit.jupiter.api.Test\n void dropColision2() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"11\");\n String esperado =\"bucket[0] = [0, David]\\n\" + \" -> [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }", "@After\n @Override\n public void tearDown() throws Exception {\n execute(\"alter table t1 set (\\\"blocks.read_only\\\" = false)\");\n execute(\"alter table t1 set (\\\"blocks.metadata\\\" = false)\");\n super.tearDown();\n }", "@Test\n public void readOnlyUnrepairedTest() throws Throwable\n {\n createTable(\"create table %s (id int, id2 int, t text, t2 text, primary key (id, id2)) with gc_grace_seconds=0 and compaction = {'class':'SizeTieredCompactionStrategy', 'only_purge_repaired_tombstones':true}\");\n for (int i = 10; i < 20; i++)\n {\n execute(\"update %s set t2=null where id=? and id2=?\", 123, i);\n }\n flush();\n\n // allow gcgrace to properly expire:\n Thread.sleep(1000);\n verifyIncludingPurgeable();\n verify2IncludingPurgeable(123);\n }", "@org.junit.jupiter.api.Test\n void dropColision3() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"22\");\n String esperado =\"bucket[0] = [0, David]\\n\" + \" -> [11, ferrero]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }", "@Override\n public void dropTable(String table_name) {\n\n // silently return if connection is closed\n if (!is_open) {\n return;\n }\n\n // try to delete the table\n try {\n String drop_table = \"DROP TABLE \" + table_name;\n statement.execute(drop_table);\n connection.commit();\n } catch (SQLException e) {\n System.out.println(\"Could not delete table \" + table_name);\n e.printStackTrace();\n }\n\n //System.out.println(\"Deleted table \" + table_name);\n\n }", "public boolean hasAlterTable() {\n \t\treturn true;\n \t}", "public DropAwareJXTable() {\n acceptableActions = DnDConstants.ACTION_COPY_OR_MOVE;\n dt = new DropTarget(this, acceptableActions, this);\n }", "@org.junit.jupiter.api.Test\n void dropColision1() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"0\");\n String esperado =\"bucket[0] = [11, ferrero]\\n\" + \" -> [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"delete\");\n assertNotNull(boolean0);\n assertTrue(boolean0);\n }", "@Override\n public void createTable() throws Exception {\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"alter table\");\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n boolean boolean0 = SQLUtil.isDDL(\"drop materialized view\");\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"delete\");\n assertTrue(boolean0);\n assertNotNull(boolean0);\n }", "public abstract void lockTableForWriting(String table) throws RollbackException;", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public abstract void lockTableForReading(String table) throws RollbackException;", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n File file0 = FileUtil.canonicalFile(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n MockFileOutputStream mockFileOutputStream0 = new MockFileOutputStream(file0, true);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(mockFileOutputStream0, false);\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "boolean supportsRollbackAfterDDL();", "public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }", "@org.junit.jupiter.api.Test\n void dropNormal() {\n String key = \"12345\";\n String value =\"David\";\n String key2 = \"21\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n\n hashTable.drop(\"12345\");\n\n String esperado = \"bucket[15] = [21, ferrero]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 1;\n Assertions.assertEquals(count,hashTable.count());\n }", "@Override\n\tpublic void dropTable() {\n\t\ttry {\n\t\t\tTableUtils.dropTable(connectionSource, UserEntity.class, true);\n\t\t\tTableUtils.dropTable(connectionSource, Downloads.class, true);\n\t\t} catch (SQLException e) {\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesStructure(\"alter tabledeleteset{sciistream(int, inputstre8m, long)\");\n assertTrue(boolean0);\n }", "@Test\n public void testCopyUserTable() throws SQLException {\n AlterTableUtils.testCopyUserTable(activity, geoPackage);\n }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.checkReadOnly(\"derby.version.beta\", true);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // Tried to mutate a database with read-only settings: derby.version.beta\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "public abstract void drop();", "@Test\n public void testAlterSetBlocksAllowed() throws Exception {\n execute(\"create table t1 (id integer) with (number_of_replicas = 0, \\\"blocks.metadata\\\" = true)\");\n ensureYellow();\n\n execute(\"alter table t1 set (\\\"blocks.metadata\\\" = true)\");\n }", "@Test\n public void testCopyTileTable() throws SQLException, IOException {\n AlterTableUtils.testCopyTileTable(activity, geoPackage);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"4-s<.5+Q6\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"alter materialized viewdelete\");\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"alter materialized viewdelete\", true, defaultDBTable0, \"alte\");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, mockPrintWriter0);\n assertEquals(\"table\", defaultDBTable0.getObjectType());\n }", "private void processAlterTable() throws HsqlException {\n\n String tableName = tokenizer.getName();\n String schema =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n Table t = database.schemaManager.getUserTable(session, tableName,\n schema);\n String token;\n\n if (t.isView()) {\n throw Trace.error(Trace.NOT_A_TABLE);\n }\n\n session.setScripting(true);\n\n token = tokenizer.getSimpleToken();\n\n switch (Token.get(token)) {\n\n case Token.RENAME : {\n processAlterTableRename(t);\n\n return;\n }\n case Token.ADD : {\n HsqlName cname = null;\n\n if (tokenizer.isGetThis(Token.T_CONSTRAINT)) {\n token = tokenizer.getName();\n\n String constraintSchema = tokenizer.getLongNameFirst();\n\n if (constraintSchema != null) {\n constraintSchema = session.getSchemaNameForWrite(\n tokenizer.getLongNameFirst());\n\n if (!t.getSchemaName().equals(constraintSchema)) {\n throw Trace.error(\n Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS,\n constraintSchema);\n }\n }\n\n cname = database.nameManager.newHsqlName(token,\n tokenizer.wasQuotedIdentifier());\n }\n\n token = tokenizer.getString();\n\n if (tokenizer.wasQuotedIdentifier()\n && tokenizer.wasSimpleName()) {\n tokenizer.back();\n processAlterTableAddColumn(t);\n\n return;\n }\n\n if (!tokenizer.wasSimpleToken()) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n switch (Token.get(token)) {\n\n case Token.FOREIGN :\n tokenizer.getThis(Token.T_KEY);\n processAlterTableAddForeignKeyConstraint(t, cname);\n\n return;\n\n case Token.UNIQUE :\n processAlterTableAddUniqueConstraint(t, cname);\n\n return;\n\n case Token.CHECK :\n processAlterTableAddCheckConstraint(t, cname);\n\n return;\n\n case Token.PRIMARY :\n tokenizer.getThis(Token.T_KEY);\n processAlterTableAddPrimaryKey(t, cname);\n\n return;\n\n default :\n if (cname != null) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n tokenizer.back();\n case Token.COLUMN :\n processAlterTableAddColumn(t);\n\n return;\n }\n }\n case Token.DROP : {\n token = tokenizer.getString();\n\n if (tokenizer.wasQuotedIdentifier()\n && tokenizer.wasSimpleName()) {\n tokenizer.back();\n processAlterTableDropColumn(t);\n\n return;\n }\n\n if (!tokenizer.wasSimpleToken()) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n switch (Token.get(token)) {\n\n case Token.PRIMARY :\n tokenizer.getThis(Token.T_KEY);\n\n if (t.hasPrimaryKey()) {\n processAlterTableDropConstraint(\n t, t.getPrimaryConstraint().getName().name);\n } else {\n throw Trace.error(Trace.CONSTRAINT_NOT_FOUND,\n Trace.TABLE_HAS_NO_PRIMARY_KEY,\n new Object[] {\n \"PRIMARY KEY\", t.getName().name\n });\n }\n\n return;\n\n case Token.CONSTRAINT :\n processAlterTableDropConstraint(t);\n\n return;\n\n default :\n tokenizer.back();\n case Token.COLUMN :\n processAlterTableDropColumn(t);\n\n return;\n }\n }\n case Token.ALTER : {\n tokenizer.isGetThis(Token.T_COLUMN);\n processAlterColumn(t);\n\n return;\n }\n default : {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n }\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\" SELECT * FROM \");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }", "@Test\n public void testDropNonExistingTable() throws Exception {\n String tableName = \"nonexistingtable\";\n\n assertTableIsNotRegistered(DEFAULT_DB, tableName);\n\n String query = String.format(\"drop table if exists %s\", tableName);\n\n runCommand(query);\n\n //Should have no effect\n assertTableIsNotRegistered(DEFAULT_DB, tableName);\n }", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n boolean boolean0 = SQLUtil.isDDL(\"drop materialized viewoeqdkmcg0dtw\");\n assertTrue(boolean0);\n }", "public void cleanTable() throws ClassicDatabaseException;", "@Test\n public void dropTable() {\n try {\n String sql = \"drop table if exists \" + \"\";\n boolean resultSet = statement.execute(sql);\n System.out.println(resultSet);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void readOnlyTransaction();", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "private void processAlterTableDropColumn(Table t) throws HsqlException {\n\n String token;\n int colindex;\n\n token = tokenizer.getName();\n colindex = t.getColumnNr(token);\n\n session.commit();\n\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.dropColumn(colindex);\n }", "@Override\r\n\t\tpublic boolean isReadOnly() throws SQLException {\n\t\t\treturn false;\r\n\t\t}", "public void IsInUse() {\n\t\tSystem.out.println(\"Table being cleaned, cannot be used.\");\n\t}", "public void testDrop() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\t\t\tassertTrue(DbRegistry.hasTable(ServerParameterTDG.TABLE));\n\t\t\tServerParameterTDG.drop();\n\t\t\tassertFalse(DbRegistry.hasTable(ServerParameterTDG.TABLE));\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"Illegal column type format: \");\n String[] stringArray0 = new String[9];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"66i,cw\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertEquals(\"table\", defaultDBTable0.getObjectType());\n }", "public boolean supportsUniqueConstraintInCreateAlterTable() {\n \t return true;\n \t}", "public boolean dropTable() {\n boolean success = false;\n if (conn != null) {\n Statement stmt = null;\n\n try {\n stmt = conn.createStatement();\n stmt.execute(\"DROP TABLE sample_table\");\n log.info(\"Deleting sample_table\");\n success = true;\n } catch (SQLException e) {\n log.error(\"Unable to create the database table\", e);\n } finally {\n if (stmt != null) {\n try {\n stmt.close();\n } catch (SQLException e) {\n }\n }\n }\n }\n return success;\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void dropUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createSQLQuery(\"DROP TABLE IF EXISTS Users\").executeUpdate();\n tx.commit();\n session.close();\n\n }", "@Override\r\n\tpublic boolean isPoolable() throws SQLException {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isPoolable() throws SQLException {\n\t\treturn false;\r\n\t}", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "public DropTableItemRecord() {\n super(DropTableItem.DROP_TABLE_ITEM);\n }", "@Override\n\tpublic boolean isPoolable() throws SQLException {\n\t\treturn false;\n\t}", "@org.junit.jupiter.api.Test\n void drop1elementoColisionNoExiste() {\n String key = \"0\";\n String value =\"David\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.drop(\"11\");\n String esperado = \"bucket[0] = [0, David]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 1;\n Assertions.assertEquals(count,hashTable.count());\n }", "protected abstract String getAlterTable(boolean nextLine, boolean only);", "@Override\n public void testTruncateTable() {\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"alter sessionrefereznces\");\n assertNotNull(boolean0);\n assertFalse(boolean0);\n }", "void dropAllTables();", "boolean createTable();", "public void drop() {\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME1);\n onCreate(db);\n }", "@Test\n public void test007_test_remove() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n test.insert(1, \"2\");\n if(test.remove(2) != false) {\n fail(\"remove didn't work correctly on value not present.\");\n }\n test.insert(2, \"3\");\n if (test.remove(2) != true) {\n fail(\"remove didn't work correctly on an added value\");\n }\n } catch (Exception e) {\n fail(\"Exception shouldn't be thrown\");\n }\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"alter session\");\n assertNotNull(boolean0);\n assertFalse(boolean0);\n }", "@Test (timeout=180000)\n public void testTableWithNoRegions() throws Exception {\n TableName table =\n TableName.valueOf(name.getMethodName());\n try {\n // create table with one region\n HTableDescriptor desc = new HTableDescriptor(table);\n HColumnDescriptor hcd = new HColumnDescriptor(Bytes.toString(FAM));\n desc.addFamily(hcd); // If a table has no CF's it doesn't get checked\n createTable(TEST_UTIL, desc, null);\n tbl = (HTable) connection.getTable(table, tableExecutorService);\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), HConstants.EMPTY_START_ROW,\n HConstants.EMPTY_END_ROW, false, false, true);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.NOT_IN_HDFS });\n\n doFsck(conf, true);\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n }\n\n }", "public void modifyTable(final byte [] tableName, DBConstants.Modify op,\n Object... args) throws IOException {\n if (this.master == null) \n throw new MasterNotRunningException(\"master has been shut down\");\n \n // Let pass if its a catalog table. Used by admins.\n if (tableName != null && !MetaUtils.isMetaTableName(tableName)) {\n // This will throw exception\n DBTableDescriptor.isLegalTableName(tableName);\n }\n \n Writable[] arr = null;\n try {\n switch (op) {\n case TABLE_SET_HTD:\n if (args == null || args.length < 1 ||\n !(args[0] instanceof DBTableDescriptor)) {\n throw new IllegalArgumentException(\"SET_HTD requires a DBTableDescriptor\");\n }\n arr = new Writable[1];\n arr[0] = (DBTableDescriptor)args[0];\n this.master.modifyTable(tableName, op, arr);\n break;\n\n case TABLE_COMPACT:\n case TABLE_SPLIT:\n case TABLE_MAJOR_COMPACT:\n case TABLE_FLUSH:\n if (args != null && args.length > 0) {\n arr = new Writable[1];\n if (args[0] instanceof byte[]) {\n arr[0] = new ImmutableBytesWritable((byte[])args[0]);\n } else if (args[0] instanceof ImmutableBytesWritable) {\n arr[0] = (ImmutableBytesWritable)args[0];\n } else if (args[0] instanceof String) {\n arr[0] = new ImmutableBytesWritable(Bytes.toBytes((String)args[0]));\n } else {\n throw new IllegalArgumentException(\"Requires byte[], String, or\" +\n \"ImmutableBytesWritable\");\n }\n }\n this.master.modifyTable(tableName, op, arr);\n break;\n\n case CLOSE_REGION:\n if (args == null || args.length < 1) {\n throw new IllegalArgumentException(\"Requires at least a region name\");\n }\n arr = new Writable[args.length];\n for (int i = 0; i < args.length; i++) {\n if (args[i] instanceof byte[]) {\n arr[i] = new ImmutableBytesWritable((byte[])args[i]);\n } else if (args[i] instanceof ImmutableBytesWritable) {\n arr[i] = (ImmutableBytesWritable)args[i];\n } else if (args[i] instanceof String) {\n arr[i] = new ImmutableBytesWritable(Bytes.toBytes((String)args[i]));\n } else if (args[i] instanceof Boolean) {\n arr[i] = new BooleanWritable((Boolean) args[i]);\n } else {\n throw new IllegalArgumentException(\"Requires byte [] or \" +\n \"ImmutableBytesWritable, not \" + args[i]);\n }\n }\n this.master.modifyTable(tableName, op, arr);\n break;\n\n default:\n throw new IOException(\"unknown modifyTable op \" + op);\n }\n } catch (RemoteException e) {\n throw RemoteExceptionHandler.decodeRemoteException(e);\n }\n }", "@org.junit.jupiter.api.Test\n void drop2ColisionesJuntos() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n\n hashTable.drop(\"0\");\n hashTable.drop(\"11\");\n\n String esperado =\"bucket[0] = [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n\n }", "private EstabelecimentoTable() {\n\t\t\t}", "@Test\n public void testCopyAttributesTable() throws SQLException {\n AlterTableUtils.testCopyAttributesTable(activity, geoPackage);\n }", "public void forceTableCompaction() throws IOException\n {\n ssProxy.forceTableCompaction();\n }", "@Test\n public void testCopyFeatureTable() throws SQLException, IOException {\n AlterTableUtils.testCopyFeatureTable(activity, geoPackage);\n }", "public void rollbackCreateTable(Table table) throws MetaException {\n commitDropTable(table, true);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"k4#~A6 _d6{6v)5_\", dBSchema0);\n DBDataType dBDataType0 = DBDataType.getInstance((-280560843), \"\");\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"new org.apache.derby.catalog.TriggerOldTransitionRows() \", defaultDBTable0, dBDataType0);\n StringBuilder stringBuilder0 = new StringBuilder(\"\");\n SQLUtil.renderColumnTypeWithSize((DBColumn) defaultDBColumn0, stringBuilder0);\n assertEquals(\"\", stringBuilder0.toString());\n }", "@Override\n\tpublic void setPoolable(boolean poolable) throws SQLException {\n\t\t\n\t}", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "void removeAllData() throws DatabaseNotAccessibleException;", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n String[] stringArray0 = new String[0];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"deletesetciisteam(int, inputstream, long)\", true, defaultDBTable0, stringArray0, defaultDBTable0, stringArray0);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"Illegal column type format: \");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertEquals(\"table\", defaultDBTable0.getObjectType());\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog(\"LOB\");\n DBSchema dBSchema0 = new DBSchema(\"getFloat(String)\", dBCatalog0);\n StringBuilder stringBuilder0 = new StringBuilder((CharSequence) \"getFloat(String)\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"d_Nj^xUc,jo(V.cG^9\", dBSchema0);\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"rename(r@f\";\n stringArray0[2] = \" Y*-X>Nz.q@~K^o8Z]v\";\n stringArray0[3] = \"rename(r@f\";\n stringArray0[4] = \"LOB\";\n stringArray0[5] = \"org.apache.derby.iapi.sql.execute.ExecutionFactory\";\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"getFloat(String)\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n File file0 = MockFile.createTempFile(\"rename(r@f\", \"getFloat(String)\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(file0);\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertEquals(\"d_Nj^xUc,jo(V.cG^9\", defaultDBTable0.getName());\n }", "private void logTableDDL(Table t) throws HsqlException {\n\n StringBuffer tableDDL;\n String sourceDDL;\n\n tableDDL = new StringBuffer();\n\n DatabaseScript.getTableDDL(database, t, 0, null, true, tableDDL);\n\n sourceDDL = DatabaseScript.getDataSource(t);\n\n database.logger.writeToLog(session, tableDDL.toString());\n\n if (sourceDDL != null) {\n database.logger.writeToLog(session, sourceDDL);\n database.logger.synchLog();\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n // Undeclared exception!\n SQLUtil.mutatesDataOrStructure(\"/*\");\n }" ]
[ "0.7038221", "0.6848191", "0.6699516", "0.6610632", "0.6602454", "0.6521905", "0.64438814", "0.62637377", "0.6208636", "0.6110792", "0.6063299", "0.60445064", "0.59050465", "0.5898358", "0.58942276", "0.5887478", "0.5881932", "0.5872281", "0.5851443", "0.58505625", "0.58443445", "0.5820084", "0.5801304", "0.57997274", "0.57850146", "0.5754865", "0.57362914", "0.57265353", "0.5722438", "0.57217664", "0.5703302", "0.5700258", "0.5698273", "0.56894904", "0.56760293", "0.56711674", "0.5664841", "0.5660106", "0.56484604", "0.5646248", "0.564502", "0.5628254", "0.5625946", "0.5620827", "0.5615374", "0.5605986", "0.5601561", "0.55987823", "0.55970544", "0.5594254", "0.55745775", "0.5563177", "0.55556947", "0.5550378", "0.55363125", "0.553308", "0.551706", "0.5514573", "0.55140543", "0.5500038", "0.54986346", "0.5491645", "0.54912543", "0.54798585", "0.54780895", "0.54763573", "0.5459899", "0.5444298", "0.54409003", "0.543213", "0.54286927", "0.5426163", "0.5426163", "0.5425845", "0.5424009", "0.5416513", "0.5404464", "0.5399319", "0.53895056", "0.5385748", "0.53797066", "0.53688556", "0.5365813", "0.5364379", "0.5363415", "0.5355958", "0.5354628", "0.5354506", "0.53378725", "0.5336946", "0.5329057", "0.5320832", "0.53192747", "0.53145134", "0.5314502", "0.5300399", "0.5296004", "0.52919865", "0.52753496", "0.527457", "0.5264362" ]
0.0
-1
Invoked as part of the UI system when items are dropped or pasted
public boolean importData(JComponent c, Transferable t) { if (canImport(c, t.getTransferDataFlavors())) { try { List mediaItemList = (List)t.getTransferData(MediaItemsTransferable.flavor); JTable target = (JTable)c; if (target != contentMetadataTablePanel.getTable()) { throw new IllegalArgumentException("mismatched transfer handler"); } addIndex = target.getSelectedRow(); ArrayList items = Util.contentMetadataCollectionToContentIdArrayList(contentMetadataTablePanel.getMetadata()); items.addAll(addIndex, mediaItemList); contentMetadataTablePanel.updateModel(items);//XXX:0:20050111iain: return true; } catch (UnsupportedFlavorException ufe) { } catch (IOException ioe) { } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseDrop()\n {\n }", "@Override\n\tpublic void dragDropped() {\n\n\t}", "protected void dropIt() {\n\t\tshowUnselected();\n\n\t\tfirePropertyChange(\n\t\t\t\"insertQuestion\",\n\t\t\tSwingUtilities.getAccessibleIndexInParent(this),\n\t\t\t-1);\n\t}", "public void drop(DropTargetEvent event) {\n if(dropItem == null)\n return;\n TreeObject[] sel = getSelection();\n for (int i = 0; i < sel.length; i++) {\n if(dropBefore) {\n sel[i].moveBefore(dropItem);\n } else if(dropInto) {\n sel[i].moveTo(dropItem);\n } else {\n sel[sel.length - i - 1].moveAfter(dropItem);\n }\n }\n treeViewer1.refresh();\n }", "void onDropped();", "@Override\n\tpublic void drop(DropTargetDropEvent event) {\n\n\t\t// Accept copy drops\n\t\tevent.acceptDrop(DnDConstants.ACTION_COPY);\n\n\t\t// Get the transfer which can provide the dropped item data\n\t\tTransferable transferable = event.getTransferable();\n\n\t\t// Get the data formats of the dropped item\n\t\tDataFlavor[] flavors = transferable.getTransferDataFlavors();\n\n\t\t// Loop through the flavors\n\t\tfor (DataFlavor flavor : flavors) {\n\t\t\ttry {\n\t\t\t\t// If the drop items are files\n\t\t\t\tif (flavor.isFlavorJavaFileListType()) {\n\n\t\t\t\t\t// Get all of the dropped files\n\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\tList<File> files = (List<File>) transferable.getTransferData(flavor);\n\n\t\t\t\t\t// Loop them through\n\t\t\t\t\tfor (File file : files) {\n\t\t\t\t\t\tString path = file.getPath();\n\t\t\t\t\t\tif (path.toLowerCase().endsWith(\".png\") || path.toLowerCase().endsWith(\".jpg\") || path.toLowerCase().endsWith(\".jpeg\") || path.toLowerCase().endsWith(\".bmp\")) {\n\t\t\t\t\t\t\t// Print out the file path\n\t\t\t\t\t\t\tpath = file.getPath();\n\t\t\t\t\t\t\tSystem.out.println(\"File path is '\" + path + \"'.\");\n\t\t\t\t\t\t\tif (getQuestEditation() != null) {\n\t\t\t\t\t\t\t\tgetQuestEditation().getImagePanel().setImage(path, false);\n\t\t\t\t\t\t\t\tgetQuestEditation().getImagePanel().repaint();\n\t\t\t\t\t\t\t\tgetQuestEditation().setPictureIsFromFolder(false);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgetAddAnswer().getAnswerPanel().setImage(path, false);\n\t\t\t\t\t\t\t\tgetAddAnswer().getAnswerPanel().repaint();\n\t\t\t\t\t\t\t\tgetAddAnswer().setPictureIsFromFolder(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (flavor.match(DataFlavor.imageFlavor)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tImage image = (Image) transferable.getTransferData(DataFlavor.imageFlavor);\n\t\t\t\t\t\tif (getQuestEditation() != null) {\n\t\t\t\t\t\t\tgetQuestEditation().getImagePanel().setImage((BufferedImage) image);\n\t\t\t\t\t\t\tgetQuestEditation().getImagePanel().setPath(\"none\");\n\t\t\t\t\t\t\tgetQuestEditation().getImagePanel().repaint();\n\t\t\t\t\t\t\tgetQuestEditation().setPictureIsFromFolder(false);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgetAddAnswer().getAnswerPanel().setImage((BufferedImage) image);\n\t\t\t\t\t\t\tgetAddAnswer().getAnswerPanel().setPath(\"none\");\n\t\t\t\t\t\t\tgetAddAnswer().getAnswerPanel().repaint();\n\t\t\t\t\t\t\tgetAddAnswer().setPictureIsFromFolder(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (InvalidDnDOperationException ex) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"word 2010 error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// Inform that the drop is complete\n\t\tevent.dropComplete(true);\n\t}", "@Override\r\n\t\t\t\t\tpublic void dropAccept(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void dropAccept(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\tpublic void dropActionChanged(DropTargetDragEvent dtde) {\n\t\t\t\r\n\t\t}", "public void dropActionChanged(DropTargetDragEvent dtde){}", "@Override\r\n public void dropActionChanged(DropTargetDragEvent dtde) {}", "void onItemDropped(EntityId droppedItem);", "@Override\n\t\t\tpublic void drop(DropTargetDropEvent event) {\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tTransferable tf = event.getTransferable();\n\t\t\t\t\tif(tf.isDataFlavorSupported(DataFlavor.javaFileListFlavor))\n\t\t\t\t\t{\n\t\t\t\t\t\tevent.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);\n\t\t\t\t\t\tList file_list = (List) tf.getTransferData(DataFlavor.javaFileListFlavor);\n\t\t\t\t\t\tIterator file_iterator = file_list.iterator();\n\t\t\t\t\t\twhile(file_iterator.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tFile file = (File) file_iterator.next();\n\t\t\t\t\t\t\tinput_box.setText(input_box.getText() + \" \" + file.getAbsolutePath());\n\t\t\t\t\t\t\tevent.dropComplete(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tContent.setText(\"Cannot add this file\\n\");\n\t\t\t\t\t\tevent.rejectDrop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void perform() {\n if (valid) {\n if (isUndo) {\n ObjArrayUtil.addItems(itemSlots, this.items, true);\n Editor.setClipboard(savedClipboard);\n } else {\n // undo operation constructs modified items for us\n getUndo();\n Editor.setClipboard(oppOper.items);\n ObjArrayUtil.deleteItems(itemSlots);\n }\n }\n }", "@Override\n public void onItemDragStarted(int position) {\n }", "void performPaste(){\n\r\n List pasteList = (TShapeClipboard.fGlobalClipboard).getShapeList();\r\n\r\n\r\n\r\n\r\n if ( (TShapeClipboard.fGlobalClipboard).clipboardValidForPaste(fShapes)) {\r\n // we have to check this because the User can bypass the menu by using the keyboard\r\n\r\n TUndoablePaste newEdit = new TUndoablePaste();\r\n\r\n newEdit.stateChanged(new ChangeEvent(this));\r\n\r\n Point whereToPaste;\r\n Rectangle unionRect=unionOfSelectees();\r\n\r\n if (unionRect!=null)\r\n whereToPaste=unionRect.getLocation();\r\n else\r\n whereToPaste=fListener.fAnchorPt; //last click\r\n\r\n if (deleteSelectedShapes(fShapes))\r\n repaint(); // it's going to repaint anyway\r\n\r\n if (pasteList.size() > 0) {\r\n Iterator iter = pasteList.iterator();\r\n TShape newShape;\r\n\r\n (TShapeClipboard.fGlobalClipboard).prepareForPaste(); // sets the top left to 00\r\n\r\n while (iter.hasNext()){\r\n newShape= ((TShape) iter.next()).copy();\r\n\r\n Rectangle boundsRect=newShape.getBoundsRect();\r\n\r\n boundsRect.translate(whereToPaste.x,whereToPaste.y);\r\n\r\n newShape.setBoundsRect(boundsRect);\r\n\r\n addShape(newShape); //more to it THAN THIS eg resolve interpr board reference\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n /* newEdit.doEdit(); */\r\n\r\n /* (TShapeClipboard.fGlobalClipboard).setShapeList(copySelectedShapes());\r\n if (deleteSelectedShapes(fShapes))\r\n repaint(); */\r\n }\r\n\r\n }", "@Override\n\tpublic void drop(DropTargetDropEvent e) {\n\t\tgetContainerDelegate().removeFromPlaceHolderVisibleRequesters(getTargetComponent());\n\t\tgetTargetComponent().setFocused(false);\n\t\ttry {\n\t\t\tDataFlavor chosen = chooseDropFlavor(e);\n\t\t\tif (chosen == null) {\n\t\t\t\te.rejectDrop();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// the actions that the source has specified with\n\t\t\t// DragGestureRecognizer\n\t\t\tint sa = e.getSourceActions();\n\n\t\t\tif ((sa & acceptableActions) == 0) {\n\t\t\t\te.rejectDrop();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tObject data = null;\n\n\t\t\ttry {\n\n\t\t\t\t/*\n\t\t\t\t * the source listener receives this action in dragDropEnd. if\n\t\t\t\t * the action is DnDConstants.ACTION_COPY_OR_MOVE then the\n\t\t\t\t * source receives MOVE!\n\t\t\t\t */\n\n\t\t\t\tdata = e.getTransferable().getTransferData(chosen);\n\t\t\t\tif (logger.isLoggable(Level.FINE)) {\n\t\t\t\t\tlogger.fine(\"data is a \" + data.getClass().getName());\n\t\t\t\t}\n\t\t\t\tif (data == null) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\t\t\t} catch (Throwable t) {\n\t\t\t\tif (logger.isLoggable(Level.WARNING)) {\n\t\t\t\t\tlogger.warning(\"Couldn't get transfer data: \" + t.getMessage());\n\t\t\t\t}\n\t\t\t\tt.printStackTrace();\n\t\t\t\te.dropComplete(false);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (data instanceof FIBDraggable) {\n\n\t\t\t\ttry {\n\t\t\t\t\tFIBDraggable element = (FIBDraggable) data;\n\t\t\t\t\tif (element == null) {\n\t\t\t\t\t\te.rejectDrop();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tObject source = e.getSource();\n\n\t\t\t\t\t// OK, let's got for the drop\n\t\t\t\t\tif (source instanceof FIBDropTarget && element.acceptDragging((FIBDropTarget) source)) {\n\t\t\t\t\t\tPoint pt = e.getLocation();\n\t\t\t\t\t\tif (element.elementDragged((FIBDropTarget) source, pt)) {\n\t\t\t\t\t\t\te.acceptDrop(acceptableActions);\n\t\t\t\t\t\t\te.dropComplete(true);\n\t\t\t\t\t\t\tlogger.info(\"Drop succeeded\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\te.rejectDrop();\n\t\t\t\t\te.dropComplete(false);\n\t\t\t\t\treturn;\n\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tlogger.warning(\"Unexpected: \" + e1);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\te.rejectDrop();\n\t\t\t\t\te.dropComplete(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\te.rejectDrop();\n\t\t\te.dropComplete(false);\n\t\t\treturn;\n\t\t}\n\n\t\tfinally {\n\t\t\t// getController().getDrawingView().resetCapturedNode();\n\t\t}\n\t}", "@Override\r\n public void drop(DropTargetDropEvent dtde) {\r\n onDropFile(dtde);\r\n }", "@Override\r\n\tpublic void dropped(DNDEvent e) {\n\t\tif (dockable.getTitle() == e.getDragSource()) {\r\n\t\t\tDockableTitleBar titleBar = (DockableTitleBar)dockable.getTitle().getParent();\r\n\t\t\tDNDEvent event = new DNDEvent(\r\n\t\t\t\t\te.getDragSource(), \r\n\t\t\t\t\te.getDropTarget(), \r\n\t\t\t\t\ttitleBar.getLocationOnScreen().x + e.getX() - e.getOriginX(), \r\n\t\t\t\t\ttitleBar.getLocationOnScreen().y + e.getY() + e.getOriginY(), \r\n\t\t\t\t\te.getOriginX(), e.getOriginY(), \r\n\t\t\t\t\tDNDEvent.RESULT_FAILURE);\r\n\t\t\ttitleBar.dropped(event);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: quick but really dirty...\r\n\t\t//Dockable sourceDockable = (Dockable)e.getDragSource().getParent().getParent().getParent().getParent();\r\n\t\t// TODO: less dirty...\r\n\t\tDockable sourceDockable = (Dockable)((DockableTitleBar)e.getDragSource().getParent()).getDockable();\r\n\t\tDockable targetDockable = dockable;\r\n\t\t\r\n\t\tDockingCanvas sourceCanvas = sourceDockable.getDockingRoot().getDockingCanvas();\r\n\t\tDockingCanvas targetCanvas = targetDockable.getDockingRoot().getDockingCanvas();\r\n\t\t\r\n\t\t\r\n\t\t// remove drag source\r\n\t\tsourceDockable.getDockingRoot().remove();\r\n\t\tif (sourceCanvas.isDisposable() && sourceCanvas.getComponentCount() == 0) {\r\n\t\t\tsourceCanvas.getOwner().dispose();\r\n\t\t}\r\n\t\t\r\n\t\t// add to drop target\r\n\t\ttargetDockable.getDockingRoot().add(sourceDockable, direction);\r\n\t\t\r\n\t\t\r\n\t\t// re-validate and repaint target canvas\r\n\t\ttargetCanvas.revalidate();\r\n\t\ttargetCanvas.repaint();\r\n\t\t\r\n\t\t// re-validate and repaint source canvas if different to target canvas\r\n\t\tif (targetCanvas != sourceCanvas) {\r\n\t\t\tsourceCanvas.revalidate();\r\n\t\t\tsourceCanvas.repaint();\r\n\t\t}\r\n\t\t\r\n\t\tmouseOver = false;\r\n\t\t\r\n\t\t//dockable.getDockingRoot().findRoot().printTree(\"\");\r\n\t}", "void copyItemInEdt() {\n\t\tedtMessage.setText(messageToPasteFromTheListView);\n\t}", "public void dropActionChanged(DragSourceDragEvent evt) {\n }", "@Override\r\n public void dragEnter(DragSourceDragEvent e) {\n DragSourceContext ctx = e.getDragSourceContext(); \r\n int action = e.getDropAction();\r\n ctx.setCursor(DragSource.DefaultCopyDrop);\r\n }", "private void handleDragDetectedEvent(Event event) {\n String id = DragAndDropDataManager.getInstance().putData(source.getTransferData());\n \n Dragboard db = source.getDragSource().startDragAndDrop(TransferMode.COPY); \n ClipboardContent content = new ClipboardContent();\n content.putString(id);\n db.setContent(content);\n \n source.handleDragDetectedEvent((MouseEvent) event);\n \n event.consume();\n }", "@Override\r\n\t\tpublic void dragOver(DropTargetDragEvent dtde) {\n\t\t\t\r\n\t\t}", "@Override\r\n public void dragOver(DropTargetDragEvent dtde) {}", "@Override\n public void cut() {\n clipboard.setContents(getSelectionAsList(true));\n }", "@Override\r\n\t\t\t\t\tpublic void dragOperationChanged(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void dragOperationChanged(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void drop(DropTargetEvent event) {\n\t\t\t\t\t\tIStructuredSelection selection = (IStructuredSelection) event.data;\r\n\t\t\t\t\t\tif (selection.size() > 0) {\r\n\t\t\t\t\t\t\tIStructuredSelection structuredSelection = (IStructuredSelection) selection;\r\n\t\t\t\t\t\t\tTopic element = (Topic) structuredSelection.getFirstElement();\r\n\t\t\t\t\t\t\ttextTo.setText(element.getName());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttransform.setToTopic(element.getName());\r\n\t\t\t\t\t\t\tem.getTransaction().begin();\r\n\t\t\t\t\t\t\tem.merge(transform);\r\n\t\t\t\t\t\t\tem.getTransaction().commit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void drop(DropTargetEvent event) {\n\t\t\t\tIStructuredSelection selection = (IStructuredSelection) event.data;\r\n\t\t\t\tif (selection.size() > 0) {\r\n\t\t\t\t\tIStructuredSelection structuredSelection = (IStructuredSelection) selection;\r\n\t\t\t\t\tTopic element = (Topic) structuredSelection.getFirstElement();\r\n\t\t\t\t\ttextFrom.setText(element.getName());\r\n\t\t\t\t\t\r\n\t\t\t\t\ttransform.setFromTopic(element.getName());\r\n\t\t\t\t\tem.getTransaction().begin();\r\n\t\t\t\t\tem.merge(transform);\r\n\t\t\t\t\tem.getTransaction().commit();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void dragOver(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void dragOver(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void onFrameDrop() {}", "public void drop( DropTargetDropEvent evt )\r\n {\r\n log(out, \"FileDropIn.drop(): drop event.\");\r\n try\r\n { // Get whatever was dropped\r\n Transferable tr = evt.getTransferable();\r\n\r\n // Is it a file list?\r\n if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor))\r\n {\r\n // Say we'll take it.\r\n //evt.acceptDrop ( java.awt.dnd.DnDConstants.ACTION_COPY_OR_MOVE );\r\n evt.acceptDrop(DnDConstants.ACTION_COPY);\r\n log(out, \"FileDropIn.drop(): file list accepted.\");\r\n\r\n // Get a useful list\r\n java.util.List fileList = (java.util.List) tr.getTransferData(DataFlavor.javaFileListFlavor);\r\n //java.util.Iterator iterator = fileList.iterator();\r\n\r\n // Convert list to array\r\n File[] filesTemp = new File[fileList.size()];\r\n fileList.toArray(filesTemp);\r\n final File[] files = filesTemp;\r\n\r\n // Alert listener to drop.\r\n if (listener != null)\r\n listener.filesDropped(files);\r\n\r\n // Mark that drop is completed.\r\n evt.getDropTargetContext().dropComplete(true);\r\n log(out, \"FileDropIn.drop(): drop complete.\");\r\n } // end if: file list\r\n else\r\n {\r\n log(out, \"FileDropIn.drop(): not a file list - abort.\");\r\n evt.rejectDrop();\r\n } // end else: not a file list\r\n } // end try\r\n catch (IOException io)\r\n {\r\n log(out, \"FileDrop.drop(): IOException - abort:\");\r\n io.printStackTrace(out);\r\n evt.rejectDrop();\r\n } // end catch IOException\r\n catch (UnsupportedFlavorException ufe)\r\n {\r\n log(out, \"FileDrop.drop(): UnsupportedFlavorException - abort:\");\r\n ufe.printStackTrace(out);\r\n evt.rejectDrop();\r\n } // end catch: UnsupportedFlavorException\r\n finally\r\n {\r\n // If it's a Swing component, reset its border\r\n if (comp instanceof javax.swing.JComponent)\r\n {\r\n JComponent jc = (JComponent) comp;\r\n jc.setBorder(normalBorder);\r\n log(out, \"FileDropIn.drop(): normal border restored.\");\r\n } // end if: JComponent\r\n } // end finally\r\n }", "@Override\n public void onDragEnd() {\n // Do nothing.\n }", "@Override // see item.java\n\tpublic void pickUp() {\n\n\t}", "void onDragged();", "@Override\n\tpublic void editorPaste()\n\t{\n editorInsert(clipboard);\n\t\tSystem.out.println(\"DEBUG: performing Paste\") ;\n\t}", "public void dropActionChanged(DropTargetDragEvent dtde) {\n\t\t\n\t}", "@Override\n public void copy() {\n clipboard.setContents(getSelectionAsList(false));\n }", "@Override\n public boolean onDrag(View viewDroppedUpon , DragEvent de){\n\n\n log(\"adapter pos\"+this.viewHolder.getAdapterPosition());\n switch (de.getAction()){\n\n case DragEvent.ACTION_DRAG_STARTED:\n //log(\"StartingDrag\"+DragEvent.ACTION_DRAG_STARTED);\n return true;\n\n case DragEvent.ACTION_DRAG_ENDED:\n //log(\"Ending Drag\"+DragEvent.ACTION_DRAG_ENDED);\n return true;\n\n case DragEvent.ACTION_DRAG_ENTERED:\n //log(\"Drag entered \"+DragEvent.ACTION_DRAG_ENTERED);\n return true;\n\n case DragEvent.ACTION_DRAG_EXITED:\n //log(\"Drag ended \"+DragEvent.ACTION_DRAG_ENDED);\n\n return true;\n\n case DragEvent.ACTION_DRAG_LOCATION:\n //log(\"Drag location \"+DragEvent.ACTION_DRAG_LOCATION);\n return true;\n\n case DragEvent.ACTION_DROP:\n //log(\"droppable is \"+this.droppable);\n\n log(\"Action dropped \" + DragEvent.ACTION_DROP);\n\n View dropped=(View)de.getLocalState();\n\n\n log(\"viewDroppedUpon tag \"+viewDroppedUpon.getTag());\n log(\"dropped tag \"+dropped.getTag());\n int pos=this.viewHolder.getAdapterPosition();\n\n\n\n mPairMaker.makePairs(dropped,viewDroppedUpon,pos,LongPressListener.getPosition());\n\n\n\n\n\n return true;\n }\n\n\n\n return false;\n }", "@Override\n\t\t\tpublic void dragEnter(DropTargetDragEvent e) {\n\t\t\t}", "public void dropActionChanged(DropTargetDragEvent dtde) {\n // empty\n }", "public void doHandlepaste ( RunData data)\n\t{\n\t\tParameterParser params = data.getParameters ();\n\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// get the cut items to be pasted\n\t\tVector pasteCutItems = (Vector) state.getAttribute (STATE_CUT_IDS);\n\n\t\t// get the copied items to be pasted\n\t\tVector pasteCopiedItems = (Vector) state.getAttribute (STATE_COPIED_IDS);\n\n\t\tString collectionId = params.getString (\"collectionId\");\n\t\tString originalDisplayName = NULL_STRING;\n\n\t\t// handle cut and paste\n\t\tif (((String) state.getAttribute (STATE_CUT_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t{\n\t\t\tfor (int i = 0; i < pasteCutItems.size (); i++)\n\t\t\t{\n\t\t\t\tString currentPasteCutItem = (String) pasteCutItems.get (i);\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tResourceProperties properties = ContentHostingService.getProperties (currentPasteCutItem);\n\n\t\t\t\t\toriginalDisplayName = properties.getPropertyFormatted (ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t/*\n\t\t\t\t\tif (Boolean.TRUE.toString().equals(properties.getProperty (ResourceProperties.PROP_IS_COLLECTION)))\n\t\t\t\t\t{\n\t\t\t\t\t\tString alert = (String) state.getAttribute(STATE_MESSAGE);\n\t\t\t\t\t\tif (alert == null || ((alert != null) && (alert.indexOf(RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING) == -1)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t*/\n\t\t\t\t\t\t// paste the resource\n\t\t\t\t\t\tContentResource resource = ContentHostingService.getResource (currentPasteCutItem);\n\t\t\t\t\t\tResourceProperties p = ContentHostingService.getProperties(currentPasteCutItem);\n\t\t\t\t\t\tString id = collectionId + Validator.escapeResourceName(p.getProperty(ResourceProperties.PROP_DISPLAY_NAME));\n\n\t\t\t\t\t\t// cut-paste to the same collection?\n\t\t\t\t\t\tboolean cutPasteSameCollection = false;\n\t\t\t\t\t\tString displayName = p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\n\t\t\t\t\t\t// till paste successfully or it fails\n\t\t\t\t\t\tResourcePropertiesEdit resourceProperties = ContentHostingService.newResourceProperties ();\n\t\t\t\t\t\t// add the properties of the pasted item\n\t\t\t\t\t\tIterator propertyNames = properties.getPropertyNames ();\n\t\t\t\t\t\twhile ( propertyNames.hasNext ())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString propertyName = (String) propertyNames.next ();\n\t\t\t\t\t\t\tif (!properties.isLiveProperty (propertyName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (propertyName.equals (ResourceProperties.PROP_DISPLAY_NAME)&&(displayName.length ()>0))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresourceProperties.addProperty (propertyName, displayName);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresourceProperties.addProperty (propertyName, properties.getProperty (propertyName));\n\t\t\t\t\t\t\t\t}\t// if-else\n\t\t\t\t\t\t\t}\t// if\n\t\t\t\t\t\t}\t// while\n\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// paste the cutted resource to the new collection - no notification\n\t\t\t\t\t\t\tContentResource newResource = ContentHostingService.addResource (id, resource.getContentType (), resource.getContent (), resourceProperties, resource.getGroups(), NotificationService.NOTI_NONE);\n\t\t\t\t\t\t\tString uuid = ContentHostingService.getUuid(resource.getId());\n\t\t\t\t\t\t\tContentHostingService.setUuid(id, uuid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (InconsistentException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state,RESOURCE_INVALID_TITLE_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (OverQuotaException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"overquota\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (IdInvalidException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"title\") + \" \" + e.getMessage ());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(ServerOverloadException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// this represents temporary unavailability of server's filesystem\n\t\t\t\t\t\t\t// for server configured to save resource body in filesystem\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (IdUsedException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// cut and paste to the same collection; stop adding new resource\n\t\t\t\t\t\t\tif (id.equals(currentPasteCutItem))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcutPasteSameCollection = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\taddAlert(state, rb.getString(\"notaddreso\") + \" \" + id + rb.getString(\"used2\"));\n\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t// pasted to the same folder as before; add \"Copy of \"/ \"copy (n) of\" to the id\n\t\t\t\t\t\t\t\tif (countNumber==1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdisplayName = DUPLICATE_STRING + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\t\t\t\tid = collectionId + Validator.escapeResourceName(displayName);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdisplayName = \"Copy (\" + countNumber + \") of \" + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\t\t\t\tid = collectionId + Validator.escapeResourceName(displayName);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcountNumber++;\n\t\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t// try-catch\n\t\t\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlogger.debug(\"ResourcesAction.doHandlepaste ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!cutPasteSameCollection)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// remove the cutted resource\n\t\t\t\t\t\t\tContentHostingService.removeResource (currentPasteCutItem);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// }\t// if-else\n\t\t\t\t}\n\t\t\t\tcatch (InUseException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"someone\") + \" \" + originalDisplayName + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis7\") + \" \" + originalDisplayName + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\n\t\t\t\tcatch (TypeException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"pasteitem\") + \" \" + originalDisplayName + \" \" + rb.getString(\"mismatch\"));\n\t\t\t\t}\t// try-catch\n\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t{\n\t\t\t\t\tlogger.debug(\"ResourcesAction.doHandlepaste ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\n\t\t\t}\t// for\n\t\t}\t// cut\n\n\t\t// handling copy and paste\n\t\tif (Boolean.toString(true).equalsIgnoreCase((String) state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tfor (int i = 0; i < pasteCopiedItems.size (); i++)\n\t\t\t{\n\t\t\t\tString currentPasteCopiedItem = (String) pasteCopiedItems.get (i);\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tResourceProperties properties = ContentHostingService.getProperties (currentPasteCopiedItem);\n\t\t\t\t\toriginalDisplayName = properties.getPropertyFormatted (ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t// copy, cut and paste not operated on collections\n\t\t\t\t\tif (properties.getProperty (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tString alert = (String) state.getAttribute(STATE_MESSAGE);\n\t\t\t\t\t\tif (alert == null || ((alert != null) && (alert.indexOf(RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING) == -1)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// paste the resource\n\t\t\t\t\t\tContentResource resource = ContentHostingService.getResource (currentPasteCopiedItem);\n\t\t\t\t\t\tResourceProperties p = ContentHostingService.getProperties(currentPasteCopiedItem);\n\t\t\t\t\t\tString displayName = DUPLICATE_STRING + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\tString id = collectionId + Validator.escapeResourceName(displayName);\n\n\t\t\t\t\t\tResourcePropertiesEdit resourceProperties = ContentHostingService.newResourceProperties ();\n\n\t\t\t\t\t\t// add the properties of the pasted item\n\t\t\t\t\t\tIterator propertyNames = properties.getPropertyNames ();\n\t\t\t\t\t\twhile ( propertyNames.hasNext ())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString propertyName = (String) propertyNames.next ();\n\t\t\t\t\t\t\tif (!properties.isLiveProperty (propertyName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (propertyName.equals (ResourceProperties.PROP_DISPLAY_NAME)&&(displayName.length ()>0))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresourceProperties.addProperty (propertyName, displayName);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresourceProperties.addProperty (propertyName, properties.getProperty (propertyName));\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\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// paste the copied resource to the new collection\n\t\t\t\t\t\t\tContentResource newResource = ContentHostingService.addResource (id, resource.getContentType (), resource.getContent (), resourceProperties, resource.getGroups(), NotificationService.NOTI_NONE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (InconsistentException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state,RESOURCE_INVALID_TITLE_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (IdInvalidException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state,rb.getString(\"title\") + \" \" + e.getMessage ());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (OverQuotaException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"overquota\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (ServerOverloadException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (IdUsedException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"notaddreso\") + \" \" + id + rb.getString(\"used2\"));\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t// copying\n\t\t\t\t\t\t\t// pasted to the same folder as before; add \"Copy of \" to the id\n\t\t\t\t\t\t\tif (countNumber > 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName = \"Copy (\" + countNumber + \") of \" + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (countNumber == 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName = \"Copy of \" + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid = collectionId + Validator.escapeResourceName(displayName);\n\t\t\t\t\t\t\tcountNumber++;\n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t}\t// try-catch\n\t\t\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlogger.debug(\"ResourcesAction.doHandlepaste ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\t// if-else\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis8\") + \" \" + originalDisplayName + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\n\t\t\t\tcatch (TypeException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"pasteitem\") + \" \" + originalDisplayName + \" \" + rb.getString(\"mismatch\"));\n\t\t\t\t}\t// try-catch\n\n\t\t\t}\t// for\n\t\t}\t// copy\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// delete sucessful\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t\t// reset the cut flag\n\t\t\tif (((String)state.getAttribute (STATE_CUT_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_CUT_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\n\t\t\t// reset the copy flag\n\t\t\tif (Boolean.toString(true).equalsIgnoreCase((String)state.getAttribute (STATE_COPY_FLAG)))\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\n\t\t\t// try to expand the collection\n\t\t\tSortedSet expandedCollections = (SortedSet) state.getAttribute(STATE_EXPANDED_COLLECTIONS);\n\t\t\tif(expandedCollections == null)\n\t\t\t{\n\t\t\t\texpandedCollections = new TreeSet();\n\t\t\t}\n\t\t\tif(! expandedCollections.contains(collectionId))\n\t\t\t{\n\t\t\t\texpandedCollections.add(collectionId);\n\t\t\t}\n\t\t\tstate.setAttribute(STATE_EXPANDED_COLLECTIONS, expandedCollections);\n\t\t}\n\n\t}", "@Override\n\t\t\tpublic void dragExit(DropTargetEvent e) {\n\t\t\t}", "void onDrop(int from, int to);", "@Override\n\tpublic void drag(EditorInterface i, MouseEvent e) {\n\t\tfor(Clip elem :i.getSelection().getContents()) {\n\t\t\tCommandMove mv=new CommandMove( i,elem,e.getX()-pressed_x, e.getY()-pressed_y);\n\t\t\tlist.add(mv);\n\t\t\tmv.execute();\n\t\t}\n\t\tpressed_x = e.getX();\n\t\tpressed_y = e.getY();\n\t}", "@Override\r\n\t\t\t\t\tpublic void dragEnter(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void dragEnter(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "public void doHandlepasteshortcut ( RunData data)\n\t{\n\t\tParameterParser params = data.getParameters ();\n\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// get the items to be pasted\n\t\tVector pasteItems = new Vector ();\n\n\t\tif (((String) state.getAttribute (STATE_COPY_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t{\n\t\t\tpasteItems = (Vector) ( (Vector) state.getAttribute (STATE_COPIED_IDS)).clone ();\n\t\t}\n\t\tif (((String) state.getAttribute (STATE_CUT_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"choosecp\"));\n\t\t}\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tString collectionId = params.getString (\"collectionId\");\n\n\t\t\tString originalDisplayName = NULL_STRING;\n\n\t\t\tfor (int i = 0; i < pasteItems.size (); i++)\n\t\t\t{\n\t\t\t\tString currentPasteItem = (String) pasteItems.get (i);\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tResourceProperties properties = ContentHostingService.getProperties (currentPasteItem);\n\n\t\t\t\t\toriginalDisplayName = properties.getPropertyFormatted (ResourceProperties.PROP_DISPLAY_NAME);\n\n\t\t\t\t\tif (properties.getProperty (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\t// paste the collection\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// paste the resource\n\t\t\t\t\t\tContentResource resource = ContentHostingService.getResource (currentPasteItem);\n\t\t\t\t\t\tResourceProperties p = ContentHostingService.getProperties(currentPasteItem);\n\t\t\t\t\t\tString displayName = SHORTCUT_STRING + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\tString id = collectionId + Validator.escapeResourceName(displayName);\n\n\t\t\t\t\t\t//int countNumber = 2;\n\t\t\t\t\t\tResourcePropertiesEdit resourceProperties = ContentHostingService.newResourceProperties ();\n\t\t\t\t\t\t// add the properties of the pasted item\n\t\t\t\t\t\tIterator propertyNames = properties.getPropertyNames ();\n\t\t\t\t\t\twhile ( propertyNames.hasNext ())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString propertyName = (String) propertyNames.next ();\n\t\t\t\t\t\t\tif ((!properties.isLiveProperty (propertyName)) && (!propertyName.equals (ResourceProperties.PROP_DISPLAY_NAME)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tresourceProperties.addProperty (propertyName, properties.getProperty (propertyName));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// %%%%% should be _blank for items that can be displayed in browser, _self for others\n\t\t\t\t\t\t// resourceProperties.addProperty (ResourceProperties.PROP_OPEN_NEWWINDOW, \"_self\");\n\t\t\t\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_DISPLAY_NAME, displayName);\n\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tContentResource referedResource= ContentHostingService.getResource (currentPasteItem);\n\t\t\t\t\t\t\tContentResource newResource = ContentHostingService.addResource (id, ResourceProperties.TYPE_URL, referedResource.getUrl().getBytes (), resourceProperties, referedResource.getGroups(), NotificationService.NOTI_NONE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (InconsistentException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, RESOURCE_INVALID_TITLE_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (OverQuotaException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"overquota\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (IdInvalidException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"title\") + \" \" + e.getMessage ());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (ServerOverloadException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (IdUsedException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"notaddreso\") + \" \" + id + rb.getString(\"used2\"));\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t // pasted shortcut to the same folder as before; add countNumber to the id\n\t\t\t\t\t\t\tdisplayName = \"Shortcut (\" + countNumber + \") to \" + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\t\tid = collectionId + Validator.escapeResourceName(displayName);\n\t\t\t\t\t\t\tcountNumber++;\n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t}\t// try-catch\n\t\t\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlogger.debug(\"ResourcesAction.doHandlepasteshortcut ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t// if-else\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis9\") + \" \" + currentPasteItem.substring (currentPasteItem.lastIndexOf (Entity.SEPARATOR)+1) + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\n\t\t\t\tcatch (TypeException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"pasteitem\") + \" \" + currentPasteItem.substring (currentPasteItem.lastIndexOf (Entity.SEPARATOR)+1) + \" \" + rb.getString(\"mismatch\"));\n\t\t\t\t}\t// try-catch\n\n\t\t\t}\t// for\n\t\t}\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tif (((String) state.getAttribute (STATE_COPY_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\t// reset the copy flag\n\t\t\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\n\t\t\t// paste shortcut sucessful\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\t\t}\n\n\t}", "public interface DragAndDropHelperAdapter {\n\n boolean onItemMove (int fromPosition, int toPosition);\n\n void onItemDismiss(int position);\n}", "public void dropItem(final String pStringItem){this.aItemsList.dropItem(pStringItem);}", "@Override\r\n public void dragExit(DragSourceEvent e) {\n DragSourceContext ctx = e.getDragSourceContext();\r\n ctx.setCursor(DragSource.DefaultCopyNoDrop);\r\n }", "@Override\n\tpublic void handleDroppedCFComponent(CFComponent component) {\n\n\t}", "@Override\r\n public void dragExit(DropTargetEvent dte) {}", "public interface DropListener {\n\t\n\t/**\n\t * Called when an item is to be dropped.\n\t * @param from - index item started at.\n\t * @param to - index to place item at.\n\t */\n\tvoid onDrop(int from, int to);\n}", "@Override\r\n public void dragEnter(DropTargetDragEvent dtde) {}", "public void onDragEnded();", "@Override\n public void onDragStarted(int position) {\n }", "@Override\r\n\t\tpublic void dragExit(DropTargetEvent dte) {\n\t\t\t\r\n\t\t}", "private void setEvents() {\n \n // On drag detected event (the start of a drag and drop)\n this.setOnDragDetected( e-> {\n if(this.dragEnabled) {\n Dragboard db;\n \n // if on board transfer mode is move, if from the pieces box, copy\n if(this.isOnBoard) { db = startDragAndDrop(TransferMode.MOVE); }\n else { db = startDragAndDrop(TransferMode.COPY); }\n \n ClipboardContent content = new ClipboardContent();\n content.putString(toString());\n db.setContent(content);\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag started on \"); }\n this.startFullDrag();\n }\n e.consume();\n });\n \n // Mouse dragover event handler (for accepting a drag and drop)\n this.setOnDragOver(new EventHandler<DragEvent>() {\n @Override\n public void handle(DragEvent event) {\n if(dropEnabled) {\n Dragboard db = event.getDragboard();\n if (db.hasString()) {\n event.acceptTransferModes(TransferMode.COPY_OR_MOVE);\n }\n event.consume();\n }\n }\n });\n \n // Drag over entered event ( mouse is dragging over this)\n this.setOnDragEntered(e -> {\n if(dropEnabled) {\n\n // setting color to \"highlight\" square mouse is over\n Color c = Color.MAGENTA;\n setBorderColor(c);\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag entered \");}\n }\n });\n\n // Drag over exited event ( mouse is no longer dragging over this)\n this.setOnDragExited(e -> {\n if(dropEnabled) {\n\n // reseting to stored color value (mouse drag no longer over)\n setBorderColor(this.borderColor);\n e.consume();\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag exited \"); }\n }\n });\n \n // Drag over dropped event (the drag and drop event is completed)\n this.setOnDragDropped(e -> {\n Dragboard db = e.getDragboard();\n boolean success = false;\n int toPieceIndex = pieceIndex; // saving previous piece\n if(db.hasString() && this.dropEnabled) {\n \n //TODO check with controller for valid position\n \n boolean moved = false;\n \n String rawInfo = db.getString();\n String[] info = rawInfo.split(\" \");\n this.playerColor = Color.web(info[5]);\n isVisible = (info[6].substring(0, 4).equals(\"true\"));\n int fromPieceIndex = Integer.parseInt(info[0]);\n int fromRow = StrategoView.translate(Integer.parseInt(info[1]));\n int fromCol = StrategoView.translate(Integer.parseInt(info[2]));\n int toRow = StrategoView.translate(row);\n int toCol = StrategoView.translate(col);\n // getting whether the moved piece came from the board (true) or the pieces box (false)\n boolean fromBoard = (info[4].substring(0, 4).equals(\"true\"));\n if(fromBoard) {\n \n // requesting movement from controller\n if(Piece.isMoveValid(fromRow, fromCol, toRow, toCol, PieceView.convertPieceIndexToType(fromPieceIndex))) {\n // piece will move\n //this.show();\n //controller.getPosition(fromRow, fromCol);\n \n }\n moved = controller.movePiece(fromRow, fromCol, toRow, toCol);\n \n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) {\n if(!moved) {\n System.out.println(\"Not moved (from controller)\");\n }\n System.out.printf(\"From Piece index: %d \", fromPieceIndex);\n System.out.printf(\"To Piece index: %d \", toPieceIndex);\n }\n \n \n }else { // Not from board (placed during setup)\n moved = true;\n this.pieceIndex = fromPieceIndex;\n update();\n if(toPieceIndex != pieceIndex){ // if pieced placed is not the same piece already there\n StrategoView.updateLabels(pieceIndex, -1); // decrement count of new piece\n \n if(toPieceIndex >= 0) { // If position on board was occupied by another piece\n StrategoView.updateLabels(toPieceIndex, 1); // increment count of old piece\n }\n }\n // Changing border color value (drag over exit event will actually set the border color)\n this.borderColor = Color.web(info[3]);\n\n }\n if(moved) {\n success = true;\n }\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) {\n System.out.print(\"Drag ended on \");\n System.out.printf(\"String: %s %s %s\\n\", info[0], info[1], info[2]);\n System.out.printf(\"Dropped on row %d and col %d\\n\", row, col);\n }\n \n }\n e.setDropCompleted(success);\n \n e.consume();\n \n });\n }", "@Override\n\tpublic void editorCut()\n\t{\n\t\teditorCopy();\n\t\teditorInsert(\"\");\n\t\tSystem.out.println(\"DEBUG: performing Cut\") ;\n\t}", "@Override\n\tpublic void receiveDrop ( String dropString ) {\n\t\taddAttribute ( WidgetAttribute.valueOf ( dropString ) ) ;\n\t}", "public void onTextCopy()\n\t{\n\t}", "@Override \n\tprotected boolean inputDrop(View view, DragEvent event)\n\t{// Remove the dropped item from the input\n\t\t// First, reset the input\n\t\tcontroller.input().setDrawables(MetaInputGrid.BODY, controller.drag().getBodyDrawables());\n\t\tcontroller.input().setDrawables(MetaInputGrid.EMOTE, controller.drag().getEmoteDrawables());\n\t\tcontroller.input().notifyDataSetChanged();\n\t\tcontroller.drag().setPivot(null); // This will ensure that InputOnDragListener does not reset the drawables\n\t\t\n\t\t// Next, remove the input\n\t\tcontroller.input().remove(controller.drag().getPosition());\n\t\t\n\t\t// Finally, Reset background and re render\n\t\tview.setBackgroundColor(CLEAR);\n\t\tcontroller.input().notifyDataSetChanged();\n\t\t\n\t\treturn true;\n\t}", "@Override\n\tprotected void handleDrop() {\n\t\tif (getTargetEditPart() instanceof CrosstabEditPart) {\n\t\t\tMCrosstab crosstabModel = (MCrosstab) ((EditPart)getTargetEditPart()).getModel();\n\t\t\tTemplateStyle style = (TemplateStyle) IOUtils.readFromByteArray((byte[])getCurrentEvent().data);\n\t\t\tif (style != null && style instanceof CrosstabStyle){\n\t\t\t\tCrosstabStyle selectedStyle = (CrosstabStyle) style;\n\t\t\t\tif (crosstabModel != null) {\n\t\t\t\t\tShell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();\n\t\t\t\t\tMessageDialog question = new MessageDialog(shell, Messages.EditCrosstabStyleAction_questionTitle, null, Messages.EditCrosstabStyleAction_questionText, MessageDialog.QUESTION, \n\t\t\t\t\t\t\tnew String[]{Messages.EditCrosstabStyleAction_questionUpdate, \n\t\t\t\t\t\t\t\t\t\t Messages.EditCrosstabStyleAction_questionNewStyles, \n\t\t\t\t\t\t\t\t\t\t Messages.EditCrosstabStyleAction_questionCancel}, 0);\n\t\t\t\t\tint response = question.open();\n\t\t\t\t\t// response == 0 update the old styles, response == 1 create new styles, response == 2 cancel the operation\n\t\t\t\t\tif (response == 0 || response == 1) {\n\t\t\t\t\t\tUpdateCrosstabStyleCommand updateCommand = new UpdateCrosstabStyleCommand(crosstabModel, selectedStyle,response == 0);\n\t\t\t\t\t\tCommandStack cs = getCommandStack();\n\t\t\t\t\t\tif (cs!=null) cs.execute(updateCommand);\n\t\t\t\t\t\telse updateCommand.execute();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean onDrag(View v, DragEvent event) {\n final int action = event.getAction();\n System.out.println(\"default listView ondrag listener启动\");\n\n // Handles each of the expected events\n switch(action) {\n case DragEvent.ACTION_DRAG_STARTED:\n // Determines if this View can accept the dragged data\n if (event.getClipDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) {\n v.invalidate();\n return true;\n }\n return false;\n case DragEvent.ACTION_DRAG_ENTERED:\n\n v.setBackgroundColor(Color.parseColor(\"#dbdbdb\"));\n v.invalidate();\n\n return true;\n\n case DragEvent.ACTION_DRAG_LOCATION:\n return true;\n\n case DragEvent.ACTION_DRAG_EXITED:\n v.setBackgroundColor(Color.TRANSPARENT);\n v.invalidate();\n return true;\n\n case DragEvent.ACTION_DROP:\n\n v.setBackgroundColor(Color.TRANSPARENT);\n // Gets the item containing the dragged data\n ClipData.Item item1 = event.getClipData().getItemAt(0);\n ClipData.Item item2 = event.getClipData().getItemAt(1);\n String source_criteriaName = item1.getText().toString();\n int source_criteriaIndex = Integer.parseInt(item2.getText().toString());\n\n\n int whichList = findWhichCriteriaList_itbelongs(source_criteriaName);\n switch (whichList)\n {\n case 0:\n break;\n case 1:\n Criteria criteria_Temporary = project.getCriteria().get(source_criteriaIndex);\n project.getCriteria().remove(source_criteriaIndex);\n defaultCriteriaList.add(criteria_Temporary);\n break;\n case 2:\n Criteria criteria_Temporary2 = project.getCommentList().get(source_criteriaIndex);\n project.getCommentList().remove(source_criteriaIndex);\n defaultCriteriaList.add(criteria_Temporary2);\n break;\n default:\n ;\n }\n\n init();\n\n // Invalidates the view to force a redraw\n v.invalidate();\n\n // Returns true. DragEvent.getResult() will return true.\n return true;\n\n case DragEvent.ACTION_DRAG_ENDED:\n\n // Turns off any color tinting\n // Invalidates the view to force a redraw\n v.invalidate();\n\n // returns true; the value is ignored.\n return true;\n // An unknown action type was received.\n default:\n Log.e(\"DragDrop Example\",\"Unknown action type received by OnDragListener.\");\n break;\n }\n return false;\n }", "@Override\n public void handle(DragEvent event) {\n Dragboard db = event.getDragboard();\n\n if (event.getGestureSource() != skin.getScrollPane() && db.hasString()) {\n event.acceptTransferModes(TransferMode.COPY);\n }\n event.consume();\n }", "public void mouseUp() {\n getSelectedRange().setPublishChange(true);\n startDragPositionDate = null;\n getSelectedRange().publishChange();\n }", "@Override\n public void onViewDragged(int oldPosition, int newPosition) {\n EventTask tempEventTask = new EventTask(eventTasks.get(oldPosition));\n eventTasks.remove(oldPosition);\n eventTasks.add(newPosition, tempEventTask);\n notifyItemMoved(oldPosition, newPosition);\n }", "public void \tdragOver(DropTargetDragEvent dtde){}", "public void onDrag(int dragSource, int dropTarget) {\n\t}", "private void dragDownToAdd() {\n ItemTouchHelper.SimpleCallback itemTouchHelperCallback =\n new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.DOWN) {\n\n @Override\n public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder,\n RecyclerView.ViewHolder target) {\n return true;\n }\n\n @Override\n public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {\n if (viewHolder != null) {\n final View cardView =\n ((HorizontalCompanyListAdapter.ViewHolder) viewHolder).cardView;\n getDefaultUIUtil().onSelected(cardView);\n }\n }\n\n @Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {\n\n final Company temp = dashboardCompanies.get(viewHolder.getAdapterPosition());\n\n if (!checkDuplicate(comparisonCompaniesAdapter.getDataSet(), temp.getIdentifiers().getTicker())) {\n selectedCompanies.add(temp);\n //adapter.notifyDataSetChanged();\n horizontalCompanyListAdapter.removeItem(viewHolder.getAdapterPosition());\n comparisonCompaniesAdapter.addItem(temp);\n }\n }\n\n @Override\n public void clearView(RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder) {\n final View cardView =\n ((HorizontalCompanyListAdapter.ViewHolder) viewHolder).cardView;\n getDefaultUIUtil().clearView(cardView);\n }\n\n @Override\n public void onChildDraw(Canvas c, RecyclerView recyclerView,\n RecyclerView.ViewHolder viewHolder, float dX, float dY,\n int actionState, boolean isCurrentlyActive) {\n\n final View cardView =\n ((HorizontalCompanyListAdapter.ViewHolder) viewHolder).cardView;\n\n getDefaultUIUtil().onDraw(c, recyclerView,\n cardView, dX, dY, actionState, isCurrentlyActive);\n }\n\n @SuppressWarnings(\"EmptyMethod\")\n @Override\n public int convertToAbsoluteDirection(int flags, int layoutDirection) {\n return super.convertToAbsoluteDirection(flags, layoutDirection);\n }\n };\n\n // attaching the touch helper to recycler view\n ItemTouchHelper mItemTouchHelper = new ItemTouchHelper(itemTouchHelperCallback);\n mItemTouchHelper.attachToRecyclerView(dashboardCompaniesRecyclerView);\n }", "@Override\r\n\t\tpublic void dragEnter(DropTargetDragEvent dtde) {\n\t\t\t\r\n\t\t}", "public void dragDropEnd(DragSourceDropEvent evt) {\n }", "@Override\n\tpublic void onDragEnd(boolean success) {\n\t\t\n\t}", "public void dragOver(DropTargetDragEvent dtde) {\n // empty\n }", "public boolean execute(DropTargetDropEvent evt) {\n\t\t\tdropIt();\n\n\t\t\treturn true;\n\t\t}", "@Override\n public void paste() {\n super.paste();\n pasteActionHandler.handle();\n }", "@Override\r\n\tpublic void onDrop(final DragContext context) {\r\n\t\tsuper.onDrop(context);\r\n\r\n\t\tfor (Element elem : highlightedCells) {\r\n\t\t\tif (elem != null) {\r\n//\t\t\t\tDOM.setStyleAttribute(elem, BACKGROUND, \"#FFFFFF\");\r\n\t\t\t\telem.getStyle().setBackgroundColor(\"#FFFFFF\");\r\n\t\t\t}\r\n\t\t}\r\n\t\thighlightedCells = null;\r\n\r\n\t\tDraggable draggable = draggableList.get(0);\r\n\r\n\t\tBooking appointment = ((BookingWidget) context.draggable).getAppointment();\r\n\r\n\t\tlong originalStartToEndTimeDistance = appointment.getEnd().getTime() - appointment.getStart().getTime();\r\n\r\n\t\t// get the column and row for the draggable widget\r\n\t\tint row = getRow(context, draggable) - 1;\r\n\t\tint col = getColumn(context, draggable);\r\n\t\tint cell = row * daysPerWeek + col;\r\n\r\n\t\t// calculate the new start & end dates\r\n\t\tDate newStart = DateUtils.shiftDate(firstDateDisplayed, cell);\r\n\t\tDateUtils.copyTime(appointment.getStart(), newStart);\r\n\r\n\t\tDate newEnd = new Date(newStart.getTime() + originalStartToEndTimeDistance);\r\n\r\n\t\t// Set the appointment's new start & end dates\r\n\t\tappointment.setStart(newStart);\r\n\t\tappointment.setEnd(newEnd);\r\n\t}", "@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t}", "protected abstract boolean dragged();", "public void drop(DropTargetDropEvent dtde){\n if(draggedFile!=null){\n log.info(\"MotionViewer.drop(): opening file \"+draggedFile);\n try{\n recentFiles.addFile(draggedFile);\n getPlayer().startPlayback(draggedFile);\n }catch(FileNotFoundException e){\n e.printStackTrace();\n }\n }\n }", "@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}", "private void enableStorageItemsDragAndDrop() {\n storageItemsTable.setRowFactory(tableView -> {\n TableRow<StorageItem> row = new TableRow<>();\n\n row.setOnDragDetected(event -> {\n StorageItem item = tableView.getSelectionModel().getSelectedItem();\n if (!row.isEmpty()) {\n Dragboard dragboard = row.startDragAndDrop(TransferMode.MOVE);\n dragboard.setDragView(row.snapshot(null, null));\n ClipboardContent clipboardContent = new ClipboardContent();\n Integer storagePosition = item.getStoragePosition();\n clipboardContent.put(SERIALIZED_MIME_TYPE, storagePosition);\n dragboard.setContent(clipboardContent);\n event.consume();\n }\n });\n\n row.setOnDragOver(event -> {\n Dragboard dragboard = event.getDragboard();\n if (dragboard.hasContent(SERIALIZED_MIME_TYPE)) {\n if (!row.isEmpty()) {\n int actualPosition = row.getItem().getStoragePosition();\n if (actualPosition != (Integer) dragboard.getContent(SERIALIZED_MIME_TYPE)) {\n event.acceptTransferModes(TransferMode.COPY_OR_MOVE);\n event.consume();\n }\n }\n }\n });\n\n row.setOnDragDropped(event -> {\n Dragboard dragboard = event.getDragboard();\n if (dragboard.hasContent(SERIALIZED_MIME_TYPE)) {\n int draggedPosition = (int) dragboard.getContent(SERIALIZED_MIME_TYPE);\n\n int droppedPosition = row.isEmpty() ? Integer.MAX_VALUE : row.getItem().getStoragePosition();\n relocateStorageItem(draggedPosition, droppedPosition);\n\n event.setDropCompleted(true);\n event.consume();\n\n storageItemsTable.getSelectionModel().select(row.getItem());\n }\n });\n\n return row;\n });\n }", "public static void doPasteitem ( RunData data)\n\t{\n\t\tParameterParser params = data.getParameters ();\n\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// get the copied item to be pasted\n\t\tString itemId = params.getString(\"itemId\");\n\n\t\tString collectionId = params.getString (\"collectionId\");\n\n\t\tString originalDisplayName = NULL_STRING;\n\n\t\ttry\n\t\t{\n\t\t\tResourceProperties properties = ContentHostingService.getProperties (itemId);\n\t\t\toriginalDisplayName = properties.getPropertyFormatted (ResourceProperties.PROP_DISPLAY_NAME);\n\n\t\t\t// copy, cut and paste not operated on collections\n\t\t\tif (properties.getProperty (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tString alert = (String) state.getAttribute(STATE_MESSAGE);\n\t\t\t\tif (alert == null || ((alert != null) && (alert.indexOf(RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING) == -1)))\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// paste the resource\n\t\t\t\tContentResource resource = ContentHostingService.getResource (itemId);\n\t\t\t\tResourceProperties p = ContentHostingService.getProperties(itemId);\n\t\t\t\tString displayName = DUPLICATE_STRING + p.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\n\t\t\t\tString newItemId = ContentHostingService.copyIntoFolder(itemId, collectionId);\n\n\t\t\t\tContentResourceEdit copy = ContentHostingService.editResource(newItemId);\n\t\t\t\tResourcePropertiesEdit pedit = copy.getPropertiesEdit();\n\t\t\t\tpedit.addProperty(ResourceProperties.PROP_DISPLAY_NAME, displayName);\n\t\t\t\tContentHostingService.commitResource(copy, NotificationService.NOTI_NONE);\n\n\t\t\t}\t// if-else\n\t\t}\n\t\tcatch (PermissionException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notpermis8\") + \" \" + originalDisplayName + \". \");\n\t\t}\n\t\tcatch (IdUnusedException e)\n\t\t{\n\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t}\n\t\tcatch (IdUsedException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notaddreso\") + \" \" + originalDisplayName + \" \" + rb.getString(\"used2\"));\n\t\t}\n\t\tcatch(IdLengthException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"toolong\") + \" \" + e.getMessage());\n\t\t}\n\t\tcatch(IdUniquenessException e)\n\t\t{\n\t\t\taddAlert(state, \"Could not add this item to this folder\");\n\t\t}\n\t\tcatch (InconsistentException ee)\n\t\t{\n\t\t\taddAlert(state, RESOURCE_INVALID_TITLE_STRING);\n\t\t}\n\t\tcatch(InUseException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"someone\") + \" \" + originalDisplayName + \". \");\n\t\t}\n\t\tcatch(OverQuotaException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"overquota\"));\n\t\t}\n\t\tcatch(ServerOverloadException e)\n\t\t{\n\t\t\t// this represents temporary unavailability of server's filesystem\n\t\t\t// for server configured to save resource body in filesystem\n\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t}\n\t\tcatch (TypeException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"pasteitem\") + \" \" + originalDisplayName + \" \" + rb.getString(\"mismatch\"));\n\t\t}\t// try-catch\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// delete sucessful\n\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\tif(MODE_HELPER.equals(mode))\n\t\t\t{\n\t\t\t\tstate.setAttribute(STATE_RESOURCES_HELPER_MODE, MODE_ATTACHMENT_SELECT);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\t\t\t}\n\n\t\t\t// try to expand the collection\n\t\t\tSortedSet expandedCollections = (SortedSet) state.getAttribute(STATE_EXPANDED_COLLECTIONS);\n\t\t\tif(! expandedCollections.contains(collectionId))\n\t\t\t{\n\t\t\t\texpandedCollections.add(collectionId);\n\t\t\t}\n\n\t\t\t// reset the copy flag\n\t\t\tif (((String)state.getAttribute (STATE_COPY_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\t\t}\n\n\t}", "private void onAdd()\n {\n // get the source list selection\n Object selection[] = _lstSource.getSelectedValues();\n\n // iterate the selection\n EntityDobj table;\n TransferEntity te;\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n table = (EntityDobj)selection[i];\n if(table != null)\n {\n // create new te\n te = new TransferEntity();\n te.setSourceEntityName(table.getName());\n\n // add to the target list and the datasource\n _lstTarget.addItem(te);\n _dt.addTransferEntity(te);\n }\n }\n\n // remove the selection from the source list\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n table = (EntityDobj)selection[i];\n if(table != null)\n _lstSource.removeItem(table);\n }\n }", "public void performPaste() {\n \t\ttext.paste();\n \t\tcheckSelection();\n \t\tcheckDeleteable();\n \t\tcheckSelectable();\n \t}", "public void changeIconDropStatus() { dropped = !dropped; }", "public void handle(DragEvent event) {\n if (currentlyDraggedType == draggableType) {\n // problem = event is drop completed is false when should be true...\n // https://bugs.openjdk.java.net/browse/JDK-8117019\n // putting drop completed at start not making complete on VLAB...\n\n // Data dropped\n // If there is an image on the dragboard, read it and use it\n Dragboard db = event.getDragboard();\n Node node = event.getPickResult().getIntersectedNode();\n if (node != targetGridPane && db.hasImage()) {\n\n Integer cIndex = GridPane.getColumnIndex(node);\n Integer rIndex = GridPane.getRowIndex(node);\n int x = cIndex == null ? 0 : cIndex;\n int y = rIndex == null ? 0 : rIndex;\n // Places at 0,0 - will need to take coordinates once that is implemented\n ImageView image = new ImageView(db.getImage());\n\n int nodeX = GridPane.getColumnIndex(currentlyDraggedImage);\n int nodeY = GridPane.getRowIndex(currentlyDraggedImage);\n switch (draggableType) {\n case CARD:\n if (canBuildingPlace(nodeX, nodeY, x, y)) {\n removeDraggableDragEventHandlers(draggableType, targetGridPane);\n // TODO = spawn a building here of different types\n Building newBuilding = convertCardToBuildingByCoordinates(nodeX, nodeY, x, y);\n onLoad(newBuilding);\n } else {\n // draggedEntity.relocateToPoint(new Point2D(event.getSceneX(),\n // event.getSceneY()));\n // throw new NullPointerException(\"Can't drop!\");\n return;\n }\n break;\n case ITEM:\n if (unequippedInventory.getChildren().contains(currentlyDraggedImage)) {\n // Equip the item\n Entity item = world.getUnequippedInventoryItemEntityByCoordinates(nodeX, nodeY);\n if (!canEquipItem(item, x, y, targetGridPane)) return;\n removeDraggableDragEventHandlers(draggableType, targetGridPane);\n removeItemByCoordinates(nodeX, nodeY);\n unequippedInventory.getChildren().remove(currentlyDraggedImage);\n addDragEventHandlers(image, DRAGGABLE_TYPE.ITEM, equippedItems,\n unequippedInventory);\n targetGridPane.add(image, x, y, 1, 1);\n equipItemsRecord.put(item, image);\n world.equipItem(item);\n world.addEquippedInventoryItem(item);\n } else {\n // Destroy the item\n equipItemsRecord.remove(world.getEquippedInventoryItemEntityByCoordinates(nodeX, nodeX));\n removeDraggableDragEventHandlers(draggableType, targetGridPane);\n removeEquippedItemByCoordinates(nodeX, nodeX);\n }\n break;\n default:\n break;\n }\n draggedEntity.setVisible(false);\n draggedEntity.setMouseTransparent(false);\n currentlyDraggedImage = null;\n currentlyDraggedType = null;\n\n // remove drag event handlers before setting currently dragged image to null\n printThreadingNotes(\"DRAG DROPPED ON GRIDPANE HANDLED\");\n }\n }\n event.setDropCompleted(true);\n // consuming prevents the propagation of the event to the anchorPaneRoot (as a\n // sub-node of anchorPaneRoot, GridPane is prioritized)\n // https://openjfx.io/javadoc/11/javafx.base/javafx/event/Event.html#consume()\n // to understand this in full detail, ask your tutor or read\n // https://docs.oracle.com/javase/8/javafx/events-tutorial/processing.htm\n event.consume();\n }", "@Override\n public void mouseDragged(MouseEvent arg0) {\n \n }", "@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}", "@Override\n \tpublic void itemMoved(VisualItem item, MouseEvent e) {\n \t\tif (item instanceof AggregateItem)\n \t\t\tmouseMoved(e);\n \t}", "public void mouseDragged(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager.defaultManager().processMouseEvent(e); }", "public void dropItemAtCurrentPlace(Item it)\r\n\t{\r\n\t\tthis.currentPlace.addItem(it);\r\n\t}", "@Override\n public boolean onLongClick(View view) {\n ClipData.Item item = new ClipData.Item((CharSequence) view.getTag());\n\n // Create a new ClipData using the tag as a label, the plain text MIME type, and\n // the already-created item. This will create a new ClipDescription object within the\n // ClipData, and set its MIME type entry to \"text/plain\"\n String[] mimeTypes = {ClipDescription.MIMETYPE_TEXT_PLAIN};\n\n ClipData data = new ClipData(view.getTag().toString(), mimeTypes, item);\n\n // Instantiates the drag shadow builder.\n View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);\n\n // Starts the drag\n view.startDrag(data//data to be dragged\n , shadowBuilder //drag shadow\n , view//local data about the drag and drop operation\n , 0//no needed flags\n );\n\n //Set view visibility to INVISIBLE as we are going to drag the view\n view.setVisibility(View.INVISIBLE);\n return true;\n }", "public static void doPasteitems ( RunData data)\n\t{\n\t\tParameterParser params = data.getParameters ();\n\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\tList items = (List) state.getAttribute(STATE_COPIED_IDS);\n\n\t\tString collectionId = params.getString (\"collectionId\");\n\n\t\tIterator itemIter = items.iterator();\n\t\twhile (itemIter.hasNext())\n\t\t{\n\t\t\t// get the copied item to be pasted\n\t\t\tString itemId = (String) itemIter.next();\n\n\t\t\tString originalDisplayName = NULL_STRING;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tString id = ContentHostingService.copyIntoFolder(itemId, collectionId);\n\t\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\t\tif(MODE_HELPER.equals(mode))\n\t\t\t\t{\n\t\t\t\t\tString helper_mode = (String) state.getAttribute(STATE_RESOURCES_HELPER_MODE);\n\t\t\t\t\tif(helper_mode != null && MODE_ATTACHMENT_NEW_ITEM.equals(helper_mode))\n\t\t\t\t\t{\n\t\t\t\t\t\t// add to the attachments vector\n\t\t\t\t\t\tList attachments = EntityManager.newReferenceList();\n\t\t\t\t\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(id));\n\t\t\t\t\t\tattachments.add(ref);\n\t\t\t\t\t\tcleanupState(state);\n\t\t\t\t\t\tstate.setAttribute(STATE_ATTACHMENTS, attachments);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(state.getAttribute(STATE_ATTACH_LINKS) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattachItem(id, state);\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\tattachLink(id, state);\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\tcatch (PermissionException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"notpermis8\") + \" \" + originalDisplayName + \". \");\n\t\t\t}\n\t\t\tcatch (IdUnusedException e)\n\t\t\t{\n\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t}\n\t\t\tcatch (InUseException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"someone\") + \" \" + originalDisplayName);\n\t\t\t}\n\t\t\tcatch (TypeException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"pasteitem\") + \" \" + originalDisplayName + \" \" + rb.getString(\"mismatch\"));\n\t\t\t}\n\t\t\tcatch(IdUsedException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"toomany\"));\n\t\t\t}\n\t\t\tcatch(IdLengthException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"toolong\") + \" \" + e.getMessage());\n\t\t\t}\n\t\t\tcatch(IdUniquenessException e)\n\t\t\t{\n\t\t\t\taddAlert(state, \"Could not add this item to this folder\");\n\t\t\t}\n\t\t\tcatch(ServerOverloadException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t}\n\t\t\tcatch(InconsistentException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"recursive\") + \" \" + itemId);\n\t\t\t}\n\t\t\tcatch (OverQuotaException e)\n\t\t\t{\n\t\t\t\taddAlert(state, rb.getString(\"overquota\"));\n\t\t\t}\t// try-catch\n\t\t\tcatch(RuntimeException e)\n\t\t\t{\n\t\t\t\tlogger.debug(\"ResourcesAction.doPasteitems ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t}\n\n\t\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t\t{\n\t\t\t\t// delete sucessful\n\t\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\t\tif(MODE_HELPER.equals(mode))\n\t\t\t\t{\n\t\t\t\t\tstate.setAttribute(STATE_RESOURCES_HELPER_MODE, MODE_ATTACHMENT_SELECT);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\t\t\t\t}\n\n\t\t\t\t// try to expand the collection\n\t\t\t\tSortedSet expandedCollections = (SortedSet) state.getAttribute(STATE_EXPANDED_COLLECTIONS);\n\t\t\t\tif(! expandedCollections.contains(collectionId))\n\t\t\t\t{\n\t\t\t\t\texpandedCollections.add(collectionId);\n\t\t\t\t}\n\n\t\t\t\t// reset the copy flag\n\t\t\t\tif (((String)state.getAttribute (STATE_COPY_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t\t{\n\t\t\t\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public void dragOver(DropTargetDragEvent dtde) {\n\t\t\n\t}" ]
[ "0.6851035", "0.67943364", "0.6777324", "0.67620903", "0.67266935", "0.6712614", "0.66219264", "0.66189367", "0.6593218", "0.6564389", "0.6544195", "0.6485343", "0.64788467", "0.6476779", "0.6442751", "0.6421693", "0.64172566", "0.6410204", "0.6396535", "0.63864577", "0.6290534", "0.627638", "0.62653285", "0.6239842", "0.6235957", "0.62259835", "0.62253624", "0.62193066", "0.6214449", "0.6200396", "0.6177644", "0.6162912", "0.61627287", "0.61317694", "0.6088423", "0.6079602", "0.6064924", "0.605558", "0.6050057", "0.60494465", "0.60489434", "0.6045555", "0.6043818", "0.6040079", "0.60347825", "0.6018334", "0.6012301", "0.60117066", "0.6011597", "0.6000254", "0.59834313", "0.5976315", "0.5962933", "0.5962454", "0.595702", "0.59310013", "0.5926441", "0.5920317", "0.59182537", "0.59156156", "0.5914823", "0.5913148", "0.5911774", "0.59096557", "0.59025735", "0.5900216", "0.5897096", "0.58966637", "0.5888465", "0.58857006", "0.5877344", "0.5873947", "0.58519346", "0.5851531", "0.58473563", "0.583817", "0.58285475", "0.5825221", "0.58236635", "0.582158", "0.58170056", "0.580865", "0.58033246", "0.5798846", "0.5798846", "0.5798846", "0.57896036", "0.5786052", "0.5784482", "0.57840174", "0.57800955", "0.5771837", "0.5771536", "0.5767525", "0.5767525", "0.57647", "0.5758439", "0.575379", "0.57526577", "0.57519287", "0.57511944" ]
0.0
-1
if drop is not enabled, always return false
public boolean canImport(JComponent c, DataFlavor[] flavors) { if (!dropEnabled) { return false; } // loop over the flavors list in an attempt to find a matching flavor for (int i = 0; i < flavors.length; i++) { if (MediaItemsTransferable.flavor.equals(flavors[i])) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDropEnabled(boolean enabled) { this.dropEnabled = enabled; }", "public boolean canDrop(){\n return this.collectedItems < STORAGE_AMOUNT && System.currentTimeMillis() - lastDrop >= delayInMillis;\n }", "public boolean isDropped();", "public boolean isDropper() {\n return this.type == Type.DROPPER;\n }", "@java.lang.Override\n public boolean getCausesDrop() {\n return causesDrop_;\n }", "@java.lang.Override\n public boolean getCausesDrop() {\n return causesDrop_;\n }", "public boolean isDropped(){\r\n\t\treturn getDirectHolder() == World.world;\r\n\t}", "public boolean execute(DropTargetDropEvent evt) {\n\t\t\tdropIt();\n\n\t\t\treturn true;\n\t\t}", "@Override\n\tpublic boolean isDropOk () {\n\t\treturn isAllowed ( selectedAttribute ) ;\n\t}", "@java.lang.Override\n public boolean hasDrop() {\n return stepInfoCase_ == 15;\n }", "@Override\r\n\t\tpublic boolean validateDrop(Object target, int operation, TransferData transferType) {\n\t\t\treturn true;\r\n\t\t}", "@java.lang.Override\n public boolean hasDrop() {\n return stepInfoCase_ == 15;\n }", "public boolean isSetDrop_priv() {\n return this.__isset.drop_priv;\n }", "public boolean canStartDrag()\n\t{\n\t\treturn !isDragging();\n\t}", "public boolean isDroppedOnMap() { return dropped; }", "boolean isDrooping();", "public boolean isKeepNBTOnDrop() {\n\t\treturn true;\n\t}", "public boolean getDropStop () {\r\n return dropStop;\r\n }", "public boolean isDrooping() {\n return false;\n }", "public void setDropped(boolean dropped);", "protected boolean isAcceptableDropLocation(DropTargetDragEvent dtde) {\n OtDragDropObject ddo = OtTreeDragSource._dragObject;\n if (ddo == null) {\n return false;\n }\n\n // MFO from ot-0.5\n // get the node under the mouse\n OtTreeNodeWidget node = getNode(dtde.getLocation());\n if (node == null) {\n return false;\n }\n\n return (getSpInsertData(ddo, node) != null);\n }", "public boolean drops() {\r\n\t\tboolean res = drops;\r\n\t\tif(drops) {\r\n\t\t\tRandom r = new Random();\r\n\t\t\tint rand = r.nextInt(2);\r\n\t\t\tres = rand == 0;\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public static boolean useDragAndDrop() {\n\t\treturn (isMac() || isWindows() || isLinux() || isSolaris());\n\t}", "public boolean getDrops() {\r\n\t\treturn drops;\r\n\t}", "boolean hasBonusItemDrop();", "public boolean canSlotDrop(int num) {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean dropTable() {\n\t\treturn false;\r\n\t}", "public boolean poolTransfer() {\n \t\treturn !isTransfering();\n \t}", "protected static boolean canAccomodateItemDrop(Block block) {\n return block.isPassable() || Util.isNotFullBlock(block.getType());\n }", "public boolean isDragging()\n\t{\n\t\treturn dragged != null;\n\t}", "public boolean isDragging( ) {\n\t\tif ( draggable ) {\n\t\t\tif ( dragging ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isDropAcceptable(DropTargetDropEvent e) {\n\t\t\tif ((e.getDropAction() & DnDConstants.ACTION_MOVE) == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Only accept this particular flavor\n\t\t\tif (!e.isDataFlavorSupported(CTransferableTreePath.TREEPATH_FLAVOR)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Do this if you want to prohibit dropping onto the drag source...\n\t\t\tPoint pt = e.getLocation();\n\t\t\tTreePath path = getClosestPathForLocation(pt.x, pt.y);\n\t\t\tlogger.info(path.toString() + \" \" + pathSource.toString());\n\t\t\tif (path.equals(pathSource)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Check whether we're dragging an ancestor into a descendent (not\n\t\t\t// allowed for move)\n\t\t\tif (pathSource.isDescendant(path)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * // Do this if you want to select the best flavor on offer...\n\t\t\t * DataFlavor[] flavors = e.getCurrentDataFlavors(); for (int i = 0;\n\t\t\t * i < flavors.length; i++ ) { DataFlavor flavor = flavors[i]; if\n\t\t\t * (flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType))\n\t\t\t * return true; }\n\t\t\t */\n\t\t\treturn true;\n\t\t}", "public boolean isAllowedAsDragSource()\r\n\t{\r\n\t\treturn tree.getDragMode() == TreeDragMode.NODE;\r\n\t}", "protected boolean modifiersActive(int dropAction) {\n int mods = DragHandler.getModifiers();\n if (mods == DragHandler.UNKNOWN_MODIFIERS) {\n if (dropAction == DragHandler.LINK\n || dropAction == DragHandler.COPY) {\n return true;\n }\n // Can't (yet) distinguish between a forced and a default move\n // without help from DragHandler\n return false;\n }\n return mods != 0;\n }", "@Override\r\n\tprotected boolean canDropLoot() {\r\n\t\treturn false;\r\n\t}", "protected boolean acceptOrRejectDrag(DropTargetDragEvent dtde) {\n int dropAction = dtde.getDropAction();\n int sourceActions = dtde.getSourceActions();\n boolean acceptedDrag = false;\n\n DnDUtils.debugPrintln(\"\\tSource actions are \"\n + DnDUtils.showActions(sourceActions) + \", drop action is \"\n + DnDUtils.showActions(dropAction));\n\n boolean acceptableDropLocation = isAcceptableDropLocation(dtde);\n\n // Reject if the object being transferred or the operations available\n // are not acceptable.\n if (!acceptableType\n || (sourceActions & DnDConstants.ACTION_COPY_OR_MOVE) == 0) {\n DnDUtils.debugPrintln(\n \"Drop target rejecting drag: acceptableType = \"\n + acceptableType);\n dtde.rejectDrag();\n\n } else if (!acceptableDropLocation) {\n // Can only drag to writable directory\n DnDUtils.debugPrintln(\n \"Drop target rejecting drag: no acceptable drop lLocation\");\n dtde.rejectDrag();\n\n } else {\n // Offering an acceptable operation: accept\n DnDUtils.debugPrintln(\"Drop target accepting drag\");\n dtde.acceptDrag(dropAction);\n acceptedDrag = true;\n }\n\n return acceptedDrag;\n }", "private static boolean supportsDnD()\r\n { // Static Boolean\r\n if (supportsDnD == null)\r\n {\r\n boolean support = false;\r\n try\r\n {\r\n //Class arbitraryDndClass = Class.forName(\"java.awt.dnd.DnDConstants\");\r\n support = true;\r\n } // end try\r\n catch (Exception e)\r\n {\r\n support = false;\r\n } // end catch\r\n supportsDnD = new Boolean(support);\r\n } // end if: first time through\r\n return supportsDnD.booleanValue();\r\n }", "static void setNotDraging(){isDraging=false;}", "private boolean isDragOk(DropTargetDragEvent e) {\n\t\tif (!isDragFlavorSupported(e)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint da = e.getDropAction();\n\t\t// we're saying that these actions are necessary\n\t\tif ((da & acceptableActions) == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tFIBDraggable element = (FIBDraggable) e.getTransferable().getTransferData(ElementDrag.DEFAULT_FLAVOR);\n\t\t\tif (element == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tObject source = e.getSource();\n\t\t\tif (source instanceof FIBDropTarget) {\n\t\t\t\treturn element.acceptDragging((FIBDropTarget) source);\n\t\t\t}\n\t\t\treturn false;\n\n\t\t} catch (UnsupportedFlavorException e1) {\n\t\t\tlogger.warning(\"Unexpected: \" + e1);\n\t\t\te1.printStackTrace();\n\t\t\treturn false;\n\t\t} catch (IOException e1) {\n\t\t\tlogger.warning(\"Unexpected: \" + e1);\n\t\t\te1.printStackTrace();\n\t\t\treturn false;\n\t\t} catch (Exception e1) {\n\t\t\tlogger.warning(\"Unexpected: \" + e1);\n\t\t\te1.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isAffectingDropsAndPowerups() {\n \t\treturn level >= Upgrades.SLOW_UPGRADE_NO_AFFECT_DROPS_AND_POWERUPS;\n \t}", "@Override\n public boolean canImport(TransferSupport support) {\n if (isDraggingFromSrcList || !support.isDrop()) {\n return false;\n }\n\n if ((support.getSourceDropActions() & TransferHandler.MOVE) == TransferHandler.MOVE) {\n support.setDropAction(TransferHandler.MOVE);\n return true;\n }\n return false;\n }", "public boolean isDragEnabled() {\n return mDragEnabled;\n }", "private boolean isDragFlavorSupported(DropTargetDragEvent e) {\n\t\tboolean ok = false;\n\t\tif (e.isDataFlavorSupported(ElementDrag.DEFAULT_FLAVOR)) {\n\t\t\tok = true;\n\t\t}\n\t\treturn ok;\n\t}", "protected boolean isAlwaysExperienceDropper() {\n/* 1849 */ return true;\n/* */ }", "public void dragDropEnd(boolean success);", "private boolean processXdndDrop(XClientMessageEvent xclient) {\n if (sourceWindow != xclient.get_data(0)) {\n return false;\n }\n\n if (targetXWindow != null) {\n notifyProtocolListener(targetXWindow, sourceX, sourceY, userAction,\n xclient, MouseEvent.MOUSE_RELEASED);\n }\n\n return true;\n }", "@Override\n\tpublic boolean canDropInventory(IBlockState state)\n\t{\n\t\treturn false;\n\t}", "public void setDropType(DropType dropType) {\n _dropType = dropType;\n }", "@Override\n\tpublic boolean touchDragged(int arg0, int arg1, int arg2) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int arg0, int arg1, int arg2) {\n\t\treturn false;\n\t}", "protected abstract boolean dragged();", "public boolean saveNBTToDroppedItem() {\n return true;\n }", "public Builder setCausesDrop(boolean value) {\n\n causesDrop_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "private boolean isDropped(double value) {\n double tar = rd.nextDouble();\n return value > tar;\n }", "public boolean canImport(TransferSupport sup) \n\t{\n\t\tLoc source = new Loc(get_data(sup));\n\t\tJTable.DropLocation dest = (JTable.DropLocation) sup.getDropLocation();\n\t\treturn can_import(source, dest);\n\t}", "public DropType getDropType() {\n return _dropType;\n }", "public void dropActionChanged(DropTargetDragEvent dtde){}", "@Override\r\n public void doDragOver(DropTargetDragEvent dtde) {\r\n if (!isDragSupported(dtde)) {\r\n dtde.rejectDrag();\r\n return;\r\n }\r\n super.doDragOver(dtde);\r\n }", "@Override\n\tpublic boolean acceptDrop(DragSource source, int x, int y, int xOffset,\n\t\t\tint yOffset, DragView dragView, Object dragInfo) {\n\t\t// An ImageCell accepts a drop if it is empty and if it is part of a\n\t\t// grid.\n\t\t// A free-standing ImageCell does not accept drops.\n\t\t// return mEmpty && (mCellNumber >= 0);\n\t\t// return (mCellNumber >= 0);\n\t\treturn true;\n\t}", "@Override\r\n\t\t\t\t\tpublic void dropAccept(DropTargetEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "protected void checkTransferType(DropTargetDragEvent dtde) {\n acceptableType = false;\n\n if (dtde.isDataFlavorSupported(OtDragDropObject.dataFlavor)) {\n acceptableType = true;\n }\n\n DnDUtils.debugPrintln(\"Data type acceptable - \" + acceptableType);\n }", "@Override\n\tpublic void dragDropped() {\n\n\t}", "public void changeIconDropStatus() { dropped = !dropped; }", "public boolean mayPickup(Player debug1) {\n/* 112 */ return true;\n/* */ }", "@Override\n public boolean shouldDropItemsOnExplosion(Explosion explosion) {\n return super.shouldDropItemsOnExplosion(explosion);\n }", "public boolean canDropFromExplosion(Explosion explosionIn)\n {\n return false;\n }", "@Override\r\n\t\t\tpublic void dropAccept(DropTargetEvent event) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void handleDrop(Player player, Task task, Game game) {\n\t\t\n\t}", "protected boolean isDragAcceptable(DropTargetDropEvent evt) {\n\t\t\treturn (\n\t\t\t\tsuper.isDragAcceptable(evt)\n\t\t\t\t\t&& evt.getTransferable().isDataFlavorSupported(\n\t\t\t\t\t\tQuestionTranferable.QUESTION_FLAVOR));\n\t\t}", "@Override\r\n public void dropActionChanged(DropTargetDragEvent dtde) {}", "@Generated\n @IsOptional\n @Selector(\"tableView:canHandleDropSession:\")\n default boolean tableViewCanHandleDropSession(@NotNull UITableView tableView,\n @NotNull @Mapped(ObjCObjectMapper.class) UIDropSession session) {\n throw new java.lang.UnsupportedOperationException();\n }", "@Override\r\n\t\tpublic void dropActionChanged(DropTargetDragEvent dtde) {\n\t\t\t\r\n\t\t}", "public boolean getIsDraggingPuck() {\n return draggingPuck;\n }", "@Override\r\n public void drop(DropTargetDropEvent dtde) {\r\n onDropFile(dtde);\r\n }", "private boolean isDragOk( final PrintStream out, final DropTargetDragEvent evt )\r\n {\r\n boolean ok = false;\r\n\r\n // Get data flavors being dragged\r\n DataFlavor[] flavors = evt.getCurrentDataFlavors();\r\n\r\n if (flavors.length == 0)\r\n {\r\n log(out, \"FileDrop.isDragOk(): no data flavors.\");\r\n }\r\n\r\n for (int i = 0; i < flavors.length; i++)\r\n {\r\n log(out, \"FileDrop.isDragOk(): flaver[\" + i + \"] = \" + flavors[i].toString());\r\n }\r\n // See if any of the flavors are a file list that match\r\n // int i = 0;\r\n // while( !ok && i < flavors.length )\r\n for (int i = 0; !ok && (i < flavors.length); i++)\r\n { // Is the flavor a file list?\r\n\r\n ok = flavors[i].equals(DataFlavor.javaFileListFlavor);\r\n log(out, \"FileDrop.isDragOk(): flaver[\" + i + \"] \" + ((ok == true) ? \"MATHCES\" : \"DOES NOT MATCH\"));\r\n } // end for: through flavors\r\n\r\n return ok;\r\n }", "public boolean dropTable() {\n boolean success = false;\n if (conn != null) {\n Statement stmt = null;\n\n try {\n stmt = conn.createStatement();\n stmt.execute(\"DROP TABLE sample_table\");\n log.info(\"Deleting sample_table\");\n success = true;\n } catch (SQLException e) {\n log.error(\"Unable to create the database table\", e);\n } finally {\n if (stmt != null) {\n try {\n stmt.close();\n } catch (SQLException e) {\n }\n }\n }\n }\n return success;\n }", "public boolean onDragStarted();", "boolean hasPlainTransferFrom();", "private boolean canDropOrganiserObject(IOrganiserObject object, TreeItem targetTreeItem) {\n if(targetTreeItem == null) { // Root tree\n return true;\n }\n \n if(object == targetTreeItem.getData()) { // Cannot drop onto itself\n return false;\n }\n \n // If moving a folder check that target folder is not a descendant of the source folder\n if(object instanceof IOrganiserFolder) {\n while((targetTreeItem = targetTreeItem.getParentItem()) != null) {\n if(targetTreeItem.getData() == object) {\n return false;\n }\n }\n }\n \n return true;\n }", "boolean hasPlainTransfer();", "public boolean acceptDropOnPoint(Point p, DataFlavor flavor) {\n TreePath path = tree.getPathForLocation(p.x, p.y);\n if(path != null) {\n DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)path.getLastPathComponent();\n MBTNode node = (MBTNode) (currentNode).getUserObject();\n boolean acceptDrop = node.acceptDrop(flavor);\n if (acceptDrop){\n tree.setCellRenderer(new MdxBuilderTreeRenderer(node, Color.green));\n }else{\n tree.setCellRenderer(new MdxBuilderTreeRenderer(node, Color.red));\n }\n// S.out(\"accept drop returning \" + acceptDrop);\n return acceptDrop;\n }\n return false;\n }", "void onDrop(int from, int to);", "public boolean checkExplode() {\n\t\tlong currentFuse = System.nanoTime() - this.getDropTime();\n\t\t\n\t\tif (currentFuse >= this.getFuseLength() || explode)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\r\n\t\tpublic void dragOver(DropTargetDragEvent dtde) {\n\t\t\t\r\n\t\t}", "public boolean dropConstraints() {\n \t\treturn true;\n \t}", "@Override\r\n public void dragOver(DropTargetDragEvent dtde) {}", "private boolean skipDroppedDocument(Object[] entity) {\n if (entity instanceof CAS[]) {\n ChunkMetadata meta = CPMUtils.getChunkMetadata((CAS) entity[0]);\n if (meta != null && skippedDocs.containsKey(meta.getDocId())) {\n return true;\n }\n }\n return false;\n }", "@SuppressWarnings(\"deprecation\")\n protected boolean isDragPossible(MouseEvent e) {\n JTextComponent c = (JTextComponent)e.getSource();\n if (c.isEnabled()) {\n Caret caret = c.getCaret();\n int dot = caret.getDot();\n int mark = caret.getMark();\n if (dot != mark) {\n Point p = new Point(e.getX(), e.getY());\n int pos = c.viewToModel(p);\n\n int p0 = Math.min(dot, mark);\n int p1 = Math.max(dot, mark);\n if ((pos >= p0) && (pos < p1)) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean isDrooping() {\n return (((this.theta % 360) + 360) % 360) > 180\n || tree.isDrooping();\n }", "@Test(timeout=300000)\n public void test14() throws Throwable {\n BackendTransferListener backendTransferListener0 = new BackendTransferListener((CjdbcGui) null);\n backendTransferListener0.dropActionChanged((DragSourceDragEvent) null);\n }", "private boolean checkTransitionToShooting() {\n if (mOperatorInterface.getShoot() /* && (!mStorage.isEmpty()) && result.HasResult*/) {\n mRobotLogger.log(\"Changing to shoot because our driver said so...\");\n switch (mState) {\n\n /** Disables intake if transitioning from intake */\n case INTAKE:\n mIntake.stop();\n mStorage.stop();\n mIntakeState = IntakeState.IDLE;\n break;\n default:\n break;\n }\n mState = State.SHOOTING;\n\n /** Sets the shooting state to preparing if it's not already */\n if (mShootingState == ShootingState.IDLE) {\n mShootingState = ShootingState.PREPARE_TO_SHOOT;\n }\n return true;\n } else {\n // mRobotLogger.info(\"Could not shoot because \" + (!mStorage.isEmpty()) + \" \" +\n // mOperatorInterface.getShoot());\n return false;\n }\n }", "abstract boolean getIsDragging();", "public abstract void drop();", "public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}", "@Override\n\tpublic void onDragEnd(boolean success) {\n\t\t\n\t}", "public boolean hasBonusItemDrop() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "boolean hasDeleteBackUp();", "public boolean hasBonusItemDrop() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "public void setIconDropStatus(boolean newStatus) { \n\t\tdropped = newStatus;\n\t}", "public boolean damagable() {\n return !this.state.equals(\"knockedBack\")\n && !this.state.equals(\"dodge\");\n }" ]
[ "0.7795847", "0.76610625", "0.762426", "0.73454225", "0.7340482", "0.7258292", "0.72016454", "0.71953666", "0.71592903", "0.7086277", "0.7081821", "0.7078154", "0.6967361", "0.6962383", "0.6899938", "0.6871794", "0.6835999", "0.68309546", "0.68235844", "0.67821765", "0.6724111", "0.66546667", "0.66397184", "0.65426815", "0.6523635", "0.65172106", "0.6489659", "0.64603263", "0.64269364", "0.6372541", "0.63271344", "0.628837", "0.62464845", "0.62413204", "0.6229681", "0.61667496", "0.6152771", "0.6142579", "0.6128463", "0.6110584", "0.6093721", "0.6069691", "0.6060869", "0.60592705", "0.60518104", "0.60414094", "0.6001753", "0.59799975", "0.5958874", "0.5958874", "0.5953792", "0.5944755", "0.59444934", "0.59410083", "0.58940494", "0.5889514", "0.58780766", "0.58703303", "0.5863032", "0.5862762", "0.5858231", "0.5839281", "0.5838222", "0.5834513", "0.5832416", "0.5831036", "0.5825618", "0.5814285", "0.58038884", "0.58037424", "0.580299", "0.57873255", "0.5778179", "0.5767817", "0.57660925", "0.5751482", "0.5730585", "0.5726407", "0.5725283", "0.57153606", "0.5711478", "0.570343", "0.57010967", "0.56951654", "0.5691007", "0.5688031", "0.56691664", "0.5664073", "0.5659272", "0.56519794", "0.5650918", "0.56495327", "0.56429994", "0.562996", "0.5627767", "0.56236315", "0.56096107", "0.5605195", "0.5602978", "0.5602466" ]
0.5764615
75
Initialize the current page offset to the given one.
public PaginatedResult<T> start(ResultPage resultPage) { return start(resultPage, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInitalOffset(double offset){\n \tmodule.forEach(m -> m.setInitialOffset(offset));\n }", "public void setOffset(Integer offset) {\n this.offset = offset;\n }", "public void setOffset(Integer offset) {\n this.offset = offset;\n }", "public void setOffset(Integer offset) {\n this.offset = offset;\n }", "public void setOffset(int offset) {\r\n this.offset = offset;\r\n }", "public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }", "public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }", "public void setOffset(int offset) {\n this.offset = offset;\n }", "public void setDefaultOffset(int defaultOffset) {\r\n this.defaultOffset = defaultOffset;\r\n }", "public void setOffset(int offset) {\r\n currOffset = offset;\r\n try {\r\n file.seek(offset);\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\r\n public void setOffset(long offset) {\n }", "Offset createOffset();", "public Builder setOffset(int value) {\n \n offset_ = value;\n onChanged();\n return this;\n }", "void setOffset(com.walgreens.rxit.ch.cda.IVLPPDPQ offset);", "public com.twc.bigdata.views.avro.viewing_info.Builder setOffset(java.lang.Long value) {\n validate(fields()[2], value);\n this.offset = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "void setOffset(double offset);", "public void setOffset(double offset) {\n this.offset = offset;\n }", "public void setOffset(ParseTree node, int offset) {\n\t\tthis.offsets.put(node, offset);\n\t}", "public void setOffset(java.lang.Long value) {\n this.offset = value;\n }", "public void setStartOffset(String offset) {\n\t\ttry {\n\t\t\tstartOffset = Integer.parseInt(offset);\n\t\t} catch (Exception e) {\n\t\t\tstartOffset = 0;\n\t\t}\n\t}", "public void setBeginOffset(Integer beginOffset) {\n this.beginOffset = beginOffset;\n }", "public void setOffset(final double offset) {\r\n\t\tthis.offset = offset;\r\n\t}", "public void setOffset(Long Offset) {\n this.Offset = Offset;\n }", "public void setOffset(Long Offset) {\n this.Offset = Offset;\n }", "public int getDefaultOffset() {\r\n return defaultOffset;\r\n }", "public void setOffset(int offset) {\r\n\t\tthis.offSet = offset;\r\n\t}", "void setPageStart(short start);", "public void setOffset(long offset) {\n cSetOffset(this.cObject, offset);\n }", "public void initOffset(int offsetx, int offsety) {\n\t\toffsetX = offsetx;\n\t\toffsetY = offsety;\n\t}", "public void setStartOffset(int offset) {\n this.startOffset = offset;\n }", "public int getOffset() {\r\n\t\t\t\tint offset = pageCount * (currentPage - 1);\r\n\t\t\t\treturn offset < 0 ? 0 : offset;\r\n\t\t\t}", "private int adjustOffsetForUnitTests(int offset)\n\t{\n\t\tif (System.getProperty(\"fdbunit\")==null) //$NON-NLS-1$\n\t\t\treturn offset;\n\t\telse\n\t\t\treturn 0;\n\t}", "public void setOffset(Location value) {\n\t\tgfPos = value;\n\t}", "public PageUtil(int currentPage) {\n\t\tthis.currentPage = currentPage;\n\t}", "public void setStartPage(java.math.BigInteger startPage)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTPAGE$12);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STARTPAGE$12);\n }\n target.setBigIntegerValue(startPage);\n }\n }", "public void setCurrentLimitAndOffset(int LIMIT, int OFFSET){\n\t\tthis.LIMIT = LIMIT;\n\t\tthis.OFFSET = OFFSET;\n\t}", "@Override\r\n\tpublic void setOffset(IOffset offset) {\n\t\t\r\n\t}", "public void setCurrentPage(int pageNum) {\n mCurrentPage = pageNum;\n }", "public void setPage(int value) {\n this.page = value;\n }", "void setRawOffset(int rawOffset);", "private void initOffset(){\n\t\tdouble maxDistance = Math.sqrt(Math.pow(getBattleFieldWidth(),2) + Math.pow(getBattleFieldHeight(),2));\n\n\t\tif(eDistance < 100) { \n\t\t\toffset = 0;\n\t\t} else if (eDistance <=700){\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\n\t\t\t\toffset=eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset=-eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/8;\n\t\t}\n\t\telse {\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\t\t\t\toffset = eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset = -eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/4;\n\t\t}\n\t}", "public void setOffset(Location value) {\n\t\tthis.pos = value;\n\t}", "private int getCurrentOffset(){\n\t\treturn this.OFFSET;\n\t}", "private void initializeOffsets () {\n exampleStartOffsets.clear();\n int window = exampleLength + predictLength;\n for (int i = 0; i < train.size() - window; i++) { exampleStartOffsets.add(i); }\n }", "public void setStartingPage(int startingPage) {\n if(startingPage <= 0){\n this.startingPage = 1;\n }else{\n this.startingPage = startingPage;\n }\n }", "protected void setCurrentPageInternal(final int currentPage) {\r\n\t\tthis.currentPage = currentPage;\r\n\t}", "public void setCurrentPage(int pageNumber) {\n\t\t\n\t}", "public void setFirstItemOffset(int offset){\n\t\tscrollTo(offset, 0);\n\t}", "@Override\r\n\tpublic IPage<T> setCurrent(long current) {\n\t\treturn null;\r\n\t}", "void setAnchorOffset(int anchorOffset);", "public void setStartPage(int value) {\n this.startPage = value;\n }", "public void setOffset(Point2D offset) {\n Point2D oldOffset = this.offset;\n this.offset = offset;\n propertyChangeSupport.firePropertyChange(\"offset\", oldOffset, offset);\n }", "void xsetAnchorOffset(org.apache.xmlbeans.XmlInt anchorOffset);", "public void setBaseline(Double offset) {\n if (offset == null) {\n getOrCreateProperties().setBaseline(null);\n } else {\n getOrCreateProperties().setBaseline((int) (offset * 1000));\n }\n }", "void setExactOffset(int offset)\n {\n m_source_.setIndex(offset);\n updateInternalState();\n }", "public static int offset_addr() {\n return (0 / 8);\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setOffset(int value) {\n validate(fields()[6], value);\n this.offset = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "public void zeros(int position, final int count) throws IOException {\n checkCapacity(position + count);\n //zeroes memory in reverse direction in OS_PAGE_SIZE batches\n //to gain sympathy by the page cache LRU policy\n final long start = this.address + position;\n final long end = start + count;\n int toZeros = count;\n final long lastGap = (int) (end & (OS_PAGE_SIZE - 1));\n final long lastStartPage = end - lastGap;\n long lastZeroed = end;\n if (start <= lastStartPage) {\n if (lastGap > 0) {\n PlatformDependent.setMemory(lastStartPage, lastGap, (byte) 0);\n lastZeroed = lastStartPage;\n toZeros -= lastGap;\n }\n }\n //any that will enter has lastZeroed OS page aligned\n while (toZeros >= OS_PAGE_SIZE) {\n assert PowerOf2Util.isAligned(lastZeroed, OS_PAGE_SIZE);/**/\n final long startPage = lastZeroed - OS_PAGE_SIZE;\n PlatformDependent.setMemory(startPage, OS_PAGE_SIZE, (byte) 0);\n lastZeroed = startPage;\n toZeros -= OS_PAGE_SIZE;\n }\n //there is anything left in the first OS page?\n if (toZeros > 0) {\n PlatformDependent.setMemory(start, toZeros, (byte) 0);\n }\n //do not move this.position: only this.length can be changed\n position += count;\n if (position > this.length) {\n this.length = position;\n }\n }", "public void setOffset(Point2D offset) {\n\t\tthis.offset.setLocation(offset);\n\t}", "public Builder setStartPosition(int value) {\n bitField0_ |= 0x00000008;\n startPosition_ = value;\n onChanged();\n return this;\n }", "public void setPage(int page) {\n this.page = page;\n }", "public Pagination(int numResults, int offset) {\r\n\t\tthis.numResults = numResults;\r\n\t\tthis.offset = offset;\r\n\t}", "public int getPageStart(){\r\n\t\treturn (this.page -1) * perPageNum;\r\n\t}", "private int getPageOffset(int pageNum, int resultsPerPage, int numPages)\n {\n if(pageNum > numPages) pageNum = numPages;\n \n int index = (pageNum > 0)? (pageNum - 1) : 0;\n int offset = resultsPerPage * index;\n return offset;\n }", "protected int getInitialPage(HttpServletRequest request) {\n return 0;\n }", "public void setOffset(int startOffset, int endOffset);", "public PESection(PEFile pef, long baseoffset) {\n m_pe = pef;\n m_baseoffset = baseoffset;\n }", "public int IncrementOffset() {\n int oldOffset = offset;\n offset += MachineDependent.WORDSIZE;\n return oldOffset;\n }", "public void set_frag_offset(long frag_offset) {\r\n\t\tfrag_offset_ = frag_offset;\r\n\t}", "public void init() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\tpageLists.add(new Page(i));\n\t\t}\n\t}", "@Generated\n @Selector(\"setFetchOffset:\")\n public native void setFetchOffset(@NUInt long value);", "void setOffsetPosition(double x, double y, double z);", "public void setPageIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n pageIncrement = value;\n }\n }", "public void setPage(Integer page) {\n this.page = page;\n }", "private void createPaginationPageFactory() {\n pdfViewer.setPageFactory(pageNumber -> {\n if (currentFile.get() == null) {\n return null ;\n } else {\n if (pageNumber >= currentFile.get().getNumPages() || pageNumber < 0) {\n return null ;\n } else {\n updateImage(currentFile.get(), pageNumber);\n return scroller;\n }\n }\n });\n }", "void xsetRawOffset(org.apache.xmlbeans.XmlInt rawOffset);", "protected void initialize() {\r\n if (dumper.isLimitSwitchPressed()){ \r\n dumper.stop();\r\n state = STATE_SUCCESS;\r\n }\r\n else {\r\n startPosition = dumper.getPosition();\r\n desiredPosition = startPosition + increment;\r\n dumper.backward();\r\n state = STATE_SEEK_LEFT;\r\n }\r\n }", "public void setInitLoc( Vector2 init ) { initLoc = init; }", "public void setPage(SQLInteger page) {\n\t\tthis.page = page;\n\t}", "public void setCurrentPosition(int value) {\n this.currentPosition = value;\n }", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "protected void setPageSizeInternal(final int pageSize) {\r\n\t\tthis.pageSize = pageSize;\r\n\t}", "public void initStartPoint(GeoPointND p, int number);", "public void setOffset(double xOffset, double yOffset) {\n this.xOffset = xOffset;\n this.yOffset = yOffset;\n }", "public FoursquarePathBuilder setOffset(Integer offset) {\n String offsets = offset.toString();\n addParameter(\"offset\", offsets);\n return this;\n }", "private void setWallpaperOffset()\n\t{\n\t\tif( DefaultLayout.enable_configmenu_for_move_wallpaper )\n\t\t{\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences( SetupMenu.getContext() );\n\t\t\tif( prefs.getBoolean( SetupMenu.getKey( RR.string.desktop_wallpaper_mv ) , true ) == false )\n\t\t\t{\n\t\t\t\t//当菜单中设置壁纸不随滑动而滚动时,不需要设置offset\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//teapotXu add end\n\t\tif( animView.getUser() == targetOffset || targetOffset == -1 )\n\t\t\treturn;\n\t\tIBinder token = launcher.getWindow().getCurrentFocus().getWindowToken();\n\t\tif( token == null )\n\t\t\treturn;\n\t\tmWallpaperManager.setWallpaperOffsets( token , animView.getUser() , 0 );\n\t}", "public static int offset_counter() {\n return (8 / 8);\n }", "protected void setDataOffset(long dataOffset) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"88c62ab3-98d7-46cb-8121-80be7def254d\");\n this.dataOffset = dataOffset;\n }", "protected static int getOffset(int [] pageInfo) {\n int offset = 0;\n if( pageInfo[0] == 0 && pageInfo[1] > 0 ) {\n pageInfo[0] = 1;\n }\n if( pageInfo[0] > 1 && pageInfo[1] > 0 ) {\n offset = (pageInfo[0]-1)*pageInfo[1];\n }\n return offset;\n }", "public PageUtil(int currentPage, int pageSize) {\n\t\tthis.currentPage = currentPage;\n\t\tthis.pageSize = pageSize;\n\t}", "protected void offset(int offset) {\n super.offset(offset);\n offsetRange(this.fCloseBodyRange, offset);\n offsetRange(this.fExtendsRange, offset);\n offsetRange(this.fImplementsRange, offset);\n offsetRange(this.fInterfacesRange, offset);\n offsetRange(this.fOpenBodyRange, offset);\n offsetRange(this.fSuperclassRange, offset);\n offsetRange(this.fTypeRange, offset);\n }", "public void setWordOffset(final int wordOffset) {\n\t\tthis.wordOffset = wordOffset;\n\t}", "protected void aInit()\n {\n \ta_available=WindowSize;\n \tLimitSeqNo=WindowSize*2;\n \ta_base=1;\n \ta_nextseq=1;\n }", "@Generated\n @Selector(\"setContentOffset:\")\n void setContentOffset(@ByValue CGPoint value);", "public void startOver() {\n this.pagesRead = 0;\n }", "@RecentlyNonNull\n/* */ public PdfDocument.Page startPage(int pageNumber) {\n/* 106 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static void setRowKeyExpressionOffset(Expression rootExpression, final int offset) {\n rootExpression.accept(new RowKeyExpressionVisitor() {\n\n @Override\n public Void visit(RowKeyColumnExpression node) {\n node.setOffset(offset);\n return null;\n }\n \n });\n }", "void setStartAt(final Long startAt);", "private Position createPosition(final int offset)\n throws BadLocationException {\n return component.getDocument().createPosition(offset);\n }", "public void setCp(int currentPage) {\n\t\tthis.currentPage = currentPage;\n\t}", "public void autopvaloffset(double new_pvaloffset, boolean auto_offset)\n\t{\n\t\tpvaloffset = new_pvaloffset; //will be overwritten by auto_offset\n\t\tif(auto_offset)\n\t\t{\n\t\t\tdouble apvaloffset = 0.0;\n\t\t\tdouble inv_num = 1/( (double)((long)use_frames * (long)Idata.getWidth() * (long)Idata.getHeight() * 0.75) );//hexes cover 3/4 of models\n\t\t\tfor (int val = datamax; val >= datamin; --val) //logprobs for biggest datavalues are typically the smallest\n\t\t\t{\tapvaloffset += (double)histogram[val-datamin] * poissonlogprob(val,datamean);} //These two should be like x and ln(x)\n\t\t\tpvaloffset = apvaloffset * inv_num;\n\t\t}\n\t}" ]
[ "0.66970885", "0.6374048", "0.6374048", "0.6374048", "0.6370779", "0.63271016", "0.6300352", "0.62656873", "0.61924946", "0.61622965", "0.612168", "0.6000399", "0.5996919", "0.59916985", "0.59648997", "0.59627205", "0.5938094", "0.59185636", "0.5874295", "0.5836091", "0.5797483", "0.5786712", "0.57684255", "0.57684255", "0.573945", "0.573768", "0.57297117", "0.5675598", "0.56212205", "0.5597539", "0.5592414", "0.5589711", "0.555012", "0.55455184", "0.5528298", "0.55237335", "0.5520295", "0.5514534", "0.54951125", "0.5478704", "0.5460976", "0.5452942", "0.54303646", "0.54135466", "0.5408396", "0.5407424", "0.538374", "0.5369462", "0.5332823", "0.53183836", "0.53181946", "0.53064394", "0.52886856", "0.5268257", "0.52681196", "0.52639127", "0.52269936", "0.52191687", "0.51876736", "0.5179346", "0.5169766", "0.51491666", "0.5136216", "0.51305264", "0.51174486", "0.51053524", "0.5103638", "0.5094181", "0.5092719", "0.5091847", "0.5079542", "0.5078233", "0.50544256", "0.5053762", "0.50524884", "0.5048926", "0.5042386", "0.50360566", "0.50322706", "0.50270116", "0.5025667", "0.5019667", "0.5008976", "0.5008527", "0.4983744", "0.4972392", "0.49703297", "0.49649087", "0.49628028", "0.4958526", "0.49575722", "0.4956645", "0.49422655", "0.4938377", "0.4935768", "0.49320096", "0.49211884", "0.491887", "0.49171492", "0.49084902", "0.49041477" ]
0.0
-1
TODO Autogenerated method stub
@Override public void print(String tab, FileWriter fw) { System.out.println(tab + "LiteralExpression: " + number.toString()); try { fw.write(tab + "LiteralExpression: " + number.toString()); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public Type generateIntermediateCode(Function fun) { if(number instanceof Double) return Type.FLOAT; else if (number instanceof Integer) return Type.INT; return Type.NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump.
private boolean processPendingItems() { ShortcutInfo shortcut = null; try { synchronized (this.mPendingItems) { if (this.mPendingItems.size() == 0) { return false; } PendingItem item = (PendingItem) this.mPendingItems.pop(); } return true; } finally { if (shortcut != null) { if (shortcut.getBitmapPath() == null) { removeIcon(shortcut); } shortcut.clearFlags(2048); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }", "private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }", "private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }", "public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }", "public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }", "private void m50366E() {\n }", "public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "void m5768b() throws C0841b;", "void m1864a() {\r\n }", "public boolean method_2088(class_689 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5770d() throws C0841b;", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public final void mo91715d() {\n }", "public void method_4270() {}", "private static void m13381a(long r3, float r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\n r0.beginTransaction();\t Catch:{ Exception -> 0x001f }\n r1 = \"INSERT INTO battery_watcher (timestamp, level) VALUES (?, ?)\";\t Catch:{ Exception -> 0x001f }\n r1 = r0.compileStatement(r1);\t Catch:{ Exception -> 0x001f }\n r2 = 1;\t Catch:{ Exception -> 0x001f }\n r1.bindLong(r2, r3);\t Catch:{ Exception -> 0x001f }\n r3 = 2;\t Catch:{ Exception -> 0x001f }\n r4 = (double) r5;\t Catch:{ Exception -> 0x001f }\n r1.bindDouble(r3, r4);\t Catch:{ Exception -> 0x001f }\n r1.execute();\t Catch:{ Exception -> 0x001f }\n r0.setTransactionSuccessful();\t Catch:{ Exception -> 0x001f }\n goto L_0x0026;\n L_0x001d:\n r3 = move-exception;\n goto L_0x002a;\n L_0x001f:\n r3 = f10646a;\t Catch:{ all -> 0x001d }\n r4 = \"Issue adding location to battery history\";\t Catch:{ all -> 0x001d }\n com.foursquare.internal.util.FsLog.m6807d(r3, r4);\t Catch:{ all -> 0x001d }\n L_0x0026:\n r0.endTransaction();\n return;\n L_0x002a:\n r0.endTransaction();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.a(long, float):void\");\n }", "static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }", "private static class_1205 method_6442(String param0, int param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2112(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5769c() throws C0841b;", "void m5771e() throws C0841b;", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }", "public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "public boolean method_2243() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "public void method_2116(class_689 param1, boolean param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "private static int m69982c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"android.os.Build$VERSION\";\t Catch:{ Exception -> 0x0018 }\n r0 = java.lang.Class.forName(r0);\t Catch:{ Exception -> 0x0018 }\n r1 = \"SDK_INT\";\t Catch:{ Exception -> 0x0018 }\n r0 = r0.getField(r1);\t Catch:{ Exception -> 0x0018 }\n r1 = 0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.get(r1);\t Catch:{ Exception -> 0x0018 }\n r0 = (java.lang.Integer) r0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.intValue();\t Catch:{ Exception -> 0x0018 }\n return r0;\n L_0x0018:\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.util.f.c():int\");\n }", "static void m7753b() {\n f8029a = false;\n }", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }", "public void method_7080(String param1, class_1293 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void m9741j() throws cf {\r\n }", "private static void check(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.check(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.check(java.lang.String):void\");\n }", "public boolean method_2153(boolean param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2259(String param1, double param2, double param4, double param6, int param8, double param9, double param11, double param13, double param15) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m50367F() {\n }", "public void mo21779D() {\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "public void method_2249(boolean param1, class_81 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo115190b() {\n }", "public final void mo1285b() {\n }", "public void mo23813b() {\n }", "public boolean method_208() {\r\n return false;\r\n }", "public final void mo11687c() {\n }", "public static com.facebook.ads.internal.p081a.C1714d m6464a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r1);\n if (r0 == 0) goto L_0x0009;\n L_0x0006:\n r1 = NONE;\n return r1;\n L_0x0009:\n r0 = java.util.Locale.US;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = r1.toUpperCase(r0);\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = com.facebook.ads.internal.p081a.C1714d.valueOf(r1);\t Catch:{ IllegalArgumentException -> 0x0014 }\n return r1;\n L_0x0014:\n r1 = NONE;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.a.d.a(java.lang.String):com.facebook.ads.internal.a.d\");\n }", "public final void mo51373a() {\n }", "void mo72113b();", "public boolean method_2434() {\r\n return false;\r\n }", "boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }", "public void mo21787L() {\n }", "private void kk12() {\n\n\t}", "void mo80457c();", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }", "public void m23075a() {\n }", "void mo80452a();", "public final int mo11683a(com.google.android.gms.internal.ads.bci r11, com.google.android.gms.internal.ads.bcn r12) {\n /*\n r10 = this;\n L_0x0000:\n int r12 = r10.f3925e\n r0 = -1\n r1 = 1\n r2 = 0\n switch(r12) {\n case 0: goto L_0x00b2;\n case 1: goto L_0x0044;\n case 2: goto L_0x000e;\n default: goto L_0x0008;\n }\n L_0x0008:\n java.lang.IllegalStateException r11 = new java.lang.IllegalStateException\n r11.<init>()\n throw r11\n L_0x000e:\n int r12 = r10.f3928h\n if (r12 <= 0) goto L_0x0031\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r0 = 3\n r11.mo11675b(r12, r2, r0)\n com.google.android.gms.internal.ads.bcq r12 = r10.f3924d\n com.google.android.gms.internal.ads.bkh r3 = r10.f3923c\n r12.mo11681a(r3, r0)\n int r12 = r10.f3929i\n int r12 = r12 + r0\n r10.f3929i = r12\n int r12 = r10.f3928h\n int r12 = r12 - r1\n r10.f3928h = r12\n goto L_0x000e\n L_0x0031:\n int r11 = r10.f3929i\n if (r11 <= 0) goto L_0x0041\n com.google.android.gms.internal.ads.bcq r3 = r10.f3924d\n long r4 = r10.f3927g\n r6 = 1\n int r7 = r10.f3929i\n r8 = 0\n r9 = 0\n r3.mo11680a(r4, r6, r7, r8, r9)\n L_0x0041:\n r10.f3925e = r1\n return r2\n L_0x0044:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n int r12 = r10.f3926f\n if (r12 != 0) goto L_0x006a\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 5\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x005a\n L_0x0058:\n r1 = 0\n goto L_0x008d\n L_0x005a:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12063j()\n r5 = 1000(0x3e8, double:4.94E-321)\n long r3 = r3 * r5\n r5 = 45\n long r3 = r3 / r5\n r10.f3927g = r3\n goto L_0x0083\n L_0x006a:\n int r12 = r10.f3926f\n if (r12 != r1) goto L_0x0097\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 9\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x007b\n goto L_0x0058\n L_0x007b:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12066m()\n r10.f3927g = r3\n L_0x0083:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3928h = r12\n r10.f3929i = r2\n L_0x008d:\n if (r1 == 0) goto L_0x0094\n r12 = 2\n r10.f3925e = r12\n goto L_0x0000\n L_0x0094:\n r10.f3925e = r2\n return r0\n L_0x0097:\n com.google.android.gms.internal.ads.bad r11 = new com.google.android.gms.internal.ads.bad\n int r12 = r10.f3926f\n r0 = 39\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>(r0)\n java.lang.String r0 = \"Unsupported version number: \"\n r1.append(r0)\n r1.append(r12)\n java.lang.String r12 = r1.toString()\n r11.<init>((java.lang.String) r12)\n throw r11\n L_0x00b2:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 8\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 == 0) goto L_0x00df\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12065l()\n int r2 = f3921a\n if (r12 != r2) goto L_0x00d7\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3926f = r12\n r2 = 1\n goto L_0x00df\n L_0x00d7:\n java.io.IOException r11 = new java.io.IOException\n java.lang.String r12 = \"Input not RawCC\"\n r11.<init>(r12)\n throw r11\n L_0x00df:\n if (r2 == 0) goto L_0x00e5\n r10.f3925e = r1\n goto L_0x0000\n L_0x00e5:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.bef.mo11683a(com.google.android.gms.internal.ads.bci, com.google.android.gms.internal.ads.bcn):int\");\n }", "public void mo12628c() {\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "void mo41086b();", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "public void mo21785J() {\n }", "public final com.google.android.gms.internal.ads.zzafx mo4170d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19705f;\n monitor-enter(r0);\n r1 = r2.f19706g;\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n r1 = r1.m26175a();\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x000b:\n r1 = move-exception;\t Catch:{ all -> 0x000b }\n goto L_0x0010;\t Catch:{ all -> 0x000b }\n L_0x000d:\n r1 = 0;\t Catch:{ all -> 0x000b }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x0010:\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzafn.d():com.google.android.gms.internal.ads.zzafx\");\n }", "protected boolean func_70041_e_() { return false; }", "static /* synthetic */ void m204-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }", "public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }" ]
[ "0.76168954", "0.75731987", "0.7526049", "0.7450839", "0.745083", "0.743781", "0.7381979", "0.7381979", "0.73668504", "0.7353776", "0.7342305", "0.7315385", "0.7309052", "0.7305908", "0.72749174", "0.7252735", "0.7221748", "0.7198023", "0.7177586", "0.71367776", "0.7106741", "0.7042298", "0.702388", "0.7020239", "0.6991675", "0.69618434", "0.6941446", "0.6908536", "0.68903023", "0.6852993", "0.68285644", "0.67952764", "0.6785258", "0.6776325", "0.6773531", "0.6772149", "0.67678267", "0.6766803", "0.6743366", "0.670674", "0.67014986", "0.66989243", "0.6698744", "0.66970176", "0.6669733", "0.6667978", "0.6655955", "0.6613438", "0.6612054", "0.6608727", "0.6593641", "0.65691924", "0.6566013", "0.65404963", "0.6514286", "0.651034", "0.6509744", "0.6489942", "0.64375335", "0.6431551", "0.6431", "0.64046156", "0.6401297", "0.6371447", "0.63692945", "0.63689166", "0.6357663", "0.632814", "0.6325863", "0.6324135", "0.6317023", "0.6305071", "0.6302066", "0.6297469", "0.6280574", "0.6279672", "0.62408286", "0.62288547", "0.6226313", "0.6226176", "0.62246233", "0.6219508", "0.6218225", "0.6204082", "0.61974406", "0.6193266", "0.6181262", "0.61702144", "0.6166954", "0.61638236", "0.61618435", "0.6160887", "0.6157116", "0.61545634", "0.61505413", "0.6140257", "0.61259556", "0.6115559", "0.61112547", "0.61011076", "0.60968053" ]
0.0
-1
Created by max.ross on 11/15/14.
public interface StorageCallbacks { void onNewTrip(Trip trip); void onUpdatedTrip(Trip updatedTrip); void onDeletedTrip(String deletedTripId); void onFullRefresh(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private void poetries() {\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\n public int describeContents() { return 0; }", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void method_4270() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "private static void cajas() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "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 public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo12628c() {\n }", "@Override\n public void init() {\n }", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n public void init() {}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\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\tpublic void one() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo70713b();", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21877s() {\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 protected void initialize() {\n }", "@Override\n\tprotected void initialize() {\n\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\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void m23075a() {\n }", "@Override\n void init() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void m50367F() {\n }", "protected void mo6255a() {\n }", "private void strin() {\n\n\t}", "public final void mo91715d() {\n }", "@Override\n protected void initialize() {\n\n \n }", "public void mo12930a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo6081a() {\n }", "public void skystonePos4() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}" ]
[ "0.57229435", "0.56852776", "0.56731385", "0.5616467", "0.5545014", "0.54917216", "0.5488016", "0.54563105", "0.5453071", "0.54518676", "0.54443896", "0.5432857", "0.5432857", "0.5432604", "0.54171395", "0.5417088", "0.53893894", "0.5360963", "0.53520066", "0.5347305", "0.5347305", "0.5347305", "0.5347305", "0.5347305", "0.5346771", "0.53274834", "0.53212935", "0.5313825", "0.5289217", "0.5283277", "0.5277048", "0.5272932", "0.526958", "0.5265169", "0.5261517", "0.5261517", "0.5259327", "0.524676", "0.5245867", "0.5245867", "0.5245867", "0.5245867", "0.5245867", "0.5245867", "0.5245867", "0.5243388", "0.5238535", "0.5234949", "0.5232156", "0.5221855", "0.5217733", "0.5205714", "0.5205714", "0.5205714", "0.5199109", "0.51933426", "0.51920825", "0.5189012", "0.5189012", "0.5189012", "0.51805115", "0.51796585", "0.5175319", "0.5173201", "0.51683867", "0.5159168", "0.5155906", "0.51523477", "0.51523477", "0.51523477", "0.51523477", "0.51523477", "0.51523477", "0.5152019", "0.5151012", "0.5151012", "0.5151012", "0.5144198", "0.51425666", "0.5141521", "0.5141293", "0.51400834", "0.51311475", "0.5124982", "0.5124503", "0.5123878", "0.5114896", "0.5112806", "0.5106963", "0.5103673", "0.5103205", "0.5102409", "0.5102409", "0.5095853", "0.50898767", "0.5086594", "0.5084941", "0.5084637", "0.507842", "0.50753343", "0.50734264" ]
0.0
-1
Subclass must call this when new request is received.
protected long requestProcessingStarted() { requestsInProcessing++; return System.currentTimeMillis(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void receiveRequest(final Request request) {\n\n }", "@Override\n\tpublic void receiveRequest() {\n\n\t}", "public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}", "@Override\n\tpublic void initRequest() {\n\n\t}", "private Request() {\n initFields();\n }", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "@Override\n\tpublic void OnRequest() {\n\t\t\n\t}", "public void request() {\n }", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "protected void onBeginRequest()\n\t{\n\t}", "@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}", "private Request() {}", "private Request() {}", "protected abstract void nextRequest ();", "public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }", "@Override\n protected final void parseRequest(final HttpServletRequest request, HttpServletResponse response) {\n\n parsePath(request);\n\n LOGGER.warning(\"[REST]: \" + request.getMethod() + \"|\" + apiName + \"/\" + resourceName + \"|\" + request.getHeader(\"Current-Page\"));\n\n // Fixes BS-400. This is ugly.\n I18n.getInstance();\n\n api = APIs.get(apiName, resourceName);\n api.setCaller(this);\n\n super.parseRequest(request, response);\n\n }", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "protected void onPrepareRequest(HttpUriRequest request) throws IOException {\n\t\t// Nothing.\n\t}", "private WebRequest() {\n initFields();\n }", "@Override\r\n public boolean isRequest() {\n return false;\r\n }", "void handleRequest();", "public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }", "@Override\n\tpublic String init_request() {\n\t\treturn null;\n\t}", "public void handleRequest(Request req) {\n\n }", "void addRequest(@NonNull OverrideRequest request) {\n OverrideRequest previousRequest = mRequest;\n mRequest = request;\n mListener.onStatusChanged(request, STATUS_ACTIVE);\n\n if (previousRequest != null) {\n cancelRequestLocked(previousRequest);\n }\n }", "private Request(MarketDataRequestAtom inAtom,\n MarketDataRequest inCompleteRequest)\n {\n atom = inAtom;\n receiver.subscribe(this);\n flow = moduleManager.createDataFlow(new DataRequest[] { new DataRequest(feed.getURN(),generateRequestFromAtom(inAtom,inCompleteRequest)),new DataRequest(receiver.getURN()) });\n }", "@Override\n public void run() {\n handleClientRequest();\n }", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "@Override\n\tpublic void onReceiveRequest(String reqBody) {\n\t\tthis.mobiletManager.setRequestBody(this, reqBody);\n\t\tthis.mobiletManager.processSmartEvent(this, this.mobiletManager.getCallbackEvent());\n\t}", "private synchronized void onRequest(ObjectMessage message) {\n try {\n Serializable request = message.getObject(); //serializer.requestFromString(message.getText());\n activeRequests.put(request, message);\n requestListener.receivedRequest(request);\n } catch (JMSException ex) {\n Logger.getLogger(AsynchronousReplier.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "protected void onEndRequest()\n\t{\n\t}", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public InnerSessionRequestCallback() {\r\n super();\r\n// this.requestCount = requestCount;\r\n }", "private RequestExecution() {}", "@Override\n\tprotected void updateTargetRequest() {\n\t}", "public void build() {\n\t\t\tRequest request = new Request();\n request.context = context;\n\t\t\trequest.requestType = requestType;\n\t\t\trequest.url = url;\n\t\t\trequest.envelope = envelope;\n\t\t\trequest.headers = headers;\n\n\t\t\trequest.responseListener = responseListener;\n\t\t\trequest.onValidateResponseListener = validateResponseListener;\n\n\t\t\trequest.isDebug = isDebug;\n\n\t\t\trequest.start();\n\t\t}", "public void addRequest( Request currentRequest)\r\n\t{\r\n\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"--------- Currently all elevators in the system are Occupied ------\");\t\r\n\t\t\tSystem.out.println(\"--------- Request to Go to Floor \" + currentRequest.getDestinationflour()+\" From Floor\" + currentRequest.getCurrentFlour() +\" has been added to the System --------\");\r\n\t\t\tcheckAvaliableElevators();\t\r\n\t\t}\r\n\t\t\r\n\t\tprocessRequest(currentRequest);\t\t\r\n\t\t\r\n\t}", "public RequestListenerMessageEventHandler(RequestListener requestListener) {\n super(Message.STUN_REQUEST, requestListener);\n }", "@Override\r\n\t\t\tprotected Vector prepareRequests(ACLMessage request) {\n\t\t\t\tString incomingRequestKey = (String) ((AchieveREResponder) parent).REQUEST_KEY;\r\n\t\t\t\tACLMessage incomingRequest = (ACLMessage) getDataStore().get(incomingRequestKey);\r\n\t\t\t\t// Prepare the request to forward to the responder\r\n\t\t\t\tSystem.out.println(\"Agent \"+getLocalName()+\": Forward the request to \"+bestOffer.getName());\r\n\t\t\t\tACLMessage outgoingRequest = new ACLMessage(ACLMessage.REQUEST);\r\n\t\t\t\toutgoingRequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\t\toutgoingRequest.addReceiver(bestOffer);\r\n\t\t\t\toutgoingRequest.setContent(incomingRequest.getContent());\r\n\t\t\t\toutgoingRequest.setReplyByDate(incomingRequest.getReplyByDate());\r\n\t\t\t\tVector v = new Vector(1);\r\n\t\t\t\tv.addElement(outgoingRequest);\r\n\t\t\t\treturn v;\r\n\t\t\t}", "public void handleRequest(Request request)\n {\n Request proxied = new Request(extractMethodName(request.getMethodName()), request.getParams()).withResponseBlock(request.getResponseBlock());\n proxied.setIdentifier(request.getIdentifier());\n receiver.handleMessage(proxied.toJsonString());\n }", "@Override\n public void onNext(RequestData request) {\n System.out.println(\"Requestor:\" + request.getName());\n System.out.println(\"Request Message:\" + request.getMessage());\n }", "private CustomRequest getCustomRequestFor(HttpRequest aRequest,\n Handler aHandler) {\n int lRequestMapped = mapToVolleyMethodCode(aRequest.getMethod());\n RequestComposite lMap = new RequestComposite();\n lMap.setHttpReq(aRequest);\n Handler lHandler = aHandler == null ? mainHandler : aHandler;\n Listener<String> lListener = getListenerForRequest(lMap, lHandler);\n Response.ErrorListener lErrorListener = getErrorListenerForRequest(lMap,\n lHandler);\n CustomRequest lReq = new CustomRequest(lRequestMapped,\n aRequest.getUrl(), lListener, lErrorListener, aRequest);\n // update the reference in the map.\n lMap.setVolleyReq(lReq);\n return lReq;\n }", "@Override\n\tpublic void validateRequest(BaseRequest request) {\n\t\t\n\t}", "@Override\n\tpublic void processRequest(RequestEvent requestEvent) {\n\t\t requestEvent.getServerTransaction();\n\t\tSystem.out.println(\"Sending ------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"[]:\"+requestEvent.toString());\n\t}", "public void processRequest(String request) {\r\n // Request for closing connection\r\n if (request.equals(\"CLOSE\")) {\r\n isOpen = false;\r\n\r\n // Request for getting all of the text on the Server's text areas\r\n } else if (request.equals(\"GET ALL TEXT\")) {\r\n String [] array = FileIOFunctions.getAllTexts();\r\n\r\n sendMessage(\"GET ALL TEXT\");\r\n sendMessage(array[0]);\r\n sendMessage(array[1]);\r\n } else {}\r\n }", "@SuppressWarnings(\"WeakerAccess\")\n protected void makeRequest() {\n if (mCallback == null) {\n CoreLogger.logError(addLoaderInfo(\"mCallback == null\"));\n return;\n }\n\n synchronized (mWaitLock) {\n mWaitForResponse.set(true);\n }\n\n doProgressSafe(true);\n\n Utils.runInBackground(true, new Runnable() {\n @Override\n public void run() {\n try {\n CoreLogger.log(addLoaderInfo(\"makeRequest\"));\n makeRequest(mCallback);\n }\n catch (Exception exception) {\n CoreLogger.log(addLoaderInfo(\"makeRequest failed\"), exception);\n callbackHelper(false, wrapException(exception));\n }\n }\n });\n }", "@Override\n public void onNext(RequestData request) {\n System.out.println(\"Requestor:\" + request.getName());\n System.out.println(\"Request Message:\" + request.getMessage());\n responseObserver.onNext(ResponseData.newBuilder().setMessage(request.getMessage() + \" - \" + request.getName()).build());\n }", "public void procRequest ()\r\n\t{\r\n\t\tthis.simTime = this.sim.getTimer();\r\n\t\tthis.request.setStartTime(simTime);\r\n\t\t//Debug/System.out.println(Fmt.time(simTime)\r\n\t\t//Debug/\t+ \": <procRequest> \" + request);\r\n\r\n\t\t//\tNeed to move from current cylinder to requested cylinder.\r\n\t\t//\tIf current == requested, no action.\r\n\t\tif (this.cylinder != this.request.getCylinder())\r\n\t\t\tthis.simTime += this.calcSeekTime(this.request.getCylinder());\r\n\t\tthis.sim.addEvent(new Event(Event.SEEK_SATISFIED, this.simTime));\r\n\t}", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "void requestReceived( C conn ) ;", "public void addRequest(Request req) {\n\n }", "public ViewRequestResponse() {\n super(\"View Request/Response\");\n initComponents();\n blRequestResponse = new BLRequestResponse();\n response = new Response();\n request = new Request();\n \n }", "@Override\n \t\tpublic void customizeRequest(SipRequest request, SipConnection connection)\n \t\t{\n \t\t\t\n \t\t}", "public Request() {\n }", "public void setRequest(REQ request) {\n this.request = request;\n }", "Request(Request otherRequest) {\n this.reqNum = otherRequest.reqNum;\n this.reqText = otherRequest.reqText;\n this.reqExampleDocs = new ArrayList<ExampleDocument>(otherRequest.reqExampleDocs);\n }", "public Request() {\n\n }", "public Response sendRequest(Request request) {\n return null;\n }", "void onHTTPRequest(HTTPRequest request, HTTPResponse response);", "public RequestHandler(DatagramPacket requestPacket) {\n this.requestPacket = requestPacket;\n }", "private Response() {\n initFields();\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public void initRequest() {\n repo.getData();\n }", "public void handler(AbstractRequest request) {\n\t\tSystem.out.println(\"===handle1\" + request.getContent());\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "public Request(final FullHttpRequest request) {\n this.request = request;\n }", "void onRequest(HttpServletRequest request, HttpServletResponse response) throws IOException {\n mTransport.onRequest(request, response);\n\n if (mUpgrading.get() && mTransport.isWritable() && mWriteBuffer.isEmpty()) {\n mTransport.send(PAYLOAD_NOOP);\n }\n }", "public TInvoiceRequestEventRecord() {\n super(TInvoiceRequestEvent.T_INVOICE_REQUEST_EVENT);\n }", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "public void onRequestResponse(Response response) { }", "public RequestMessage() {\r\n\t\tsuper();\r\n\t\tthis.criteria = new PersonSearchCriteria();\r\n\t\tthis.setSourceSystemID(SOURCE_SYSTEM_ID);\r\n\t\tthis.setSourceUserID(SOURCE_USER_ID);\r\n\t}", "abstract void request() throws IOException;", "public SubRequestFacade(Request request) {\n super(request);\n }", "private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}", "public void getRequest(Request request, Response response) {\n\t\tretrieveObject(request, response);\n\t}", "public void handleRequest () {\n\t// TODO: move this method to separate thread, \n\t// TODO: it may block in many places.\n\tRequestHandler rh = new RequestHandler ();\t\n\tCache<HttpHeader, HttpHeader> cache = proxy.getCache ();\n\tString method = request.getMethod ();\n\tif (!method.equals (\"GET\") && !method.equals (\"HEAD\"))\n\t cache.remove (request);\n\t\t\n\trh.entry = cache.getEntry (request);\n\tif (rh.entry != null)\n\t rh.dataHook = rh.entry.getDataHook (proxy.getCache ());\n\n\tcheckNoStore (rh.entry);\n\tif (!rh.cond.checkMaxStale (request, rh) && checkMaxAge (rh))\n\t setMayUseCache (false);\n\t\n\trh.conditional = rh.cond.checkConditional (this, request, rh);\n\tif (partialContent (rh)) \n\t fillupContent (rh);\n\tcheckIfRange (rh);\n\n\tboolean mc = getMayCache ();\n\tif (getMayUseCache ()) {\n\t // in cache?\n\t if (rh.entry != null) {\n\t\tCacheChecker cc = new CacheChecker ();\n\t\tif (cc.checkCachedEntry (this, request, rh)) {\n\t\t return;\n\t\t}\n\t }\n\t}\n\t\n\tif (rh.content == null) {\n\t // Ok cache did not have a usable resource, \n\t // so get the resource from the net.\n\t // reset value to one before we thought we could use cache...\n\t mayCache = mc;\n\t SWC swc = new SWC (this, proxy.getOffset (), request, requestBuffer,\n\t\t\t tlh, clientResourceHandler, rh);\n\t swc.establish ();\n\t} else {\n\t resourceEstablished (rh);\n\t}\n }", "void setRequest(Request req);", "public void addRequest(T request) {\n\t\tinputQueue.add(request);\n\t}", "@Override\n\t\tvoid request(HttpURLConnection u, String prefix) {\n\t\t}", "public void setRequest(final String request) {\n this.request = request;\n }", "@Override\n public void handleClientRequest(User sender, ISFSObject params) {\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \n }", "@Override\n protected void onRequestTimeout(Tuple request) {\n }", "private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}", "@Override\n\tpublic Response handle(Request request) {\n\t\treturn null;\n\t}", "public AbstractRequestParser()\n {\n super();\n \n //set flag\n this.initialized=false;\n }", "private void viewPendingRequests() {\n\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "public synchronized void handle(PBFTRequest r){\n \n Object lpid = getLocalServerID();\n\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \", at time \" + getClockValue() + \", received \" + r);\n\n StatedPBFTRequestMessage loggedRequest = getRequestInfo().getStatedRequest(r);\n \n /* if the request has not been logged anymore and it's a old request, so it was garbage by checkpoint procedure then I must send a null reply */\n if(loggedRequest == null && getRequestInfo().isOld(r)){\n IProcess client = new BaseProcess(r.getClientID());\n PBFTReply reply = new PBFTReply(r, null, lpid, getCurrentViewNumber());\n emit(reply, client);\n return;\n \n }\n \n try{\n /*if the request is new and hasn't added yet then it'll be added */\n if(loggedRequest == null){\n /* I received a new request so a must log it */\n loggedRequest = getRequestInfo().add(getRequestDigest(r), r, RequestState.WAITING);\n loggedRequest.setRequestReceiveTime(getClockValue());\n }\n\n /* if I have a entry in request log but I don't have the request then I must update my request log. */\n if(loggedRequest.getRequest() == null) loggedRequest.setRequest(r);\n \n /*if the request was served the I'll re-send the related reply if it has been logged yet.*/\n if(loggedRequest.getState().equals(RequestState.SERVED)){\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \" has already served \" + r);\n\n /* retransmite the reply when the request was already served */\n PBFTReply reply = getRequestInfo().getReply(r);\n IProcess client = new BaseProcess(r.getClientID());\n emit(reply, client);\n return;\n }\n \n /* If I'm changing then I'll do nothing more .*/\n if(changing()) return;\n\n PBFTPrePrepare pp = getPrePreparebackupInfo().get(getCurrentViewNumber(), getCurrentPrimaryID(), loggedRequest.getDigest());\n\n if(pp != null && !isPrimary()){\n /* For each digest in backuped pre-prepare, I haven't all request then it'll be discarded. */\n DigestList digests = new DigestList();\n for(String digest : pp.getDigests()){\n if(!getRequestInfo().hasRequest(digest)){\n digests.add(digest);\n }\n }\n \n if(digests.isEmpty()){\n handle(pp);\n getPrePreparebackupInfo().rem(pp);\n return;\n } \n }\n\n boolean committed = loggedRequest.getState().equals( RequestState.COMMITTED );\n \n// /* if my request was commit and it hasn't been served yet I must check the stated of the request */\n if(committed){\n tryExecuteRequests();\n return;\n }\n \n /* performs the batch procedure if the server is the primary replica. */\n if(isPrimary()){\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \" (primary) is executing the batch procedure for \" + r + \".\");\n batch();\n }else{\n /* schedules a timeout for the arriving of the pre-prepare message if the server is a secundary replica. */\n scheduleViewChange();\n }//end if is primary\n \n }catch(Exception e){\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void updateRequest(Request request) {\n\n\t\tString requestBody = request.getBodyAsString();\n\t\tif ( (requestBody == null)\n\t\t || (requestBody.trim().isEmpty()) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tboolean toArguments = true;\n\t\tXMLRequestParser parser = new XMLwithAttributesParser(request,toArguments);\n\n\t\ttry {\n\t\t\tparser.parseXml().saveResultsToRequest();\n\t\t} catch (IOException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t} catch (SAXException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t}\n\t}", "private PredictRequest() {\n\t}" ]
[ "0.73978204", "0.7015699", "0.6940602", "0.6939925", "0.690818", "0.6874043", "0.6849849", "0.6835388", "0.6725412", "0.6636853", "0.65931237", "0.65666574", "0.65354794", "0.64442384", "0.6409482", "0.63907033", "0.63907033", "0.6334125", "0.63132393", "0.62764645", "0.6261879", "0.62606543", "0.6195153", "0.6168317", "0.61499757", "0.6137152", "0.61250263", "0.61084694", "0.61080307", "0.6100513", "0.60884285", "0.60824627", "0.6080579", "0.6060043", "0.6028879", "0.6025616", "0.6025616", "0.5993605", "0.59813786", "0.598016", "0.5976607", "0.59699136", "0.5954485", "0.59497434", "0.59424144", "0.5929056", "0.5915504", "0.59134465", "0.590364", "0.5897172", "0.58844656", "0.5869067", "0.58539504", "0.584046", "0.583635", "0.5834795", "0.58322453", "0.5831171", "0.58280444", "0.58275497", "0.58259344", "0.5816297", "0.5800433", "0.57937163", "0.5792745", "0.5789142", "0.57869214", "0.57866895", "0.57798535", "0.57763815", "0.5770444", "0.576829", "0.57582366", "0.57475716", "0.574411", "0.57378834", "0.57294714", "0.5727053", "0.57261854", "0.57247645", "0.5723278", "0.57209545", "0.5715553", "0.5714361", "0.5711722", "0.5706137", "0.56954396", "0.56927836", "0.5690531", "0.56830764", "0.5676705", "0.56642425", "0.56554973", "0.56513286", "0.56425506", "0.5639708", "0.5639436", "0.5639436", "0.563705", "0.56325394", "0.563093" ]
0.0
-1
Subclass must call this when new request is processed.
protected void requestProcessingStopped(long startTime) { requestsInProcessing--; lastProcessingTime = System.currentTimeMillis() - startTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "private Request() {\n initFields();\n }", "@Override\n\tpublic void initRequest() {\n\n\t}", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}", "protected void onBeginRequest()\n\t{\n\t}", "public void request() {\n }", "@Override\n\tpublic void OnRequest() {\n\t\t\n\t}", "protected abstract void nextRequest ();", "@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "protected void onPrepareRequest(HttpUriRequest request) throws IOException {\n\t\t// Nothing.\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected final void parseRequest(final HttpServletRequest request, HttpServletResponse response) {\n\n parsePath(request);\n\n LOGGER.warning(\"[REST]: \" + request.getMethod() + \"|\" + apiName + \"/\" + resourceName + \"|\" + request.getHeader(\"Current-Page\"));\n\n // Fixes BS-400. This is ugly.\n I18n.getInstance();\n\n api = APIs.get(apiName, resourceName);\n api.setCaller(this);\n\n super.parseRequest(request, response);\n\n }", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \n }", "private RequestExecution() {}", "@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}", "private WebRequest() {\n initFields();\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "private Request() {}", "private Request() {}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n\tprotected void updateTargetRequest() {\n\t}", "@Override\r\n public boolean isRequest() {\n return false;\r\n }", "@Override\n public void receiveRequest(final Request request) {\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\tpublic void receiveRequest() {\n\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "protected void onEndRequest()\n\t{\n\t}", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }", "private void processRequest(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\n\r\n\t}", "public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }", "protected abstract void processRequest( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException;", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\tpublic String init_request() {\n\t\treturn null;\n\t}", "protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}", "private Response() {\n initFields();\n }", "public void handleRequest(Request req) {\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "void handleRequest();", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response\n )\n throws ServletException\n , IOException {\n processRequest(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n public void run() {\n handleClientRequest();\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\tpublic void validateRequest(BaseRequest request) {\n\t\t\n\t}", "@Override\r\n\tpublic void execute(HttpServletRequest request) {\n\r\n\t}", "public void build() {\n\t\t\tRequest request = new Request();\n request.context = context;\n\t\t\trequest.requestType = requestType;\n\t\t\trequest.url = url;\n\t\t\trequest.envelope = envelope;\n\t\t\trequest.headers = headers;\n\n\t\t\trequest.responseListener = responseListener;\n\t\t\trequest.onValidateResponseListener = validateResponseListener;\n\n\t\t\trequest.isDebug = isDebug;\n\n\t\t\trequest.start();\n\t\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }" ]
[ "0.717207", "0.69533783", "0.68395543", "0.6815575", "0.67918354", "0.6720311", "0.66405314", "0.6614798", "0.65520823", "0.65431035", "0.650142", "0.64849615", "0.6481697", "0.64638245", "0.64634854", "0.64634854", "0.64544016", "0.64092", "0.63958496", "0.637522", "0.6347852", "0.6341407", "0.63410985", "0.631069", "0.631069", "0.630806", "0.6303682", "0.6245649", "0.62434417", "0.6230033", "0.6230033", "0.6222588", "0.61961263", "0.61940676", "0.6192095", "0.6185942", "0.6164476", "0.61526865", "0.61437637", "0.6139957", "0.61309445", "0.6130071", "0.6122945", "0.6107136", "0.6101248", "0.60871243", "0.6078425", "0.6074137", "0.6063736", "0.60464853", "0.60406655", "0.60335064", "0.60319597", "0.60319597", "0.60165244", "0.60126996", "0.60116225", "0.60116225", "0.6005153", "0.5999137", "0.5999137", "0.5995031", "0.59875965", "0.5982389", "0.5981069", "0.5970546", "0.59572506", "0.59572506", "0.59481514", "0.5941802", "0.5923601", "0.59221625", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906", "0.5918906" ]
0.0
-1
When button is clicked, call up to owning activity.
@Override public void onClick(View v) { String text = textField.getText().toString(); //String priority = priorityField.getText().toString(); Calendar newDate = Calendar.getInstance(); newDate.set(datePicker.getYear(), datePicker.getMonth(), datePicker.getDayOfMonth()); listener.onAddDialogDone(text, newDate); getDialog().dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickedButton(View view) {\n\n switch (view.getId()) {\n case R.id.contactBook:\n intent = new Intent(this, ContactBookActivity.class);\n startActivity(intent);\n break;\n case R.id.message:\n intent = new Intent(this, SMS_Activity.class);\n startActivity(intent);\n break;\n case R.id.fav_contacts:\n intent = new Intent(this, ContactGridActivity.class);\n startActivity(intent);\n break;\n case R.id.lastCall:\n intent = new Intent(this, LatestCallsActivity.class);\n startActivity(intent);\n break;\n case R.id.microphone:\n SpeechRecognitionHelper.run(this);\n break;\n }\n }", "public void ButtonClicked(View view) {\n Intent intentInput = new Intent(DetailActivity.this, InputActivity.class);\n startActivity(intentInput);\n }", "@Override\n public void onClick(View view) {\n\n startActivity(getIntent());\n }", "public void sendToSearch(View view) {\n // Do something in response to button\n\n\n// open when created SendSearchActivity class\n// Intent intent = new Intent(this, SendSearchActivity.class);\n// startActivity(intent);\n\n }", "public void buttonClicked();", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public void buttonClicked(View view) {\n Intent intent = new Intent(getApplicationContext(), CompanyDetailsActivity.class);\n startActivity(intent);\n\n }", "@Override public void onClick(View arg0) {\n Intent intent = new Intent(OweActivity.this, ReceiveMoneyActivity.class);\n startActivity(intent);\n }", "public void onTaskButtonClick(View view);", "public void buttonPressed()\n {\n userInput.setOnClickListener( new View.OnClickListener()\n {\n\n public void onClick( View view )\n {\n Intent in = new Intent( FromServer1.this, UserInput.class );\n startActivity( in );\n }\n } );\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tIntent intent = new Intent();\n\t\t\tintent.setClass(MainPage.this, AddPage.class);\n\t\t\tstartActivityForResult(intent,0);\n\t\t\toverridePendingTransition(R.anim.push_up_in, R.anim.push_up_out);\n\t\t}", "public void onClick(View v) { // launch when button is clicked\n finish();\n }", "@Override\n public void onClick(View arg0)\n {\n\n ExtendedNewController extendedNewController = new ExtendedNewController();\n startNewControllerActivity(extendedNewController, 0, 0);\n }", "@Override\n public void onButtonClicked(View v) {\n\n Log.e(getClass().getSimpleName(),\"Button clicked !\");\n startActivity(new Intent(this,DetailActivity.class));\n\n }", "public void buttonToExam(View view) {\n Log.i(\"BOTTOM NAVIGATION\", \"to exam button clicked\");\n Intent intent = new Intent(getApplicationContext(), ExamActivity.class);\n// intent.putExtra(\"extra\", \"extra\");\n startActivity(intent);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\r\n\t\t\t\tIntent i=new Intent(getApplicationContext(),Pfillup.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t\t\r\n\t\t\t}", "private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "@Override\n // Function for once the button gets clicked\n public void onClick(View v) {\n Intent i = new Intent(FindOutMore.this, Tab_Main.class);\n // The activity is started and the variable i is placed into this\n startActivity(i);\n // This is an animation overrider...\n // This means that once the button has been pressed it will perform an animation to take\n // the users back to the new page that they have selected...\n overridePendingTransition(R.animator.ui_animation_in, R.animator.ui_animation_out);\n }", "@Override\n public void onClick(View view) {\n System.out.println(view.getId());\n switch(view.getId()){\n case R.id.btnNewWalk:\n showCreateWalkActivity();\n break;\n case R.id.btnNewWaypoint:\n showAddWayPointActivity();\n break;\n case R.id.btnSaveWalk:\n saveWalk();\n break;\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent i = new Intent(Akun.this, Riwayat_pemesanan.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\treceive();\r\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, TriggerActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n presentActivity(view);\n\n\n\n }", "public void signUP(View view) {\n // Do something in response to button\n Intent intent = new Intent(MainActivity.this, SignUpActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n myCallback.buttonClicked();\n Log.d(TAG, \"onClick: \");\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.bnext:\n\t\tIntent i = new Intent(getApplicationContext(),ClientServerJSONActivity.class);\n\t\t//Intent i = new Intent(getApplicationContext(),Form.class);\n\t\tstartActivity(i);\n\t\tbreak;\n\t\tcase R.id.bexit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.button1:\n Intent intent = new Intent();\n intent.setClass(getActivity(), PlayActivity.class);\n startActivity(intent);\n break;\n }\n }", "@Override\n public void onClick(View theView) {\n setUp();\n\n\n }", "@Override\n public void onClick(View view) {\n saveBlocks();\n XmlDataManager.changeProject(model);\n\n Intent i = new Intent(DetailViewActivityEdit.this, MainActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(i);\n finish();\n }", "@Override\n\tpublic void onClick(View view) {\n\t\tif (view.getId() == R.id.btn_sub) {\n\t\t\t// authentication = new Authentication(getActivity());\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0)\r\n\t\t\t{\r\n\t\t\t\tsaveUserDetails();\r\n\r\n\t\t\t\tActivity a = getActivity();\r\n\r\n\t\t\t\tif (a instanceof LauncherActivity)\r\n\t\t\t\t{\r\n\t\t\t\t\t((LauncherActivity) a).loadWeightMeasuringUI();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClicked(final View me) {\r\n\t\t\t\tSDStreetNumber.this.setResult(SUBACTIVITY_RESULTCODE_UP_ONE_LEVEL);\r\n\t\t\t\tSDStreetNumber.this.finish();\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\treceive();\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tputExtra();\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent screenChange = new Intent(getApplicationContext(), settings.class);\n //creating a bundle to store the variables that will be passed into the next\n //activity\n //starting our activity for a result\n startActivity(screenChange);\n }", "public void btnEnquiryClick(View view) {\n startActivity(new Intent(this, EnquiriesActivity.class));\n actionButton.collapse();\n// Toast.makeText(getApplicationContext(), \"Work in progress...\", Toast.LENGTH_LONG).show();\n }", "public void onClick(View view) {\n Intent nextScreen = new Intent(view.getContext(), Mockup1.class);\n startActivityForResult(nextScreen, 0);\n }", "@Override\n public void onClick(View v) {\n switch(v.getId()) {\n // When we click the gps mini button...\n case R.id.fab:\n searchCity();\n break;\n // Click the okay button\n case R.id.okay:\n dontShowThisAgain();\n // If you started this act as normal\n // i.e startActivity then this will\n // return null. If the user runs this on\n // inital app launch this will return null\n if (getCallingActivity() == null) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n } else {\n setResult(RESULT_OK);\n finish();\n }\n\n break;\n default:\n break;\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), HubsActivity.class);\n intent.setData(DatabaseContract.HubEntry.CONTENT_URI);\n startActivity(intent);\n mHubListPopupWindow.dismiss();\n }", "@Override\n public void onClick(View v) {\n Intent returns = new Intent(Welcome.this, Returns.class);\n startActivity(returns);\n\n }", "@Override\r\n \t\t\tpublic void onClick(View arg0) {\n \t\t\t\tIntent intent = new Intent(AppDownloaded.this, AppManager.class);\r\n \t\t\t\tstartActivity(intent);\r\n \t\t\t}", "@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, InputActivity.class));\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.convertButton:\n Intent convertorMainIntent = new Intent(getApplicationContext(),\n ConvertorMainActivity.class);\n startActivity(convertorMainIntent);\n break;\n }\n }", "@Override\n\t\tpublic void onClick(Widget sender) {\n\t\t\t\n\t\t}", "@Override\n public void onClick(View view) {\n Intent i = new Intent(getApplicationContext(), BPActivity.class);\n startActivity(i);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tServiceAdditionActivity.setclass(\"busness\");\r\n\t\t\t\tstartActivity(new Intent(ServiceActivity.this,ServiceAdditionActivity.class));\r\n\t\t\t}", "@Override\r\n\tpublic void onClick(View arg0) {\n\t\t\r\n\t}", "@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link inflatorsActivity}\n Intent inflatorsIntent = new Intent(MainActivity.this, inflatorsActivity.class);\n // Start the new activity\n startActivity(inflatorsIntent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = MainActivity.newIntent(getActivity(), mMonitor.getId());\n startActivity(intent);\n\n }", "public void buttonOnClick(View v) {\n\n }", "@Override\n public void onClick(View view){\n Intent goToList = new Intent(SPQ7Page.this,SPQuestionList.class );\n\n // Executes Intent object.\n startActivity(goToList);\n\n }", "@Override\n public void onClick(View v) {\n routineIntent = new Intent(getApplicationContext(), RoutineTaskActivity.class);\n startActivity(routineIntent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent=new Intent(MainActivity.this,MyActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View v) {\n buttonPressed = 0;\n switch (v.getId()) {\n case R.id.button01:\n buttonPressed = 1;\n break;\n\n case R.id.button02:\n buttonPressed = 2;\n break;\n }\n launchTask();\n }", "@Override public void onClick(View arg0) {\n Intent intent = new Intent(OweActivity.this, SetReminder.class);\n startActivity(intent);\n }", "@Override public void onClick(View arg0) {\n Intent intent = new Intent(OweActivity.this, SetReminder.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n case R.id.buttonStart:\n mScreenPresenter.onStartButtonClicked();\n break;\n case R.id.buttonClear:\n mScreenPresenter.onClearButtonClicked();\n break;\n }\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.button_main_yes:\n new EndpointsAsyncTask().execute();\n break;\n case R.id.button_main_no:\n finish();\n break;\n default:\n break;\n }\n\n }", "public void onClick(View v) {\n\n\n\n startActivity(myIntent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent it = new Intent(MainActivity.this,BillsActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t}", "@Override\n public void onClick(View view) {\n\n openMain3Activity();\n }", "public void buttonHintNext(View view) {\n //using finish to activity\n finish();\n\n //create a new object to start new activity\n Intent intent = new Intent(this, Hint.class);\n //pass object to startActivity\n startActivity(intent);\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NowPlaying.this, classDestination);\n // starting new activity\n startActivity(intent);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t}", "@Override\n public void onClick(View v) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n doClickOnButton();\n }\n });\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, ViewActivity.class));\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Button 1\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getApplicationContext(),\n\t\t\t\t\t\tUpdatesCreatedChain.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(SingleTopActivity.this, SingleTopActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent levelone = new Intent(\"anky.dj.iitkgp.LEVELONE\");\r\n\t\t\t\tstartActivity(levelone);\r\n\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\r\npublic void onClick(View arg0) {\n\tswitch(arg0.getId())\r\n\t{\r\n\t\tcase R.id.bt_other:\r\n\t\t/*Intent i=new Intent();\r\n\t\t\tstartActivity(i);\r\n\t\t\tsetContentView(R.layout.other);*/\r\n\t\t\tIntent Intent=new Intent(MainPage.this,DataSend.class);\r\n\t\t\tIntent.putExtra(\"KEY_LIST\", device);\r\n\t\t\tIntent.putExtra(\"KEY_LISTNUMBER\", count);\r\n\t\t\tstartActivity(Intent);\r\n\t\t\t/*Intent Intent1=new Intent(MainPage.this,AdminPanel.class);\r\n\t\t\tIntent1.putExtra(\"KEY_LIST\", device);\r\n\t\t\tstartActivity(Intent1);*/\r\n \t//setContentView(R.layout.adminhome);\r\n\t\tbreak;\r\n\t}\r\n}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent2 = new Intent(getApplicationContext(), Election_List.class);\n\t\t intent2.putExtra(\"user_id\", user_id);\n\t\t startActivity(intent2);\n\t\t finish();\n\t\t\t\t\n\t\t\t}", "public void button_clicked(View v) {\n mCallback.onButtonClicked(v);\n }", "public void onClick(View view) {\n\t\tswitch (view.getId()) {\n\n\t\t// if user click on \"Send Money\"\n\t\tcase R.id.button_Send:\n\t\tcase R.id.button_Beg:\n\t\t\tmyIntent = new Intent(MainActivity.this, SendBegActivity.class);\n\t\t\tMainActivity.this.startActivity(myIntent);\n\t\t\tbreak;\n\n\t\t// if user click on \"Beg Money\"\n\t\tcase R.id.button_Jackpot:\n\t\t\tmyIntent = new Intent(MainActivity.this, JackpotActivity.class);\n\t\t\tMainActivity.this.startActivity(myIntent);\n\t\t\tbreak;\n\n\t\t// if user click on \"Wallet\"\n\t\tcase R.id.button_Wallet:\n\t\t\tmyIntent = new Intent(MainActivity.this, MyWalletActivity.class);\n\t\t\tMainActivity.this.startActivity(myIntent);\n\t\t\tbreak;\n\n\t\t}\n\t}", "public void onClick(View arg0) {\r\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n startActivity(new Intent(\n HomeScreen.this, AddPoi.class));\n\n }", "public void submit_intsatpos(View button) {\n }", "@Override\n\tpublic void onClick(View arg0) {\n\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(AddMemberActivity.this, CommunityBoardMain.class);\n if (initial_intent.getParcelableExtra(\"sub_parcel\") != null) {\n SubscriptionParcel sub_parcel = initial_intent.getParcelableExtra(\"sub_parcel\");\n intent.putExtra(\"sub_parcel\", sub_parcel);\n }\n startActivity(intent);\n }", "@Override public void onClick(View arg0) {\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent in = new Intent(getApplicationContext(),MainActivity.class);\n\t\t\t\tstartActivity(in);\n\t\t\t}" ]
[ "0.7394604", "0.7341343", "0.7296216", "0.71650475", "0.7154248", "0.7119825", "0.7062442", "0.70499665", "0.70437837", "0.6973891", "0.6942464", "0.6918487", "0.69154465", "0.69151133", "0.6909735", "0.6908135", "0.6907992", "0.6907432", "0.68951356", "0.687527", "0.6874376", "0.68691987", "0.68691987", "0.68691987", "0.68430877", "0.6841848", "0.68399715", "0.68347734", "0.68339926", "0.68287784", "0.6824026", "0.68135226", "0.6801262", "0.6796991", "0.67909163", "0.6778806", "0.6761346", "0.6756642", "0.6754902", "0.6750772", "0.67499393", "0.67499393", "0.67499393", "0.67499393", "0.6748725", "0.67475516", "0.67432827", "0.67393833", "0.67358315", "0.67322075", "0.6730655", "0.6729751", "0.6724179", "0.67134356", "0.67069006", "0.670196", "0.6701421", "0.66994154", "0.66966766", "0.66937995", "0.66886246", "0.6688022", "0.6684111", "0.6683114", "0.6682866", "0.6681772", "0.6681772", "0.6680164", "0.6678709", "0.6678004", "0.6676513", "0.6674079", "0.6667455", "0.66622555", "0.66622555", "0.66622555", "0.6660263", "0.665835", "0.66581625", "0.66567063", "0.66535836", "0.66440076", "0.66434133", "0.66425526", "0.66425526", "0.66425526", "0.66425526", "0.66425526", "0.66417027", "0.66409516", "0.6639847", "0.6635162", "0.6632915", "0.66294324", "0.6627896", "0.6622376", "0.6617928", "0.66161656", "0.66153055", "0.66138643", "0.66131264" ]
0.0
-1
Performs a click in the middle of the element.
public void click() throws ApplicationException, ScriptException { mouse.click(driver, locator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performClick() {\n\t\tgetWrappedElement().click();\n\t}", "public final void click() {\n getUnderlyingElement().click();\n }", "void click(int x, int y, Keys... modifiers);", "void clickSomewhereElse();", "public void clickOn(WebElement element) {\r\n\t\telement.click();\r\n\t}", "void mouseClicked(double x, double y, MouseEvent e );", "public void click(WebElement element) {\nelement.click();\n\t}", "@Override\n public void click(int x, int y)\n {\n\n if(!clicked)\n {\n if(game.setFirstClickCords(x/50,y/50))\n clicked = true;\n }\n else\n {\n game.move(x/50,y/50);\n clicked = false;\n \n }\n \n repaint();\n }", "@Override\n public void clicked(InputEvent e, float x, float y) {\n }", "public abstract void click(long ms);", "@Override\n\tpublic void middleClick(MouseEvent e) {\n\n\t}", "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "public void myClick(WebElement element) \n\t{\n\t\twaitHelper.waitForElement(element, ObjectReader.reader.getExplicitWait());\n\t\telement.click();\t\n\t}", "public void click(WebElement element) {\n\t\telement.click();\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e)\r\n\t{\r\n\t\tjump();\r\n\t}", "public void elementClick(WebElement element) {\n\t\telementToBeClickable(element);\n\t\telement.click();\n\t}", "@Override\r\n\tpublic void clickObject() {\n\r\n\t}", "public void clickElement(WebElement element) {\n wait = new WebDriverWait(eventDriver, 20);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n element.click();\n }", "public void clickElementLocation(By anyElement)\n {\n\n Actions execute = new Actions(driver);\n execute.moveToElement(findElement(anyElement)).click().perform();\n }", "void mouseClicked(MouseEvent mouseEvent);", "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "Point userClickPoint();", "public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}", "@Override\n public void onClick(int x, int y)\n {\n }", "public void mouseClicked(MouseEvent event){}", "public void mouseClicked( MouseEvent event ){}", "public void mouseClicked(MouseEvent e)\n {}", "public void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "private void clickChildAt(final int x, final int y) {\n final int index = getContainingChildIndex(x, y);\n if (index != INVALID_INDEX) {\n final View itemView = getChildAt(index);\n final int position = mFirstItemPosition + index;\n final long id = mAdapter.getItemId(position);\n performItemClick(itemView, position, id);\n }\n }", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void actionClick(WebElement element) {\r\n\t\twaitForElement(element);\r\n\t\tActions action = new Actions(driver);\r\n\t\taction.click(element).build().perform();\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "void onMouseClicked(MouseEventContext mouseEvent);", "public static void clickOnElement(WebElement element) {\n\t\telement.click();\n\t}", "public abstract void mouseClicked(MouseEvent e);", "public void click() {\n\t\tif(this.buttonListener != null) {\n\t\t\tthis.buttonListener.onClicked();\n\t\t}\n\t}", "public void click() {\n if(!isEnabled()) return;\n\n boolean realHovered = hovered;\n hovered = true;\n onPress();\n onRelease();\n hovered = realHovered;\n }", "public void clickCoordinate(By anyElement,int coordX,int coordY)\n {\n /*\n Moves the mouse to an offset from the top-left corner of the companyName element, then click it.\n Get chrome extension Mouse XY to find coordinates of a web-page\n The companyName element has coordinates of about (80, 100) when in 100% zoom\n The coordinates are heavily dependent on the size of the browser screen(window)/resolution.\n This function allows you to pick a coordinate, and it clicks on said chosen coordinate\n */\n Actions execute = new Actions(driver);\n WebElement offsetElement = findVisibleElement(anyElement);\n Point coordinate = offsetElement.getLocation();\n coordX -= coordinate.getX();\n coordY -= coordinate.getY();\n execute.moveToElement(offsetElement, coordX, coordY).click().perform();\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) { \r\n }", "public void mouseClicked(MouseEvent arg0) {\n }", "@Test\n\t@TestProperties(name = \"Click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickElement() {\n\t\tfindElement(by, locator).click();\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tselect();\n\t\te.consume();\n\t}", "public void click() {\n this.lastActive = System.nanoTime();\n }", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void execute(Element element) {\n if (\"true\".equals(element.getStyle().getProperty(\"visible\"))\n && element.getState().isRelease()) {\n String method = element.getStyle().getProperty(\"onClick\");\n String controller = element.getUI().getController();\n if (method != null && controller != null) {\n UIUtil.invokeClickMethod(controller, method);\n }\n }\n }", "public void mouseClicked(MouseEvent event)\n\t\t{}", "public void click(WebElement element) {\n\t\ttry {\n\t\t\telement.click();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "void clickAmFromMenu();", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\n\tpublic void mouseClicked(int arg0, int arg1, int arg2, int arg3) {\n\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\n }", "public void mouseClicked(MouseEvent e) {\n\r\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "public void click(){\n\t\t\n\tfor(MouseListener m: listeners){\n\t\t\t\n\t\t\tm.mouseClicked();\n\t\t}\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "public void click() {\n\t\tSystem.out.println(\"LinuxButton Click\");\r\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent me) {\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "public void mouseClicked(MouseEvent event) { \n\t\t\n\t}", "public void click() {\n\t\tif(toggles) {\n\t\t\tvalue = (value == 0) ? 1 : 0;\t// flip toggle value\n\t\t}\n\t\tupdateStore();\n\t\tif(delegate != null) delegate.uiButtonClicked(this);\t// deprecated\n\t}", "abstract void onClick(MouseClick click);", "@Override\n\tpublic void mouseClicked(MouseEvent me) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent me) {\n\t\t\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}" ]
[ "0.7146138", "0.7011825", "0.6772781", "0.6490523", "0.64449716", "0.64428645", "0.6299638", "0.628867", "0.6287842", "0.6262816", "0.6254941", "0.6216322", "0.62030894", "0.61989295", "0.617513", "0.6144076", "0.6141994", "0.61340576", "0.6119782", "0.6116015", "0.6115261", "0.6112592", "0.6112592", "0.6112592", "0.6112592", "0.60658145", "0.60597444", "0.6014123", "0.59945965", "0.5973248", "0.5971897", "0.5971418", "0.5970656", "0.59657717", "0.59657717", "0.59630245", "0.59614235", "0.59614235", "0.59614235", "0.5960566", "0.59492046", "0.59492046", "0.5948808", "0.5948808", "0.5942404", "0.5941457", "0.5920166", "0.59123564", "0.5904522", "0.59024554", "0.5888443", "0.58883274", "0.58883274", "0.58883274", "0.5879887", "0.5872504", "0.586667", "0.5865331", "0.5863924", "0.58574164", "0.58574164", "0.58572984", "0.5853124", "0.5845583", "0.58320236", "0.58298147", "0.5816532", "0.57987136", "0.57981795", "0.57948107", "0.5792796", "0.5792796", "0.5792796", "0.5792796", "0.5792796", "0.5792796", "0.5792796", "0.57896584", "0.5786138", "0.5783797", "0.5783797", "0.57779974", "0.577399", "0.57738394", "0.57738394", "0.57738394", "0.577364", "0.5763981", "0.57636267", "0.5756738", "0.5752848", "0.57520664", "0.57451254", "0.5740919", "0.5739138", "0.5739138", "0.5733282", "0.5733282", "0.5733282", "0.5733282" ]
0.6335799
6
Performs a click on the element if it exists.
public void clickIfExists() { try { waitTillElementVisible(5000); mouse.click(driver, locator); } catch (Exception e) { log.error("exception :", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performClick() {\n\t\tgetWrappedElement().click();\n\t}", "public final void click() {\n getUnderlyingElement().click();\n }", "public void myClick(WebElement element) \n\t{\n\t\twaitHelper.waitForElement(element, ObjectReader.reader.getExplicitWait());\n\t\telement.click();\t\n\t}", "@Test\n\t@TestProperties(name = \"Click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickElement() {\n\t\tfindElement(by, locator).click();\n\t}", "public void clickElement(WebElement element) {\n\t\ttry {\n\t\t\telement.click();\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\n\t\t} catch (NullPointerException e1) {\n\t\t\te1.printStackTrace();\n\n\t\t}\n\t}", "public void clickOn(WebElement element) {\r\n\t\telement.click();\r\n\t}", "public static void click(WebElement element) {\r\n\t\tif (isDisplayed(element)) {\r\n\t\t\telement.click();\r\n\t\t} else {\r\n\t\t\tAssert.assertTrue(false, \"WebElement not clickable \" + element);\r\n\t\t}\r\n\t}", "public static void click(WebElement element) {\r\n\t\ttry{\r\n\t\t(element).click();\r\n\t\tlog(element+\" is clicked successfully=PASS\");\r\n\t }\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlog(\"Failed to click\"+element+\"=FAIL\");\r\n\t\t}\r\n\t}", "public void click(WebElement element) {\nelement.click();\n\t}", "public void clickElement(WebElement element) {\n wait = new WebDriverWait(eventDriver, 20);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n element.click();\n }", "public static void clickOnElement(WebElement element) {\n\t\telement.click();\n\t}", "public static void click(final WebElement element) {\n try {\n defaultWait.until(ExpectedConditions.visibilityOf(element));\n element.click();\n } catch (Exception exception) {\n Log.logError(\"Element not displayed on UI :\" + element + \" \" + exception.getMessage());\n throw new ElementNotVisibleException(\"Cant Find Element\" + element.toString());\n }\n }", "public void click(WebElement element) {\n\t\telement.click();\n\t}", "public void elementClick(WebElement element) {\n\t\telementToBeClickable(element);\n\t\telement.click();\n\t}", "public void execute(Element element) {\n if (\"true\".equals(element.getStyle().getProperty(\"visible\"))\n && element.getState().isRelease()) {\n String method = element.getStyle().getProperty(\"onClick\");\n String controller = element.getUI().getController();\n if (method != null && controller != null) {\n UIUtil.invokeClickMethod(controller, method);\n }\n }\n }", "public static boolean clickElement(WebElement element) {\n\n\t\tboolean status;\n\n\t\ttry {\n\t\t\thighlight(element);\n\t\t\telement.click();\n\t\t\tstatus = true;\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tstatus = false;\n\t\t}\n\n\t\treturn status;\n\t}", "public void click(WebElement element) {\n\t\ttry {\n\t\t\telement.click();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public void actionClick(WebElement element) {\r\n\t\twaitForElement(element);\r\n\t\tActions action = new Actions(driver);\r\n\t\taction.click(element).build().perform();\r\n\t}", "public void waitAndClick(WebElement element) {\r\n\t\twaitForElement(element);\r\n\t\telement.click();\r\n\t}", "@SuppressWarnings(\"EmptyMethod\")\n\t@Override\n public boolean performClick() {\n return super.performClick();\n }", "public void clickOnWebElement(WebElement element) {\r\n try {\r\n Thread.sleep(2000);\r\n element.click();\r\n logger.info(\"Element was clicked\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n logger.error(\"Cannot work with element\");\r\n Assert.fail(\"Cannot work with element\");\r\n }\r\n }", "public void click() throws ApplicationException, ScriptException {\n mouse.click(driver, locator);\n }", "public void clickItem(WebElement element) throws Exception {\n try {\n element.click();\n } catch (StaleElementReferenceException e){\n By by = By.id(element.getAttribute(\"id\"));\n element = findElementWithRetry(by, 10);\n JavascriptExecutor js = (JavascriptExecutor)driver;\n js.executeScript(\"arguments[0].click();\", element);\n } catch (Exception e){\n JavascriptExecutor js = (JavascriptExecutor)driver;\n js.executeScript(\"arguments[0].click();\", element);\n }\n }", "protected void click(By locator) {\n waitForVisibilityOf(locator, 5);\n waitForElementToBeClickable(locator);\n find(locator).click();\n }", "protected void findWebElementAndClick (By webElementSelector){\n\t\tWebElement button = findWebElement(webElementSelector);\n\t\ttry {\t\t\n\t\t\tbutton.click();\n\t\t} catch (StaleElementReferenceException e) {\n\t\t\tthrow new AssertionError(\"Found the web element, but cannot perform click action. \" + webElementSelector.toString());\n\t\t}\t\t\n\t}", "public void clickElementLocation(By anyElement)\n {\n\n Actions execute = new Actions(driver);\n execute.moveToElement(findElement(anyElement)).click().perform();\n }", "public void click(By locator){\n\t\tWebElement element = findElementClickable(locator);\n\n\t\ttry {\n\n try {\n element.click();\n }catch(StaleElementReferenceException e)\n {\n\t\t\t\telement = findElementClickable(locator);\n\t\t\t\telement.click();\n }\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"Exception \"+ e +\" thrown while clicking on object using locator \"+locator);\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n }", "public void click(By elementDefinition) throws Exception {\n try {\n waitForVisibility(elementDefinition);\n waitForElementClickable(elementDefinition);\n info(\"Performing click operation on element :: \" + elementDefinition);\n getDriver().findElement(elementDefinition).click();\n } catch (Exception e) {\n error(\"Exception occurred while trying to click element with definition \" + elementDefinition);\n error(Throwables.getStackTraceAsString(e));\n throw new Exception(Throwables.getStackTraceAsString(e));\n }\n }", "void clickSomewhereElse();", "public void clickOnElement (By locator){\n appiumDriver.findElement(locator).click();\n }", "public static void JSclickOnWebElement(WebElement element) {\r\n\t\tjs = (JavascriptExecutor) driver;\r\n\t\tjs.executeScript(\"arguments[0].click();\", element);\r\n\t}", "public void Click(WebElement element, String info){\n\t\tif (element != null) {\n\t\t\ttry {\n\t\t\t\telement.click();\n\t\t\t\tlog.info(\"Clicked On :: \" +info);\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tlog.info(\"Cannot click on element\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void waitForClickability(WebElement element){\n getWait().until(ExpectedConditions.elementToBeClickable(element));\n }", "protected WebElement waitForElementToBeClickable(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n return element;\n }", "@Override\n public boolean performClick() {\n return super.performClick();\n }", "@Override\n public void fw_javascriptClick() {\n WrapsDriver wd = (WrapsDriver) element;\n ((JavascriptExecutor) wd.getWrappedDriver()).executeScript(\"arguments[0].click();\", element);\n }", "public boolean clickUsingJavaScript(WebElement element){\n\t \tboolean res = true;\n\t \ttry {\n\t JavascriptExecutor executor = (JavascriptExecutor)driver;\n\t executor.executeScript(\"arguments[0].click();\", element);\n\t\t\t} catch (Exception e) {\n\t\t\t\tres = false;\n\t\t\t}\n\t \treturn res;\n\t }", "@SuppressWarnings({ \"unused\" })\r\n\tpublic boolean click(final @NonNull T node) {\r\n\t\t// Override this\r\n\t\treturn false;\r\n\t}", "public void clickElement(String strElement, WebElement element) {\n log.traceEntry();\n try {\n if (webWaitsutil.isElementPresent(element) && element.isEnabled()) {\n log.info(\"Clicking element: [{}]\", strElement);\n scrollIntoView(element);\n highlightElement(element);\n element.click();\n } else {\n driver.manage().timeouts().implicitlyWait(ZERO_TIMEOUT, TimeUnit.SECONDS);\n WebDriverWait driverWait = new WebDriverWait(driver, EXPLICIT_WAIT_TIMEOUT);\n driverWait.until(ExpectedConditions.elementToBeClickable(element));\n log.info(\"Clicking element: [{}]\", strElement);\n scrollIntoView(element);\n highlightElement(element);\n element.click();\n }\n } catch (Exception e) {\n log.error(\"Unable to click element! [{}] -- [{}]\", strElement, e.getMessage());\n } finally {\n driver.manage().timeouts().implicitlyWait(FileMgmtUtility.getNumberValue(CommonConstants.DEFAULT_TIMEOUT), TimeUnit.SECONDS);\n }\n log.traceExit();\n }", "protected void click(By locator) {\n \tint waitTime = 10;\n \tWebElement element = new WebDriverWait(DRIVER, waitTime)\n \t.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\n \t element.click();\n }", "public static void clickElement(WebElement obj, String objName) throws IOException {\r\n\r\n\t\tif (obj.isDisplayed()){\r\n\t\t\tobj.click();\r\n\t\t\tUpdate_Report( \"Pass\", \"clickElement\", objName +\" is clicked\");\r\n\t\t}else{\r\n\t\t\tUpdate_Report( \"Fail\", \"clickElement\", objName +\" is not displayed please check your application \");\r\n\t\t}\r\n\t}", "@Override\n public boolean performClick() {\n throwEvents = true;\n return super.performClick();\n }", "public WebElement elementToBeClickable(final WebElement element) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.elementToBeClickable(element));\n }", "public void clickOnElement(By by)\n {\n driver.findElement(by).click();\n }", "public SeleniumQueryObject click() {\n\t\tLOGGER.debug(\"Clicking \"+this+\".\");\n\t\treturn ClickFunction.click(this, this.elements);\n\t}", "public void isElementClickable(WebElement elem) {\n try {\n driverWait.until(ExpectedConditions.elementToBeClickable(elem));\n System.out.println(\"Element is clickable\");\n } catch (Exception e) {\n Assert.fail(\"The element isn't clickable\");\n }\n }", "public void elementToBeClickable(WebElement element) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t} catch (StaleElementReferenceException ex) {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t\t\n\t\t\tAssert.fail(\"Stale Element exception:\" + ex.getMessage());\n\t\t} catch (NoSuchElementException ex) {\n\t\t\tSystem.out.println(\"No such element exception:\" + ex.toString());\n\t\t\tAssert.fail(\"No such element exception:\" + ex.toString());\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Exception in elementToBeClickable method:\" + ex.toString());\n\t\t\tAssert.fail(\"Exception in elementToBeClickable method:\" + ex.toString());\n\t\t}\n\t}", "public static void clickOnElement(By by){ driver.findElement(by).click();\n }", "public static boolean clickOnElement(WebElement element) throws InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\n\t\t\tif (element.isDisplayed() && element.isEnabled()) {\n\t\t\t\telement.click();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"element is not clicked.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured. \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "public static void clickElement(WebDriver driver, WebElement element) throws Exception {\n\n\t\tlogger.info(\"Clicking element \" + element);\n\t\tif(driver instanceof InternetExplorerDriver)\n\t\t{\n\t\t\tmoveToElementAndClick(driver, element);\n\t\t}\n\t\telse{\n\t\t\tif (isElementClickable(driver, element)) {\n\t\t\t\thighlightElementBorder(driver, element);\n\t\t\t\telement.click();\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Element not in state of clickable\");\n\t\t\t}\n\t\t}\n\n\t\tlogger.info(\"Waited and Clicked on element \");\n\n\t}", "private void clickInvite(){\n WebDriverHelper.clickElement(inviteButton);\n }", "@Test\n\t@TestProperties(name = \"Double click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void doubleClickElement() {\n\t\tnew Actions(driver).doubleClick(findElement(by, locator)).doubleClick().perform();\n\t}", "@Test\n\t@TestProperties(name = \"Click and hold element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickAndHoldElement() {\n\t\tnew Actions(driver).clickAndHold(findElement(by, locator));\n\t}", "public void clickOnElement(String elementName) {\n wait.forElementToBeDisplayed(15, returnElement(elementName), elementName);\n returnElement(elementName).click();\n }", "public static void waitUntilElementIsClickable(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.elementToBeClickable(element));\n }", "public void waitForElementToBeClickable(WebElement element) {\n wait.until(ExpectedConditions.visibilityOf(element));\n wait.until(ExpectedConditions.elementToBeClickable(element));\n }", "public void clickOnElement (String locator){\n String jQuerySelector = \"return $(\\\"\" + locator + \"\\\").get(0);\";\n WebElement element = (WebElement) js.executeScript(jQuerySelector);\n element.click();\n }", "public void click(String locator) {\n waitForElementClickable(locator);\n driver.findElement(By.xpath(locator)).click();\n }", "public void clickProductDetailsAddToCartBtn(){\n clickElement(productDetailsAddToCart);\n }", "public void click(WebDriver driver, By byWebElement) {\n }", "void clickItem(int uid);", "public static void clickElement(WebElement element, AndroidDriver driver, String elementName) throws IOException {\n\n\t\ttry {\n\t\t\tlogger.info(\"---------Verifying element is displayed or not ---------\");\n\t\t\twaitForElement(element, driver, elementName, 30);\n\t\t\telement.click();\n\t\t\tMyExtentListners.test.pass(\"Verify user is able to click on \" + \"\\'\" + elementName + \"\\'\"\n\t\t\t\t\t+ \" || User is able to click on \" + \"\\'\" + elementName + \"\\'\");\n\t\t} catch (AssertionError error) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify user is able to click on \" + \"\\'\" + elementName\n\t\t\t\t\t+ \"\\'\" + \" || User is not able to click on \" + \"\\'\" + elementName + \"\\'\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tAssert.fail(\"unable to Click on \" + \"\\'\" + elementName + \"\\'\");\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tthrow error;\n\t\t} catch (Exception error) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify user is able to click on \" + \"\\'\" + elementName\n\t\t\t\t\t+ \"\\'\" + \" || User is not able to click on \" + \"\\'\" + elementName + \"\\'\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tAssert.fail(\"unable to Click on \" + \"\\'\" + elementName + \"\\'\");\n\t\t\tthrow error;\n\t\t}\n\n\t}", "public static void click(By locator) throws CheetahException {\n\t\ttry {\n\t\t\twait_for_element(locator);\n\t\t\tWebElement element = CheetahEngine.getDriverInstance().findElement(locator);\n\t\t\tdriverUtils.highlightElement(element);\n\t\t\tdriverUtils.unHighlightElement(element);\n\t\t\telement.click();\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "public static void clickElement(By by)\n\t{\n\t\tgetElement(by).click();\n\t}", "public void clickById(String id) {\n\n\n driver.findElementById(id).click();\n\n\n }", "public static void clickonElement(By by)\n {\n driver.findElement(by).click();\n }", "public static void ClickElement(WebElement ele,String Objectname) {\n\t\tif (ele.isDisplayed())\n\t\t{\n\t\t\tele.click();\n\t\n\t\t\tSystem.out.println(Objectname +\"has been successfully clicByked\");\n\t\t\t}\n\t\t\telse\n\t\t\t{System.out.println(\"Object is not displayed\");\n\t\t\t}\t\n\t}", "public void clickJS(WebElement element) {\n\t\tgetExecutor().executeScript(\"arguments[0].click();\", element);\n\t\t\n\t}", "@And (\"^I click \\\"([^\\\"]*)\\\"$\")\n\tpublic void click(String object){\n\t\tString result = selenium.click(object);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "private static boolean isElementClickable(WebDriver driver,\n\t\t\tWebElement element) {\n\t\ttry {\n\t\t\tlogger.info(\"Checking if Element is Clickable\");\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tlogger.info(\"Some thing wrong with Element \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "public void waitElementToBeClickable(WebElement webElement) {\n wait.until(ExpectedConditions.elementToBeClickable(webElement));\n }", "public void clickOnFridge() {\n click(getElementFromList(containerFrigde, 0));\n }", "public void clickProductDetailsViewInCartBtn(){\n clickElement(productDetailsViewInCart);\n }", "public static void clickOnElem(String locator) {\n try {\n // Check and click by cssSelector\n driver.findElement(By.cssSelector(locator)).click();\n } catch (Exception e1) {\n try {\n // Check and click by name\n driver.findElement(By.name(locator)).click();\n } catch (Exception e2) {\n try {\n // Check and click by xpath\n driver.findElement(By.xpath(locator)).click();\n } catch (Exception e3) {\n // Check and click by id\n driver.findElement(By.id(locator)).click();\n }\n }\n }\n }", "public void clickMenuButton(){\n waitForClickable(menuHeaderIcon);\n driver.findElement(menuHeaderIcon).click();\n }", "@Override\r\n\tpublic void clickObject() {\n\r\n\t}", "@And (\"^I click on \\\"([^\\\"]*)\\\"$\")\n\tpublic void click_on(String object){\n\t\tString result = selenium.clickButton(object);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "public WebElement waitForElementToBeClickable(final WebElement webElement)\n {\n // waits for the save to be registered before performing next action.\n System.out.println(\"Wait for clickable \" + webElement);\n return new WebDriverWait(driver,\n DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_MILLIS).ignoring(\n WebDriverException.class).ignoring(StaleElementReferenceException.class).\n until(ExpectedConditions.elementToBeClickable(webElement));\n }", "@Override\n\tpublic void beforeClickOn(WebElement element, WebDriver driver) {\n\t\t\n\t}", "public static boolean contextClickOnElement(WebDriver driver, WebElement element, WebElement menuItemToBeSelected) {\n\t\ttry {\n\t\t\tif (driver != null) {\n\t\t\t\tif (element.isDisplayed() && element.isEnabled()) {\n\t\t\t\t\tActions action = new Actions(driver);\n\t\t\t\t\taction.contextClick(element).perform();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\t\t\twait.until(ExpectedConditions.visibilityOf(menuItemToBeSelected));\n\t\t\t\t\tmenuItemToBeSelected.click();\n\t\t\t\t\tSystem.out.println(\"Right clicked on element and selected menu option.\");\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Element is either not enabled or displayed. \");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Driver is null.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\");\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n public void afterClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }", "public void clickOnWebElement(By by){\n driver.findElement(by).click();\n }", "public static void waitForClick(AndroidDriver<AndroidElement> androidDriver, By element){\r\n\t\tWebDriverWait wait= new WebDriverWait(androidDriver, 30);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n\t}", "public void clickByName(String elementByName) {\n getDriver().findElementByName(elementByName).click();\n }", "private void clickOnView(int viewId){\n\t\tonView(withId(viewId)).perform(click());\n\t}", "public void beforeClickOn(WebElement element, WebDriver driver) {\n\t\t\r\n\t}", "public void waitForElementToBeClickable(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(webElement));\r\n\t}", "@Override\n\tpublic void afterClickOn(WebElement element, WebDriver driver) {\n\t\t\n\t}", "public void clickOnAddToCartButton()\n \t{\n \t\tproductRequirementsPageLocators.clickAddToCartButton.click();\n\n \t}", "public void click_JS(By locator)\n\t\t{\n\t\t\tWebElement element = findElementClickable(locator);\n\t\t\ttry {\n\t\t\t\tJavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\t\t\texecutor.executeScript(\"arguments[0].click();\", element);\n\t\t\t\tLOGGER.info(\"Step : \" + Thread.currentThread().getStackTrace()[2].getMethodName() + \": Pass\");\n\t\t\t}catch(Exception e)\n\t\t\t{\n\t\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n\t\t\t\tthrow new NotFoundException(\"Exception \"+ e +\" thrown while clicking on object using locator \"+locator);\n\n\t\t\t}\n\n\t\t}", "private boolean clickChildAt(final int x, final int y)\n\t{\n\t\tfinal int index = getContainingChildIndex(x, y);\n\t\tif (index != INVALID_INDEX)\n\t\t{\n\t\t\tfinal View itemView = getChildAt(index);\n\t\t\tfinal int position = _firstItemPosition + index;\n\t\t\tfinal long id = _adapter.getItemId(position);\n\t\t\treturn performItemClick(itemView, position, id);\n\t\t}\n\t\treturn false;\n\t}", "public static boolean clickOnElementUsingJavaScript(WebDriver driver, WebElement element)\n\t\t\tthrows InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\n\t\t\tif (element.isDisplayed() && element.isEnabled()) {\n\t\t\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\t\t\tjs.executeScript(\"arguments[0].click();\", element);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"element is not clicked.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured. \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n public void beforeClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }", "public void click() {\n\t\tif(this.buttonListener != null) {\n\t\t\tthis.buttonListener.onClicked();\n\t\t}\n\t}", "public void clickOnSearchButton() {\n elementControl.clickElement(searchButton);\n }", "public void beforeClickOn(WebElement element, WebDriver driver) {\n\t\tSystem.out.println(\"Clicking on \"+element.toString());\n\t}", "public void clickOnTrashIcon() {\n try {\n waitForVisibleElement(trashToDoBtnEle, \"Trash ToDo icon\");\n hoverElement(trashToDoBtnEle, \"Hover trash icon \");\n clickElement(trashToDoBtnEle, \"Click on trash icon\");\n NXGReports.addStep(\"Click on trash ToDo icon\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Can not click on trash ToDo icon\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "protected void clickJs(WebElement elemento) {\n\t\texecuteJavaScript(elemento, \"click()\");\n\t}", "public boolean jsClick(By locator){\n \tboolean isClicked = false;\n \tfor(int attempt=0;attempt<3;attempt++) {\n \ttry {\n \t\tif(!isClicked) {\n \t\t//waitForElementClickable(locator);\n \t\t\twaitForElementPresent(elementTimeout);\n WebElement element = driver.findElement(locator);\n JavascriptExecutor executor = (JavascriptExecutor)driver;\n executor.executeScript(\"arguments[0].click();\", element);\n isClicked = true;\n \t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tisClicked = false;\n\t\t}\n \t}\n \treturn isClicked;\n }", "private void clickMenuItem(JMenuItem item) {\n\n\t\ttry {\n\n\t\t\tSwingUtilities.invokeAndWait(() -> item.doClick());\n\n\t\t} catch (InterruptedException | InvocationTargetException e) {\n\n\t\t\tthrow new GameException(\"Swing invocation exception during testing\");\n\n\t\t}\n\n\t}" ]
[ "0.74816096", "0.7227264", "0.7208013", "0.7205225", "0.7143088", "0.71279866", "0.7115852", "0.7076389", "0.7068937", "0.7052129", "0.6993996", "0.6944417", "0.6943919", "0.6888682", "0.6882423", "0.6831879", "0.675739", "0.675439", "0.66054344", "0.65405756", "0.6520049", "0.6502062", "0.65016365", "0.6471424", "0.64556926", "0.64523387", "0.6415809", "0.64145494", "0.6405245", "0.6404435", "0.63733494", "0.6372277", "0.633409", "0.6266118", "0.62505764", "0.6246501", "0.6245253", "0.624366", "0.62376153", "0.62314326", "0.62115526", "0.6185886", "0.6178459", "0.61432475", "0.6126049", "0.61241543", "0.6122163", "0.6096701", "0.6093603", "0.6076797", "0.6074223", "0.6072296", "0.6065781", "0.6065551", "0.60644275", "0.60577124", "0.6045394", "0.6017392", "0.60156226", "0.6012474", "0.6009925", "0.60069835", "0.6005334", "0.5998613", "0.59744215", "0.59566265", "0.59509224", "0.59500754", "0.5927535", "0.5915687", "0.591113", "0.5902871", "0.5878155", "0.5872025", "0.5868965", "0.5851387", "0.5827238", "0.5824323", "0.5815499", "0.58054155", "0.5759769", "0.57582587", "0.57569104", "0.5747891", "0.57445514", "0.57318556", "0.5724763", "0.57244354", "0.57240313", "0.57157534", "0.571481", "0.571226", "0.5711333", "0.5709212", "0.5708067", "0.5690317", "0.5681802", "0.56812936", "0.56783926", "0.567061" ]
0.75566524
0
private static byte pointType = POINT_TYPE_STANDARD; process the route data on a map
public FMap(String rute) { super(rute); init(rute); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDirectionSuccess(List<Points> point) {\n for (Points points:point){\n PolylineOptions polyLineOptions = new PolylineOptions().geodesic(true).color(Color.BLUE\n ).width(15);\n for (int i = 0; i < points.points.size(); i++)\n polyLineOptions.add(points.points.get(i));\n\n polylinePaths.add(mMap.addPolyline(polyLineOptions));\n\n }\n\n }", "@Override\n\t\t\tpublic boolean typeMap2Point(DeviceType2PointsReq req) {\n\t\t\t\treturn false;\n\t\t\t}", "void newRoutePoint(RoutePointDTO routePointDTO, RouteDTO routeDTO, List<RoutePointDTO> points);", "@Override\n public void onMapClick(@NonNull LatLng point) {\n \n if (destinationMarker != null) {\n map.removeMarker(destinationMarker);\n }\n\n destinationMarker = map.addMarker(new MarkerOptions().position(point));\n\n destinationPosition = Point.fromLngLat(fLon.get(fLon.size()-1), fLat.get(fLon.size()-1));\n originPosition = Point.fromLngLat(originLocation.getLongitude(), originLocation.getLatitude());\n getRoute(originPosition, destinationPosition);\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 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 void generateLayerWaypoints() {\n\t\tJSONObject geoJsonWaypoints = new JSONObject();\r\n\r\n\t\tgeoJsonWaypoints.put(\"type\", \"FeatureCollection\");\r\n\t\t// complete geoJsonWayPoints\r\n\t\tgeoJsonWaypoints.put(\"features\", _waypointsFeatures);\r\n\r\n\t\t// generate private String from geoJsonAirportsObject\r\n\t\t_waypointsLayerString = geoJsonWaypoints.toString();\r\n\r\n\t\t// implementation of a Map interface.\r\n\r\n\t\tfor (int i = 0; i < _waypointsFeatures.length(); i++) {\r\n\t\t\t// Retrieve the id of point\r\n\t\t\tJSONObject featureObj = _waypointsFeatures.optJSONObject(i);\r\n\t\t\tString id;\r\n\t\t\ttry {\r\n\t\t\t\tid = featureObj.getString(\"id\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.out.println(\"Y'a pas d'id !\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Retrieve coordinates of point\r\n\t\t\tJSONObject geometryObj = featureObj.getJSONObject(\"geometry\");\r\n\t\t\tJSONArray coordinatesArray = geometryObj.getJSONArray(\"coordinates\");\r\n\t\t\tfloat lon = coordinatesArray.getFloat(0);\r\n\t\t\tfloat lat = coordinatesArray.getFloat(1);\r\n\r\n\t\t\t// Retrieve type of point\r\n\t\t\tJSONObject geometryO = featureObj.getJSONObject(\"geometry\");\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tString typePoint = geometryO.getString(\"type\");\r\n\t\t\t// to check if the data retrieve is correct\r\n\t\t\t// System.out.println(\"TOTO : \" + id + \", \" + longitude + \", \" + latitude);\r\n\r\n\t\t\t// Create a Point2D to add it to the dictionary\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tPoint2D pt = new Point2D.Float(lon, lat);\r\n\r\n\t\t\t// add points to dictionary ( id is the \"key\", latitude and longitude are\r\n\t\t\t// the\"value\")\r\n\t\t\t_dictWaypoints.put(id, featureObj);\r\n\r\n\t\t}\r\n\r\n\t}", "public void setRoutePoint(String routePoint) {\n\t\t\tthis.routePoint = routePoint;\n\t\t}", "private void routeDrawing(Location location) {\n\n // validity check in case the first point does not have a previous point\n if (previousLocation == null) {\n // copy the current location to the previous point\n previousLocation = location;\n }\n double lat = location.getLatitude();\n double lon = location.getLongitude();\n\n latitude = lat;\n longitude = lon;\n latList.add(latitude);\n lonList.add(longitude);\n\n // previous coordinates\n //System.out.println(\"previous Location: \" + previousLocation.getLatitude() + \" \" + previousLocation.getLongitude());\n // current coordinates\n //System.out.println(\"Current Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n\n // Polyline Options differ from\n PolylineOptions lineOptions = new PolylineOptions();\n // set the option of each part of polyline\n // 0.03 is the location update interval also the drawing interval\n vdraw = (GetDistance(previousLocation.getLatitude(), previousLocation.getLongitude(), location.getLatitude(), location.getLongitude()))/0.3;\n System.out.println(\"vdraw: \"+vdraw);\n if (vdraw<0.01){\n\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.slow))\n .width(30);\n System.out.print(\"I am running slow\");\n }\n if (vdraw>=0.008 && vdraw<=0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.commen))\n .width(30);\n System.out.print(\"I am running normally\");\n }\n if (vdraw>0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.fast))\n .width(30);\n System.out.print(\"I am running fast\");\n }\n\n // add the polyline to the map\n Polyline partOfRunningRoute = mMap.addPolyline(lineOptions);\n // set the zindex so that the poly line stays on top of my tile overlays\n partOfRunningRoute.setZIndex(1000);\n // add the poly line to the array so they can all be removed if necessary\n runningRoute.add(partOfRunningRoute);\n // add the latlng from this point to the array\n points.add(location);\n // store current location as previous location in the end\n previousLocation = location;\n }", "public RouteSegment(GeoPoint startPoint, GeoPoint endPoint,\r\n\t\t\tint maneuverType, int distance) {\r\n\t\tthis.startPoint = startPoint;\r\n\t\tthis.endPoint = endPoint;\r\n\t\tthis.maneuverType = maneuverType;\r\n\t\tthis.distance = distance;\r\n\t}", "@Override\n public void onLongPress(MotionEvent event) { Place a new Route Point\n //\n switch (event.getActionMasked())\n {\n case MotionEvent.ACTION_DOWN:\n {\n //Log.i(\"onLongPress\", \"This is a onLongPress (ACTION_DOWN) event...\");\n if (routeVisuals.selectedWaypoint != null) {\n movingRoutePoint = true;\n placingRoutePoint = false;\n }\n else {\n placingRoutePoint = true;\n movingRoutePoint = false;\n }\n\n super.getLocationForPoint(new PointF(event.getX(), event.getY()), new LocationReceiver() {\n @Override\n public void receiveLocation(Location location) {\n if (!movingRoutePoint) {\n Log.w(\"onLongPress\", \"lon:\" + location.longitude + \" lat:\" + location.latitude);\n Coordinate c = new Coordinate(location.longitude, location.latitude);\n WithinAirspaceCheck check = new WithinAirspaceCheck(MyMapView.this.context, c);\n check.SetOnFoundAirspace(new WithinAirspaceCheck.OnFoundAirspace() {\n @Override\n public void OnFoundAirspace(Airspace airspace) {\n Log.i(TAG, \"Found: \" + airspace.Name);\n if (onFoundAirspace != null)\n onFoundAirspace.OnFoundAirspace(airspace);\n }\n\n @Override\n public void OnFoundAllAirspaces(Airspaces airspaces) {\n Log.i(TAG, \"Total airspaces : \" + airspaces.size());\n if (onFoundAirspace != null)\n onFoundAirspace.OnFoundAllAirspaces(airspaces);\n }\n });\n\n\n check.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n\n }\n });\n\n break;\n }\n }\n\n// super.getLocationForPoint(new PointF(event.getX(), event.getY()), new ConvertPointCallback(){\n// @Override\n// public void convertComplete(Location loc) {\n// //Log.w(\"onLongPress\", \"lon:\" + loc.longitude + \" lat:\" + loc.latitude);\n//\n// if (placingRoutePoint) {\n// String name = loc.longitude + \",\" + loc.latitude;\n// routeVisuals.AddWaypoint(name, loc);\n//\n// //placingRoutePoint = false;\n// movingRoutePoint = true;\n// // insert the new point\n//\n// }\n//\n//\n// }});\n\n super.onLongPress(event);\n }", "private Route initialSpotMapping(Route route) {\n\t\tDate start_time = new Date();\n\n\t\t// increment calculation-level & mark route as processed\n\t\tcalculationLevel++;\n\n\t\t// initialize grid-structure\n\t\tSystem.out.println(\"Grid erstellt! -- Datenbankverbindung aufbauen!\");\n\t\t// create first spot\n\t\tSpot spot = generateSpot(route, 0);\n\t\troute.route[0].setSpot(spot);\n\t\troute.route[0].setMappedToSpot(true);\n\t\tspot.spotID = spotQuery.addSpot(spot,session);\n\n\t\tSystem.out.println(spot + \" zur Datenbank hinzufügen\");\n\t\t// create further spots\n\t\tfor (int j = 1; j < route.route.length; j++) {\n\t\t\tInfoBundle infobundle = searchClosestSpot(route.route[j]);\n\t\t\troute.route[j].setClosestSpotInfo(infobundle);\n\t\t\tif (infobundle == null || infobundle.distance >= Spot.stdRadius * 2) {\n\t\t\t\tspot = generateSpot(route, j);\n\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\tspot.spotID = spotQuery.addSpot(spot,session);\n\t\t\t\tSystem.out.println(spot + \" zur Datenbank hinzufügen\");\n\n\t\t\t} else if (infobundle.inRange) {\n\t\t\t\tspot = spotRepository.getSpot(infobundle.minDistance_spotID);\n\t\t\t\tSystem.out.println(\"Einen Spot aus der Datenbank laden\");\n\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t} else if (!infobundle.inRange && infobundle.distance < Spot.stdRadius * 2) {\n\n\t\t\t}\n\t\t}\n\t\t// complete spot mapping and set neighbors of the created spots\n\t\tlastSpot = null;\n\t\tfor (int j = 0; j < route.route.length; j++) {\n\t\t\t// check for the points that wasn't able to build an own spot or\n\t\t\t// wasn't in the range of a spot\n\t\t\tif (!route.route[j].isMappedToSpot()) {\n\t\t\t\t// search for the closets spots\n\t\t\t\tInfoBundle infobundle = searchClosestSpot(route.route[j]);\n\t\t\t\troute.route[j].setClosestSpotInfo(infobundle);\n\t\t\t\t// check for the current point if its in range of a spot\n\t\t\t\tif (infobundle.inRange) {\n\t\t\t\t\tSystem.out.println(\"Einen Spot aus der Datenbank laden\");\n\t\t\t\t\tspot = spotRepository.getSpot(infobundle.minDistance_spotID);\n\t\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\t}\n\t\t\t\t// else add it to the \"outside-area\" of the nearest spot,\n\t\t\t\t// because the distance to the nearest spot is too high to be\n\t\t\t\t// in range and is to close to build an own spot\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Einen Spot aus der Datenbank laden\");\n\t\t\t\t\tspot = spotRepository.getSpot(infobundle.minDistance_spotID);\n\t\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set neighbors of the created spots\n\t\t\tSpot sp = route.route[j].getSpot();\n\t\t\tif (sp != null && lastSpot != null) {\n\t\t\t\tif (!sp.getSpotID().equals(lastSpot.getSpotID())) {\n\t\t\t\t\taddNeighbor(lastSpot,spot);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tlastSpot = sp;\n\t\t}\n\t\tlastSpot = null;\n\n\t\tDate stop_time = new Date();\n\t\tdouble time = stop_time.getTime() - start_time.getTime();\n\t\ttime = time / 1000;\n\t\tSystem.out.println(\"SPOT FINDING: \" + time + \" seconds\");\n\t\treturn route;\n\t}", "public void m6939a(RouteDTO routeDTO) {\n if (routeDTO != null) {\n this.f5676b.setText(routeDTO.getName());\n double totalDistance = routeDTO.getTotalDistance() / 1000.0d;\n CharSequence charSequence = \"km\";\n if (!C1849a.b(getContext())) {\n totalDistance = C1849a.a(totalDistance);\n charSequence = \"mi\";\n }\n this.f5678d.setText(String.format(\"%.0f\", new Object[]{Double.valueOf(totalDistance)}));\n this.f5679e.setText(charSequence);\n ImageCache a = C2790a.a();\n Object mapURL = routeDTO.getMapURL();\n if (TextUtils.isEmpty(mapURL)) {\n this.f5677c.setScaleType(ScaleType.CENTER);\n this.f5681g.setVisibility(0);\n } else {\n this.f5677c.setImageUrl(mapURL, new RoutesSelfFrag$b$1(this, this.f5675a.getRequestQueueFactory().b(this.f5675a.getActivity()), a));\n }\n if (routeDTO.isUse()) {\n this.f5680f.setText(C1373R.string.route_self_activity_used);\n this.f5680f.setTextColor(this.f5675a.getResources().getColor(C1373R.color.route_self_used));\n this.f5680f.setBackgroundResource(C1373R.drawable.route_map_used_bg);\n return;\n }\n this.f5680f.setText(C1373R.string.route_self_activity_use);\n this.f5680f.setTextColor(this.f5675a.getResources().getColor(C1373R.color.route_self_use));\n this.f5680f.setBackgroundResource(C1373R.drawable.route_map_use_bg);\n this.f5680f.setOnClickListener(new RoutesSelfFrag$b$2(this, routeDTO));\n }\n }", "void mo5802a(LatLng latLng);", "private void analyzeRoute(ArrayList<LatLng> route) {\n if (route == null) route = this.route;\n double runningDistance = 0;\n if (waypoints == null) waypoints = new Stack<>();\n\n ArrayList<LatLng> reverseRoute = new ArrayList<>();\n reverseRoute.addAll(route);\n Collections.reverse(reverseRoute);\n\n LatLng previousWaypoint = new LatLng(0, 0);\n Iterator<LatLng> it = reverseRoute.iterator();\n if (it.hasNext())\n previousWaypoint = it.next();\n\n mMap.addMarker(new MarkerOptions().position(previousWaypoint).title(\"Destination\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\n\n while (it.hasNext()) {\n LatLng waypoint = it.next();\n double distance = directionsHelper.getDistanceInMeters(waypoint, previousWaypoint);\n runningDistance += distance;\n previousWaypoint = waypoint;\n waypoints.push(new Waypoint(waypoint.latitude, waypoint.longitude, runningDistance));\n }\n }", "Long tempProcessPoint(OrderDTO orderDTO, RouteDTO routeDTO, RoutePointDTO routePointDTO);", "@Override\r\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\r\n ArrayList<LatLng> points = null;\r\n PolylineOptions lineOptions = null;\r\n MarkerOptions markerOptions = new MarkerOptions();\r\n Integer s = result.size();\r\n if (s >= 1) {\r\n points = new ArrayList<LatLng>();\r\n lineOptions = new PolylineOptions();\r\n\r\n // Fetching i-th route\r\n List<HashMap<String, String>> path = result.get(0);\r\n\r\n // Fetching all the points in i-th route\r\n for (int j = 0; j < path.size(); j++) {\r\n HashMap<String, String> point = path.get(j);\r\n\r\n double lat = Double.parseDouble(point.get(\"lat\"));\r\n double lng = Double.parseDouble(point.get(\"lng\"));\r\n LatLng position = new LatLng(lat, lng);\r\n\r\n points.add(position);\r\n }\r\n\r\n // Adding all the points in the route to LineOptions\r\n lineOptions.addAll(points);\r\n lineOptions.width(4);\r\n\r\n // Changing the color polyline according to the mode\r\n\r\n lineOptions.color(Color.RED);\r\n map.addPolyline(lineOptions);\r\n\r\n }\r\n // Traversing through all the routes\r\n if (s >= 2) {\r\n points = new ArrayList<LatLng>();\r\n lineOptions = new PolylineOptions();\r\n\r\n // Fetching i-th route\r\n List<HashMap<String, String>> path = result.get(1);\r\n\r\n // Fetching all the points in i-th route\r\n for (int j = 0; j < path.size(); j++) {\r\n HashMap<String, String> point = path.get(j);\r\n\r\n double lat = Double.parseDouble(point.get(\"lat\"));\r\n double lng = Double.parseDouble(point.get(\"lng\"));\r\n LatLng position = new LatLng(lat, lng);\r\n\r\n points.add(position);\r\n }\r\n\r\n // Adding all the points in the route to LineOptions\r\n lineOptions.addAll(points);\r\n lineOptions.width(4);\r\n\r\n // Changing the color polyline according to the mode\r\n\r\n lineOptions.color(Color.BLUE);\r\n map.addPolyline(lineOptions);\r\n\r\n }\r\n\r\n if (s >= 3) {\r\n points = new ArrayList<LatLng>();\r\n lineOptions = new PolylineOptions();\r\n\r\n // Fetching i-th route\r\n List<HashMap<String, String>> path = result.get(2);\r\n\r\n // Fetching all the points in i-th route\r\n for (int j = 0; j < path.size(); j++) {\r\n HashMap<String, String> point = path.get(j);\r\n\r\n double lat = Double.parseDouble(point.get(\"lat\"));\r\n double lng = Double.parseDouble(point.get(\"lng\"));\r\n LatLng position = new LatLng(lat, lng);\r\n\r\n points.add(position);\r\n }\r\n\r\n // Adding all the points in the route to LineOptions\r\n lineOptions.addAll(points);\r\n lineOptions.width(4);\r\n\r\n // Changing the color polyline according to the mode\r\n\r\n lineOptions.color(Color.GREEN);\r\n map.addPolyline(lineOptions);\r\n\r\n }\r\n\r\n\r\n }", "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 }", "@Override\n\t\t\t\tpublic void onMapClick(LatLng point) {\n\t\t\t\t\tLog.d(\"数据测试\", \"\");\n\t\t\t\t\t\n\t\t\t\t}", "public void calculateRoute() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(start);\n route.setDestinationCoordinate(end);\n route.setNoOfRoutes(1);\n switch (routingType) {\n case SHORTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_SHORTEST);\n break;\n case FASTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_FASTEST);\n break;\n case QUIET:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_QUIETEST);\n break;\n }\n route.setRouteExposed(true);\n SKRouteManager.getInstance().calculateRoute(route);\n }", "public Road(String name, MapPoint mapPoint) {\n this.name = name;\n this.points = new ArrayList<>();\n this.mapPoint = mapPoint;\n }", "@Override\n\tpublic Map getPointsForHotArea(String terminalId) {\n\t\tMap map = new HashMap();\n\t\tString lngs = \"\";\n\t\tString lats = \"\";\n\t\ttry {\n\t\t\tList<PositionData> info_list = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' order by date desc limit 2000\");\n\t\t\tfor(int i=0;i<info_list.size();i++){\n\t\t\t\tif(info_list.get(i).getInfo().contains(\"GPS状态:GPS不定位;\")){\n\t\t\t\t\tinfo_list.remove(i);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tList<PositionData> position_list = new ArrayList<PositionData>();\n\t\t\tfor(int i=0;i<(info_list.size()>2000?2000:info_list.size());i++){\n\t\t\t\tposition_list.add(info_list.get(i));\n\t\t\t}\n\t\t\tfor(int i=0;i<position_list.size();i++){\n\t\t\t\tString point_latitude = position_list.get(i).getInfo().substring(position_list.get(i).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\tpoint_latitude = point_latitude.substring(0,point_latitude.indexOf(\";\"));\n\t\t\t\tpoint_latitude = point_latitude.split(\":\")[1];\n\t\t\t\tpoint_latitude = point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\tpoint_latitude = point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\tString tempStrPart1 = point_latitude.split(\"\\\\.\")[1];\n\t\t\t\ttempStrPart1 = \"0.\" + tempStrPart1;\n\t\t\t\tdouble tempD1 = Double.parseDouble(tempStrPart1)/60*100;\n\t\t\t\tpoint_latitude = Integer.parseInt(point_latitude.split(\"\\\\.\")[0]) + tempD1 + \"\";\n\t\t\t\tlats += point_latitude + \",\";\n\t\t\t\t\n\t\t\t\tString point_longitute = position_list.get(i).getInfo().substring(position_list.get(i).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\tpoint_longitute = point_longitute.substring(0,point_longitute.indexOf(\";\"));\n\t\t\t\tpoint_longitute = point_longitute.split(\":\")[1];\n\t\t\t\tpoint_longitute = point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\tpoint_longitute = point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\tString tempStrPart2 = point_longitute.split(\"\\\\.\")[1];\n\t\t\t\ttempStrPart2 = \"0.\" + tempStrPart2;\n\t\t\t\tdouble tempD2 = Double.parseDouble(tempStrPart2)/60*100;\n\t\t\t\tpoint_longitute = Integer.parseInt(point_longitute.split(\"\\\\.\")[0]) + tempD2 + \"\";\n\t\t\t\tlngs += point_longitute + \",\";\n\t\t\t}\n\t\t\tmap.put(\"lngs\",lngs.subSequence(0, lngs.lastIndexOf(\",\")));\n\t\t\tmap.put(\"lats\",lats.subSequence(0, lats.lastIndexOf(\",\")));\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn map;\n\t}", "@Override\n\tpublic void readImpl()\n\t{\n\t\t_requestedPointType = readD();\n\t}", "public void setRouteType(String x)\n {\n this.routeType = x;\n }", "private void m5095a(DrivingRoutePlanOption drivingRoutePlanOption) {\n this.a.m5234a(\"qt\", \"cars\");\n this.a.m5234a(\"sy\", drivingRoutePlanOption.mPolicy.getInt() + \"\");\n this.a.m5234a(\"ie\", \"utf-8\");\n this.a.m5234a(\"lrn\", \"20\");\n this.a.m5234a(MapboxEvent.ATTRIBUTE_VERSION, \"6\");\n this.a.m5234a(\"extinfo\", ANSIConstants.GREEN_FG);\n this.a.m5234a(\"mrs\", C0844a.f2048d);\n this.a.m5234a(\"rp_format\", \"json\");\n this.a.m5234a(\"rp_filter\", \"mobile\");\n this.a.m5234a(\"sn\", m4541a(drivingRoutePlanOption.mFrom));\n this.a.m5234a(\"en\", m4541a(drivingRoutePlanOption.mTo));\n if (drivingRoutePlanOption.mCityName != null) {\n this.a.m5234a(\"c\", drivingRoutePlanOption.mCityName);\n }\n if (drivingRoutePlanOption.mFrom != null) {\n this.a.m5234a(\"sc\", drivingRoutePlanOption.mFrom.getCity());\n }\n if (drivingRoutePlanOption.mTo != null) {\n this.a.m5234a(\"ec\", drivingRoutePlanOption.mTo.getCity());\n }\n List list = drivingRoutePlanOption.mWayPoints;\n String str = new String();\n String str2 = new String();\n if (list != null) {\n String str3 = str;\n str = str2;\n for (int i = 0; i < list.size(); i++) {\n PlanNode planNode = (PlanNode) list.get(i);\n if (planNode != null) {\n str3 = str3 + m4541a(planNode);\n str = str + planNode.getCity();\n if (i != list.size() - 1) {\n str3 = str3 + \"|\";\n str = str + \"|\";\n }\n }\n }\n this.a.m5234a(\"wp\", str3);\n this.a.m5234a(\"wpc\", str);\n }\n }", "void drawMyPoint(double x, double y, MapContent map, String nombre) { \n// SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n// builder.setName(\"MyFeatureType\");\n// builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs \n// builder.add(\"location\", Point.class); // add geometry\n//\n// // build the type\n// SimpleFeatureType TYPE = builder.buildFeatureType();\n//\n// // create features using the type defined\n// SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);\n// org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n// org.locationtech.jts.geom.Point point = geometryFactory.createPoint(new Coordinate(x, y));\n// //\n// \n// //\n// featureBuilder.add(point);\n// SimpleFeature feature = featureBuilder.buildFeature(\"FeaturePoint\");\n// DefaultFeatureCollection featureCollection = new DefaultFeatureCollection(\"internal\", TYPE);\n// featureCollection.add(feature); // Add feature 1, 2, 3, etc\n//\n// Style style = SLD.createPointStyle(\"Star\", Color.BLUE, Color.BLUE, 0.3f, 200);\n// Layer layer = new FeatureLayer(featureCollection, style);\n// layer.setTitle(\"NewPointLayer\");\n// map.addLayer(layer);\n// //mapFrame.getMapPane().repaint();// MapPane.repaint();\n//}\n\tSimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n builder.setName(\"MyFeatureType\"); // \n builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs // Definimos las caracteristicas de tipo del punto q vamos a crear\n builder.add(\"location\", Point.class); // add geometry //\n org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); //objeto q usaremos para crear el punto\n Coordinate coord = new Coordinate( x,y ); //creamos la coordenada con los puntos pasados como parametros\n org.locationtech.jts.geom.Point point = geometryFactory.createPoint(coord); // Creamos el punto geometrico\n\nSimpleFeatureType pointtype = null; //definimos el typo de punto que necesitamos apra agregarlo a la capa del mapa\n try {\n pointtype = DataUtilities.createType(\"POINT\", \"geom:Point,name:String\");\n } catch (SchemaException ex) {\n Logger.getLogger(SelectionLab.class.getName()).log(Level.SEVERE, null, ex);\n }\nSimpleFeatureBuilder featureBuilderPoints = new SimpleFeatureBuilder(pointtype); //creamos el constructor de lo que agregaremos\nDefaultFeatureCollection collectionPoints = new DefaultFeatureCollection(\"internal\", pointtype); //creamos el contenedor donde pondremos lo que agregaremos\n//PointString Point=builder.createPointString(Point);\n//LineString Point = builder.createLineString(Point);\nfeatureBuilderPoints.add(point); //agregamos el punto en el constructor\nSimpleFeature featureLine = featureBuilderPoints.buildFeature(null); \n((DefaultFeatureCollection)collectionPoints).add(featureLine); \nStyle PointStyle = SLD.createPointStyle(\"circle\", Color.RED, Color.RED,(float) 0.5,(float) 10); //definimos el estilo del punto (icono, color contorno, color, opacidad y tamaño)\n//Obserervacion: el dibujo del punto siempre se mantiene del mismo tamaño por mas que se use el zoom\nmap.addLayer(new FeatureLayer(collectionPoints, PointStyle)); //agregamos el punto a la capa\n\nguardarCoordenadas(nombre,x,y);\n}", "public void determineLocType() {\r\n\t\tif(usSensor.rawDistance()<WALL_THRESHOLD) { //Deciding what localizer should be used\r\n\t\t\tthis.loc = LocalizerType.RISING_EDGE;\r\n\t\t}else {\r\n\t\t\tthis.loc=LocalizerType.FALLING_EDGE;\r\n\t\t}\r\n\t}", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points;\n PolylineOptions lineOptions = null;\n\n MarkerOptions markerOptions = new MarkerOptions();\n String distance = \"\";\n String duration = \"\";\n String address = \"\";\n\n\n if (polylines.size() > 0) {\n polylines.get(0).remove();\n polylines.clear();\n }\n try {\n // Traversing through all the routes\n for (int i = 0; i < result.size(); i++) {\n points = new ArrayList<>();\n lineOptions = new PolylineOptions();\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n // Fetching all the points in i-th route\n for (int j = 0; j < path.size(); j++) {\n HashMap<String, String> point = path.get(j);\n\n if (j == 0) { // Get distance from the list\n distance = (String) point.get(\"distance\");\n continue;\n } else if (j == 1) { // Get duration from the list\n duration = (String) point.get(\"duration\");\n continue;\n }\n\n double lat = Double.parseDouble(point.get(\"lat\"));\n double lng = Double.parseDouble(point.get(\"lng\"));\n\n LatLng position = new LatLng(lat, lng);\n points.add(position);\n }\n\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(10);\n lineOptions.color(Color.RED);\n Log.d(\"onPostExecute\", \"onPostExecute lineoptions decoded\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(Location.this, \"Please ckeck your internet connection!!\", Toast.LENGTH_SHORT).show();\n }\n\n\n //Now you can get these values from anywhere like this way:\n startAddress = DataParser.mMyAppsBundle.getString(\"startAddress\");\n // Toast.makeText(Location.this, \"Start Address..\"+startAddress, Toast.LENGTH_SHORT).show();\n source_address.setText(startAddress);\n endAddress = DataParser.mMyAppsBundle.getString(\"endAddress\");\n //Toast.makeText(Location.this, \"End Address..\"+endAddress, Toast.LENGTH_SHORT).show();\n destination_address.setText(endAddress);\n //mode = DataParser.mMyAppsBundle.getString(\"travel_mode\");\n\n /* distance_text.setVisibility(View.VISIBLE);\n duration_text.setVisibility(View.VISIBLE);*/\n\n //travelmode_text.setVisibility(View.VISIBLE);\n //empty_text.setVisibility(View.VISIBLE);\n /***********Start and End address needs to be set************/\n\n distance_text.setText(distance);\n duration_text.setText(duration);\n\n // travelmode_text.setText(mode+\" \"+\"Mode\");\n\n // tvDistanceDuration.setText(\"Distance:\"+distance + \", Duration:\"+duration);\n // Drawing polyline in the Google Map for the i-th route\n if (lineOptions != null) {\n line = mMap.addPolyline(lineOptions);\n polylines.add(line);\n } else Log.d(\"onPostExecute\", \"without Polylines drawn\");\n }", "private void generateRoute(String json) {\n try {\n JSONObject jsonObject = new JSONObject(json);\n JSONArray routes = jsonObject.optJSONArray(\"routes\");\n if (null == routes || routes.length() == 0) {\n return;\n }\n JSONObject route = routes.getJSONObject(0);\n // get route bounds\n JSONObject bounds = route.optJSONObject(\"bounds\");\n if (null != bounds && bounds.has(\"southwest\") && bounds.has(\"northeast\")) {\n JSONObject southwest = bounds.optJSONObject(\"southwest\");\n JSONObject northeast = bounds.optJSONObject(\"northeast\");\n assert southwest != null;\n LatLng sw = new LatLng(southwest.optDouble(\"lat\"), southwest.optDouble(\"lng\"));\n assert northeast != null;\n LatLng ne = new LatLng(northeast.optDouble(\"lat\"), northeast.optDouble(\"lng\"));\n mLatLngBounds = new LatLngBounds(sw, ne);\n }\n // get paths\n JSONArray paths = route.optJSONArray(\"paths\");\n assert paths != null;\n for (int i = 0; i < paths.length(); i++) {\n JSONObject path = paths.optJSONObject(i);\n List<LatLng> mPath = new ArrayList<>();\n JSONArray steps = path.optJSONArray(\"steps\");\n distanceText = path.getString(\"distanceText\");\n durationText = path.getString(\"durationText\");\n assert steps != null;\n for (int j = 0; j < steps.length(); j++) {\n JSONObject step = steps.optJSONObject(j);\n JSONArray polyline = step.optJSONArray(\"polyline\");\n assert polyline != null;\n for (int k = 0; k < polyline.length(); k++) {\n if (j > 0 && k == 0) {\n continue;\n }\n JSONObject line = polyline.getJSONObject(k);\n double lat = line.optDouble(\"lat\");\n double lng = line.optDouble(\"lng\");\n LatLng latLng = new LatLng(lat, lng);\n mPath.add(latLng);\n }\n }\n mPaths.add(i, mPath);\n }\n mHandler.sendEmptyMessage(ROUTE_PLANNING_SUCCESS);\n } catch (JSONException e) {\n }\n }", "MapType map(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "private static void nbRoutesPremierPoint(List<Point> points) {\n if(points == null || points.isEmpty()) {\n System.out.println(\"Aucun point dans l'ensemble des points ...\");\n return;\n }\n Iterator<Point> iter = points.iterator();\n Point p1 = iter.next();\n System.out.println(\"Il y a \"+p1.getNbRoutes()+\" routes qui partent du point p1\");\n }", "private Route extendSpotStructureSpeedUp_v2(Route route) {\n\t\tDate start = new Date();\n\t\tArrayList<Integer> notMapped = new ArrayList<>();\n\t\tArrayList<Long> spotIDs = new ArrayList<>();\n\t\tcalculationLevel++;\n\t\t// counts the points that are in the range of the same (already\n\t\t// existing) spot\n\t\tint inRangeCounter = 0;\n\t\t// indicates if the last point was in the range of an existing spot\n\t\tboolean lastPointInSpot = false;\n\t\t// ID of the last Spot a trajectory point was in range of\n\t\t// default = 0\n\t\tLong lastInRangeID = -1l;\n\t\t// indicates if trajectory was in the last run in the range of a spot\n\t\t// and now is immediately in the range of another spot\n\t\tboolean changedSpotInRange = false;\n\n\t\t//lastSpot\n\t\tSpot lastSpot = null;\n\n\t\t// iterate through the trajectory\n\t\tfor (int j = 0; j < route.route.length; j++) {\n\t\t\t// search the closest spot\n\t\t\tInfoBundle infobundle;\n\t\t\tGpsPoint gpsPoint = route.route[j];\n\t\t\tdouble distanceToLastSpot = 1000000;\n\t\t\tif(lastSpot !=null){\n\t\t\t\tdistanceToLastSpot = GPSDataProcessor.calcDistance(gpsPoint.getLatitude(),gpsPoint.getLongitude(),lastSpot.getLatitude(),lastSpot.getLongitude());\n\t\t\t}\n\t\t\tif(distanceToLastSpot < Spot.stdRadius){\n\t\t\t\tInfoBundle bundle = new InfoBundle(lastSpot.getSpotID(), lastSpot.getLatitude(), lastSpot.getLongitude(), true, distanceToLastSpot);\n\t\t\t\tbundle.setSpot(lastSpot);\n\t\t\t\tinfobundle = bundle;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinfobundle = searchClosestSpot(route.route[j]);\n\t\t\t}\n\t\t\troute.route[j].setClosestSpotInfo(infobundle);\n\n\t\t\t// variables\n\t\t\tint tempCounter = inRangeCounter;\n\t\t\tSpot spot = null;\n\n\t\t\t// check if the current point is... in range / outside / able to\n\t\t\t// create a new spot\n\t\t\tif (infobundle == null || infobundle.distance >= (Spot.stdRadius * 2)) {\n\t\t\t\t// update counter\n\t\t\t\tinRangeCounter = 0;\n\t\t\t\tlastPointInSpot = false;\n\t\t\t\t// generate spot\n\t\t\t\tspot = generateSpot(route, j);\n\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\tspot.spotID = spotQuery.addSpot(spot,session);\n\t\t\t} else if (!infobundle.inRange && infobundle.distance < (Spot.stdRadius * 2)) {\n\t\t\t\t// update counter\n\t\t\t\tinRangeCounter = 0;\n\t\t\t\tlastPointInSpot = false;\n\t\t\t\tnotMapped.add(j);\n\n\t\t\t} else if (infobundle.inRange) {\n\t\t\t\t// point in range\n\t\t\t\tspot = infobundle.getSpot();\n\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\t// check if the last point was in the same spot\n\t\t\t\tif (lastPointInSpot) {\n\t\t\t\t\tif (!infobundle.minDistance_spotID.equals(lastInRangeID)) {\n\t\t\t\t\t\tinRangeCounter = 0;\n\t\t\t\t\t\tchangedSpotInRange = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tinRangeCounter++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tinRangeCounter++;\n\t\t\t\t}\n\t\t\t\tlastInRangeID = infobundle.minDistance_spotID;\n\t\t\t\tlastPointInSpot = true;\n\t\t\t}\n\n\t\t\t// Get closest point in range if there was more points in the range\n\t\t\t// of one spot to update the spot\n\t\t\tif (tempCounter > inRangeCounter) {\n\t\t\t\t// default = 100 - no meaning\n\t\t\t\tdouble minDistance = 100;\n\t\t\t\tint minIndex = 0;\n\t\t\t\tfor (int n = 1; n <= tempCounter; n++) {\n\t\t\t\t\tdouble dist = route.route[j-n].getClosestSpotInfo().distance;\n\t\t\t\t\tif (dist < minDistance) {\n\t\t\t\t\t\tminDistance = dist;\n\t\t\t\t\t\tminIndex = (j - n);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInfoBundle nearestClusterInfo = route.route[minIndex].getClosestSpotInfo();\n\t\t\t\tSpot sp = nearestClusterInfo.getSpot();\n\t\t\t\t// this function will update the spot\n\t\t\t\tsp.updateSpot(route.route[minIndex]);\n\t\t\t\tspotQuery.updateSpot(sp, session);\n\t\t\t}\n\n\t\t\t// if the spot in range was changed related to spot of the point\n\t\t\t// before\n\t\t\tif (changedSpotInRange) {\n\t\t\t\tinRangeCounter = 1;\n\t\t\t\tchangedSpotInRange = false;\n\t\t\t}\n\n\t\t\tif(j==0){\n\t\t\t\tif(spot != null) {\n\t\t\t\t\tspotIDs.add(spot.getSpotID());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (spot != null && lastSpot != null) {\n\t\t\t\tif (!spot.getSpotID().equals(lastSpot.getSpotID())) {\n\t\t\t\t\taddNeighbor(lastSpot,spot);\n\t\t\t\t\tspotIDs.add(spot.getSpotID());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(spot != null){\n\t\t\t\tlastSpot = spot;\n\t\t\t}\n\t\t}\n\n\t\t// complete spot mapping\n\t\tfor (int k = 0; k < notMapped.size(); k++) {\n\t\t\t// check for the points that wasn't able to build an own spot or\n\t\t\t// wasn't in the range of a spot\n\t\t\tGpsPoint currentPoint = route.route[notMapped.get(k)];\n\n\t\t\tSpot closestSpot = null;\n\t\t\tSpot currentclosestSpot = route.route[notMapped.get(k)].getClosestSpotInfo().getSpot();\n\t\t\tfor (int temp = notMapped.get(k) + 1; temp < route.route.length; temp++) {\n\t\t\t\tif (route.route[temp].isMappedToSpot()) {\n\t\t\t\t\tSpot nextSpot = route.route[temp].getSpot();\n\t\t\t\t\tdouble distance = GPSDataProcessor.calcDistance(nextSpot.getLatitude(), nextSpot.getLongitude(),\n\t\t\t\t\t\t\troute.route[temp].getLatitude(), route.route[temp].getLongitude());\n\t\t\t\t\tif (distance < route.route[notMapped.get(k)].getClosestSpotInfo().minDistance_spotCenterlat) {\n\t\t\t\t\t\tclosestSpot = nextSpot;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclosestSpot = currentclosestSpot;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tclosestSpot = currentclosestSpot;\n\t\t\t\t}\n\t\t\t\tif(temp > notMapped.get(k) + 5){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\troute.route[notMapped.get(k)].setSpot(closestSpot);\n\t\t\troute.route[notMapped.get(k)].setMappedToSpot(true);\n\t\t}\n\n\t\tCollections.sort(spotIDs);\n\n\t\tLong lastValue = null;\n\t\tfor(Iterator<Long> i = spotIDs.iterator(); i.hasNext();) {\n\t\t\tLong currentValue = i.next();\n\t\t\tif(lastValue != null && currentValue.equals(lastValue)) {\n\t\t\t\ti.remove();\n\t\t\t}\n\t\t\tlastValue = currentValue;\n\t\t}\n\n\t\tDate stop = new Date();\n\n\t\tlong overallTime = stop.getTime()-start.getTime();\n\t\t//System.out.println(\"OVERALL TIME: SINGLE ROUTE: \"+ overallTime);\n\n\t\treturn route;\n\t}", "@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\n public boolean onMapClick(@NonNull LatLng point) {\n if (doceLugares()) {\n Toast.makeText(navegacionOptimizada.this,\"solo 12\", Toast.LENGTH_LONG).show();\n } else {\n style = mapboxMap.getStyle();\n if (style != null) {\n anadirLugar(style, intermedi3);\n anadirPunto(intermedi3);\n obtenerROptimi(style, stops);\n\n }\n }\n return true;\n }", "@Test\n void calculateRoute() {\n GPSObject n2 = new GPSObject(\"Centenary 2\");\n Location n1 = new Location(\"Centenary 2\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1-5\");\n Location n4 = new Location(\"Thuto 1-5\",\"1\",n3);\n Locations loc = new Locations();\n assertNotNull(roo.calculateRoute(loc));\n }", "public LocationPoint(int type, long trailDBId, String latitude, String longitude, String title, String description, String imageUri) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.type = type;\n this.title = title;\n this.description = description;\n this.trailDBId = trailDBId;\n this.imageUri = imageUri;\n }", "public static void main(String[] args) {\n PointNode A = new PointNode(\"A\",0,0);\r\n PointNode B = new PointNode(\"B\",20,10);\r\n PointNode C = new PointNode(\"C\",40,20);\r\n PointNode D = new PointNode(\"D\",30,30);\r\n PointNode E = new PointNode(\"E\",20,50);\r\n PointNode F = new PointNode(\"F\",-10,40);\r\n PointNode G = new PointNode(\"G\",10,20);\r\n PointNode H = new PointNode(\"H\",10,40);\r\n PointNode I = new PointNode(\"I\",30,40);\r\n PointNode K = new PointNode(\"K\",30,20);\r\n PointNode L = new PointNode(\"L\",40,40);\r\n\r\n A.connectWithPoint(B);\r\n A.connectWithPoint(G);\r\n G.connectWithPoint(F);\r\n G.connectWithPoint(H);\r\n G.connectWithPoint(D);\r\n K.connectWithPoint(L);\r\n B.connectWithPoint(C);\r\n D.connectWithPoint(I);\r\n D.connectWithPoint(E);\r\n L.connectWithPoint(E);\r\n F.connectWithPoint(E);\r\n H.connectWithPoint(E);\r\n I.connectWithPoint(E);\r\n A.connectWithPoint(K);\r\n\r\n Route route = searchWay(A, E);\r\n System.out.println(route);\r\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 }", "private List<Point> getPath(int index) {\n\t\t \n\t \n\t\t Node fromNode = oEdge.fromNode;\n\t\t Node toNode = oEdge.toNode;\n\t\t float x1 = fromNode.longitude;\n\t\t float x2 = toNode.longitude;\n\t\t float y1 = fromNode.latitude;\n\t\t float y2 = toNode.latitude;\n\t\t double slope, angle;\n\t\t if(x1!=x2) {\n\t\t\t slope = (y2-y1)/(x2-x1);\n\t\t\t \tangle = Math.atan(slope);\n\t\t\t \t} else {\n\t\t\t \t\tangle = Math.PI/2;\n\t\t\t \t}\n\t\t Double L = Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n\t\t float offsetPixels=0;\n\t\t if(Math.toDegrees(angle)>Math.toDegrees(90)) {\n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=roadWidth*1/10;\n\t\t\t }\n\t\t\t \n\t\t } else {\n\t\t\t \n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=-roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=-roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=-roadWidth*1/10;\n\t\t\t }\n\t\t }\n\t\t \n\t\t // This is the first parallel line\n\t\t float x1p1 = x1 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float x2p1 = x2 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float y1p1 = y1 + offsetPixels * (x1-x2) / L.floatValue();\n\t\t float y2p1 = y2 + offsetPixels * (x1-x2) / L.floatValue();\n//\t\t if(oEdge.edgeID==16) {\n//\t\t\t System.out.println(\"testing\");\n//\t\t }\n\t\t \n\t\t Point P1 = new Point(x1p1,y1p1);\n\t\t Point P2 = new Point(x2p1,y2p1);\n\t\t List<Point> gP = GetPoints(P1, P2);\n\t\t return gP;\n\t \n\t}", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "void onSucceedFindDirection(List<RouteBeetweenTwoPointsDTO> route);", "public boolean onSingleTap(MotionEvent point) {\n\t\t\tif (active\n\t\t\t\t\t&& (drawType == POLYGON || drawType == POLYLINE || drawType == MULTI_POINT)) {\n\t\t\t\tif (ptStart == null)\n\t\t\t\t\tdrawLayer.removeAll();// 第一次开始前,清空全部graphic\n\n\t\t\t\tPoint ptCurrent = mapView.toMapPoint(new Point(point.getX(),\n\t\t\t\t\t\tpoint.getY()));\n\t\t\t\tpoints.add(ptCurrent);// 将当前点加入点集合中\n\t\t\t\tif (drawType == MULTI_POINT) {\n\t\t\t\t\t// 多选\n\t\t\t\t\t// Log.d(\"map\",\n\t\t\t\t\t// \"------点选-多选 ------SingleTap--x:\"+point.getX()+\" y: \"+point.getY());\n\t\t\t\t\tptOnly = null;\n\t\t\t\t\tptOnly = mapView.toMapPoint(point.getX(), point.getY());\n\n\t\t\t\t\tdrawLayer.removeAll();\n\t\t\t\t\tqueryAttribute4OnlyOnePonit(ptOnly);\n\t\t\t\t} else {\n\t\t\t\t\tif (ptStart == null) {// 画线或多边形的第一个点\n\t\t\t\t\t\tptStart = ptCurrent;\n\n\t\t\t\t\t\tmarkerSymbol = new SimpleMarkerSymbol(Color.BLUE, 10,\n\t\t\t\t\t\t\t\tSimpleMarkerSymbol.STYLE.CIRCLE);\n\t\t\t\t\t\t// 绘制第一个点\n\t\t\t\t\t\tGraphic graphic = new Graphic(ptStart, markerSymbol);\n\t\t\t\t\t\tdrawLayer.addGraphic(graphic);\n\t\t\t\t\t} else {// 画线或多边形的其他点\n\t\t\t\t\t\t// 绘制其他点\n\t\t\t\t\t\tmarkerSymbol = new SimpleMarkerSymbol(Color.BLUE, 15,\n\t\t\t\t\t\t\t\tSimpleMarkerSymbol.STYLE.DIAMOND);\n\t\t\t\t\t\tGraphic graphic = new Graphic(ptCurrent, markerSymbol);\n\t\t\t\t\t\tdrawLayer.addGraphic(graphic);\n\n\t\t\t\t\t\t// 生成当前线段(由当前点和上一个点构成)\n\t\t\t\t\t\tLine line = new Line();\n\t\t\t\t\t\tline.setStart(ptPrevious);\n\t\t\t\t\t\tline.setEnd(ptCurrent);\n\n\t\t\t\t\t\tif (drawType == DrawTool.POLYLINE) {\n\t\t\t\t\t\t\t// 绘制当前线段\n\t\t\t\t\t\t\tPolyline polyline = new Polyline();\n\t\t\t\t\t\t\tpolyline.addSegment(line, true);\n\t\t\t\t\t\t\tGraphic g = new Graphic(polyline, lineSymbol);\n\t\t\t\t\t\t\tdrawLayer.addGraphic(g);\n\n\t\t\t\t\t\t\tdouble len = GeometryEngine.geodesicLength(\n\t\t\t\t\t\t\t\t\tpolyline, mapView.getSpatialReference(),\n\t\t\t\t\t\t\t\t\tnull);\n\t\t\t\t\t\t\tString length = \"\";\n\t\t\t\t\t\t\tDecimalFormat df = new DecimalFormat(\"#.00\");\n\t\t\t\t\t\t\tdouble temp = BigDecimal.valueOf(len)\n\t\t\t\t\t\t\t\t\t.divide(new BigDecimal(1000)).doubleValue();\n\t\t\t\t\t\t\tlength = df.format(temp) + \" 千米\";\n\t\t\t\t\t\t\tToast.makeText(mapView.getContext(),\n\t\t\t\t\t\t\t\t\t\"长度: \" + length, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif (tempPolygon == null)\n\t\t\t\t\t\t\t\ttempPolygon = new Polygon();\n\n\t\t\t\t\t\t\tif (uid == -1) {\n\t\t\t\t\t\t\t\ttempPolygon.addSegment(line, false);\n\t\t\t\t\t\t\t\tGraphic g = new Graphic(tempPolygon, fillSymbol);\n\t\t\t\t\t\t\t\tuid = drawLayer.addGraphic(g);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttempPolygon.addSegment(line, false);\n\t\t\t\t\t\t\t\tdrawLayer.updateGraphic(uid, tempPolygon);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlines.add(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tptPrevious = ptCurrent;\n\t\t\t\t// tempLayer.postInvalidate();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "private void addRouteMArkers()\n {\n //routeMarker.add(new MarkerOptions().position(new LatLng(geo1Dub,geo2Dub)));\n\n }", "private void planningPaths(String url) {\n removePolyline();\n JSONObject json = new JSONObject();\n JSONObject origin = new JSONObject();\n JSONObject destination = new JSONObject();\n try {\n origin.put(\"lng\", 2.334595);\n origin.put(\"lat\", 48.893478);\n destination.put(\"lng\", destinationLng);\n destination.put(\"lat\", destinationLat);\n json.put(\"origin\", origin);\n json.put(\"destination\", destination);\n } catch (JSONException e) {\n }\n RequestBody body = RequestBody.create(MediaType.parse(\"application/json; charset=utf-8\"), String.valueOf(json));\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder().url(url).post(body).build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Message msg = Message.obtain();\n Bundle bundle = new Bundle();\n bundle.putString(\"errorMsg\", e.getMessage());\n msg.what = ROUTE_PLANNING_FAILED;\n msg.setData(bundle);\n mHandler.sendMessage(msg);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n try {\n String json = response.body().string();\n generateRoute(json);\n } catch (Exception e) {\n e.getMessage();\n }\n }\n });\n }", "public interface Map {\n /**\n * Return the distance between two coordinates.\n * \n * @param coord1 valid coordinates\n * @param coord2 valid coordinates\n * @return return distance between coord1 and coord2.\n * Returns Integer.MAX_VALUE if there is no path\n * between coordinates.\n */\n public int distance(Coord coord1, Coord coord2);\n\n /**\n * Return coordinates of a localisation.\n * \n * @param address a known localisation\n * @param return coordinates of the localisation, null\n * if the location doesn't exist.\n */\n public Coord addressToCoord(String localisation);\n /**\n * Returns the address closest to the localisation\n *\n * @param loc : the concerned localisation \n * @post returns one of the closest addresses to loc, null if\n * there isn't any.\n */\n public String coordToAddress(Coord loc);\n\n /**\n * Add an obstacle at coordinate obstacleCoord\n * \n * @param obstacleCoord coordinates of the new obstacle. Must be valid\n * \n */\n\n public void addObstacle(Coord obstacleCoord);\n\n /**\n * Remove an obstacle at coordinates\n * \n * @param obstacleCoord must be coordinates of a recorded obstacle\n */\n public void removeObstacle(Coord obstacleCoord);\n /**\n * Adds a list of addresses->localisations in the map.\n *\n * @param address must be a list of lines with one address and one coordinate\n * on each, separated by an @. the coordinate must be on a street.\n * @return returns the list of invalid address.\n */\n public String addAddressList(BufferedReader address);\n /**\n * Adds an address in the Map. \n * @param Address a string representing the address, can be anything.\n * @param coord the coord of the address, can be anywhere.\n */\n public void addAddress(String Address, Coord coord);\n /**\n * Sets the street on the map\n * \n * the distance between roads is 10. the roads start at coordinate 0.\n * so numx = 5 -> roads at x = [0,10,20,30,40]\n * \n * @param: numx : > 0 :the amount of North-South streets.\n * @param: numy : > 0 :the amount of West-East streets.\n * \n */\n public void setStreets(int numx, int numy);\n}", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif (doc != null) {\n\t\t\t\tNodeList _nodelist = doc.getElementsByTagName(\"status\");\n\t\t\t\tNode node1 = _nodelist.item(0);\n\t\t\t\tString _status1 = node1.getChildNodes().item(0).getNodeValue();\n\t\t\t\tif (_status1.equalsIgnoreCase(\"OK\")) {\n\t\t\t\t\tNodeList _nodelist_path = doc.getElementsByTagName(\"overview_polyline\");\n\t\t\t\t\tNode node_path = _nodelist_path.item(0);\n\t\t\t\t\tElement _status_path = (Element) node_path;\n\t\t\t\t\tNodeList _nodelist_destination_path = _status_path.getElementsByTagName(\"points\");\n\t\t\t\t\tNode _nodelist_dest = _nodelist_destination_path.item(0);\n\t\t\t\t\tString _path = _nodelist_dest.getChildNodes().item(0).getNodeValue();\n\t\t\t\t\tList<LatLng> directionPoint = decodePoly(_path);\n\n\t\t\t\t\tPolylineOptions rectLine = new PolylineOptions().width(10).color(Color.RED);\n\t\t\t\t\tfor (int i = 0; i < directionPoint.size(); i++) {\n\t\t\t\t\t\trectLine.add(directionPoint.get(i));\n\t\t\t\t\t}\n\t\t\t\t\t// Adding route on the map\n\t\t\t\t\tmyMap.addPolyline(rectLine);\n\t\t\t\t\t// markerOptions.position(new LatLng(src_lat, src_long));\n\t\t\t\t\t// markerOptions.draggable(true);\n\t\t\t\t\t// myMap.addMarker(markerOptions);\n\t\t\t\t\tLatLng destLatLng = new LatLng(dest_lat, dest_long);\n\n\t\t\t\t\tLatLng srcLatLng = new LatLng(src_lat, src_long);\n\t\t\t\t\tmyMap.addMarker(new MarkerOptions().position(srcLatLng)\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory.fromResource(R.drawable.pin_a))\n\t\t\t\t\t\t\t.title(getCapitalWords(from_intent)));\n\n\t\t\t\t\tmyMap.addMarker(new MarkerOptions().position(destLatLng)\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory.fromResource(R.drawable.pin_b))\n\t\t\t\t\t\t\t.title(getCapitalWords(to_intent)));\n\n\t\t\t\t\tmyMap.animateCamera(CameraUpdateFactory.newLatLngZoom(destLatLng, 10));\n\t\t\t\t} else {\n\t\t\t\t\tshowAlert(\"Unable to find the route\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tshowAlert(\"Unable to find the route\");\n\t\t\t}\n\n\t\t\tprogressDialog.dismiss();\n\t\t\t// Toast.makeText(MyMap.this, \"Source Lat: \"+src_lat+\"\\nSource Long:\n\t\t\t// \"+src_long+\n\t\t\t// \"\\nDes Lat: \"+dest_lat+\"\\nDest Long: \"+dest_long,\n\t\t\t// Toast.LENGTH_LONG).show();\n\n\t\t}", "public void setRoutePoint(AKeyCallPoint routePoint) {\n\t\t\tthis.routePoint = routePoint;\n\t\t}", "McastRouteData getRouteData(McastRoute route);", "int getMapPointID();", "@SuppressWarnings(\"UnusedReturnValue\")\n private static RoutePoint complementRoutePointFromItem(RoutePoint routePoint, BingItineraryItem currentItem) {\n\n try {\n String instruction = \"\";\n String traffic = \"\";\n String streetName = \"\";\n String warningType = \"\";\n\n // if it is, we get the data from our response\n if (currentItem.getInstruction() != null)\n instruction = currentItem.getInstruction().getText();\n\n if (currentItem.getWarnings() != null)\n traffic = currentItem.getWarnings()[0].getSeverity();\n\n if (currentItem.getDetails() != null\n && currentItem.getDetails().length > 0\n && currentItem.getDetails()[0].getNames() != null\n && currentItem.getDetails()[0].getNames().length > 0)\n streetName = currentItem.getDetails()[0].getNames()[0];\n\n if (currentItem.getWarnings() != null\n && currentItem.getWarnings()[0] != null\n && currentItem.getWarnings()[0].getWarningType() != null) {\n warningType = currentItem.getWarnings()[0].getWarningType();\n }\n\n // and add each element, if it exists. We also set the markers in order, so the most important ones override the less important ones\n if (!instruction.isEmpty()) { // instructions\n routePoint.setInstruction(instruction);\n routePoint.setIcon(\n processInstruction(\n currentItem.getInstruction().getManeuverType()));\n }\n\n if (!warningType.isEmpty()) {\n switch (warningType.toLowerCase()) {\n case \"accident\":\n routePoint.setMarker(RoutePoint.MarkerType.ACCIDENT);\n break;\n case \"blockedroad\":\n routePoint.setMarker(RoutePoint.MarkerType.BLOCKED_ROAD);\n break;\n case \"congestion\":\n case \"trafficflow\":\n routePoint.setMarker(RoutePoint.MarkerType.TRAFFIC);\n break;\n case \"masstransit\":\n routePoint.setMarker(RoutePoint.MarkerType.MASS_TRANSIT);\n break;\n case \"disabledvehicle\":\n routePoint.setMarker(RoutePoint.MarkerType.DISABLED_VEHICLE);\n break;\n case \"roadhazard\":\n routePoint.setMarker(RoutePoint.MarkerType.ROAD_HAZARD);\n break;\n case \"scheduledconstruction\":\n routePoint.setMarker(RoutePoint.MarkerType.CONSTRUCTION);\n break;\n default:\n // routePoint.setMarker(RoutePoint.MarkerType.OTHER); // NOTE: Consider! We are ignoring some warnings\n Log.e(TAG, \"Ignored warning type: \" + warningType);\n break;\n }\n }\n\n // traffic data\n if (!traffic.isEmpty()) {\n // Severity can have the following values: Low Impact, Minor, Moderate, or Serious.\n switch (traffic.toLowerCase()) {\n case \"low impact\":\n routePoint.setTrafficLevel(0);\n break;\n case \"minor\":\n routePoint.setTrafficLevel(1);\n routePoint.setMarker(RoutePoint.MarkerType.NONE); // we do this so we won't repeat markers\n break;\n case \"moderate\":\n routePoint.setTrafficLevel(2);\n routePoint.setMarker(RoutePoint.MarkerType.NONE); // we do this so we won't repeat markers\n break;\n case \"serious\":\n routePoint.setTrafficLevel(3);\n routePoint.setMarker(RoutePoint.MarkerType.NONE); // we do this so we won't repeat markers\n break;\n }\n // any other case will leave the value at 0\n }\n\n if (!streetName.isEmpty()) {\n routePoint.setStreetName(streetName);\n }\n\n } catch (NullPointerException e) {\n Log.e(TAG, \"onResponse()\");\n e.printStackTrace();\n }\n return routePoint;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n if(isJoinNode){\n return;\n }\n if(isAddMarker){\n commandManager.doCommand(\n new AddOnePointCommand(\n this,\n mDbHelper,\n latLng,\n PATH_CATEGORY));\n isAddMarker = false;\n fab_add_marker.setSelected(false);\n }\n else if(isEditNode && !isJoinNode){\n if(selectedPosition == null){\n SnackbarUtil.showSnackBar(root_map, snackbar,\"Pilih point terlebih dahulu.\", Snackbar.LENGTH_LONG);\n } else{\n commandManager.doCommand(\n new AddPointCommand(\n this,\n mDbHelper,\n selectedPosition,\n latLng,\n PATH_CATEGORY));\n\n }\n } else if(isEditPolyline){\n long id = (long)selectedPolyline.getTag();\n Path selectedPath = null;\n for (Path path : paths){\n if(path.getId() == id){\n selectedPath = path;\n }\n }\n commandManager.doCommand(\n new AddPointBetweenPathCommand(\n this,\n mDbHelper,\n selectedPath,\n latLng,\n PATH_CATEGORY));\n }\n\n }", "@Override\n public void handleEventRecord(EventRecord record) {\n if(record.isTimepoint()){\n locationToLocationEventInfoMap.put(record.getLocation(), new LocationEventInfo(record,\"GOOD, ST\"));\n }\n if ((record.isRevenue() | ! record.isRevenue())& record.isTimepoint()){\n TimePoint timePoint = new TimePoint(\n previousTripRecord.getGtfsTripId(),\n record.getBoxId(),\n boxIdToTimepointMap.get(record.getBoxId()),\n record.getRawDistanceFromStartOfTrip());\n timePoints.add(timePoint);\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n\n googleMap = map; //take an instance of current map\n //permiso para acceder a la ubicacion del usuario\n googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n USER_LOCATION_PERMISSION);\n } else {\n googleMap.setMyLocationEnabled(true);//To detect location of user\n }\n googleMap.setOnMarkerClickListener(this);\n googleMap.setOnInfoWindowLongClickListener(this);\n googleMap.setOnMapClickListener(this);\n googleMap.setOnMarkerDragListener(this);\n\n //inicializa polilinea sin puntos, que luego sera modificada\n rutaMain = googleMap.addPolyline(new PolylineOptions()\n .geodesic(true)\n .width(5)\n .color(Color.YELLOW));\n\n rutaWater = googleMap.addPolyline(new PolylineOptions()\n .geodesic(true)\n .width(5)\n .color(Color.CYAN));\n rutaAtractivos = googleMap.addPolyline(new PolylineOptions()\n .geodesic(true)\n .width(5)\n .color(Color.RED ));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /* LatLng origin = new LatLng(pLat1, plng1);\n LatLng destination = new LatLng(dLat1, dLng1);\n DrawRouteMaps.getInstance(this)\n .draw(origin, destination, mMap);\n DrawMarker.getInstance(this).draw(mMap, origin, R.drawable.marker_a, \"Origin Location\");\n DrawMarker.getInstance(this).draw(mMap, destination, R.drawable.marker_b, \"Destination Location\");\n*/\n /* LatLngBounds bounds = new LatLngBounds.Builder()\n .include(origin)\n .include(destination).build();\n Point displaySize = new Point();\n getWindowManager().getDefaultDisplay().getSize(displaySize);\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, displaySize.x, 250, 30));*/\n LatLng origin = new LatLng(pLat1, plng1);\n LatLng destination = new LatLng(dLat1, dLng1);\n DrawRouteMaps.getInstance(this)\n .draw(origin, destination, mMap);\n DrawMarker.getInstance(this).draw(mMap, origin, R.drawable.marker_a, RegPrefManager.getInstance(this).getPickLocationName());\n DrawMarker.getInstance(this).draw(mMap, destination, R.drawable.marker_b, RegPrefManager.getInstance(this).getDropLocationName());\n mMap\n .addPolyline((new PolylineOptions())\n .add(pickupLatLng, dropLatLng,pickupLatLng).width(5).color(Color.RED)\n .geodesic(true));\n\n // move camera to zoom on map\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pickupLatLng));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(13));\n\n\n\n\n }", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "private void buildRoutes(String type) {\r\n\t\tswitch (type.charAt(0)) {\r\n\t\tcase 'F':\r\n\t\t\tthis.wwd.firePropertyChange(\"step\", \"\", \"Création des routes FIR\");\r\n\t\t\tbreak;\r\n\t\tcase 'U':\r\n\t\t\tthis.wwd.firePropertyChange(\"step\", \"\", \"Création des routes UIR\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void DrawRoute(final DirectionsResult result){\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n if(RouteArrayList.size() > 0 ){\n\n //this for loop removes all the other routes\n //so when a new route is created, all previous routes will be removed\n for(Route route : RouteArrayList){\n route.getPolyline().remove();\n }\n RouteArrayList.clear();\n RouteArrayList = new ArrayList<>();\n }\n\n\n\n for(DirectionsRoute route: result.routes){\n //get the encoded path ( get all the points along each rote)in order to build the polyline\n\n List<com.google.maps.model.LatLng> decodedPath = PolylineEncoding.decode(route.overviewPolyline.getEncodedPath());\n\n List<LatLng> newPath = new ArrayList<>();\n\n for(com.google.maps.model.LatLng latLng: decodedPath){\n newPath.add(new LatLng(latLng.lat,latLng.lng));\n }\n\n Polyline polyline = mMap.addPolyline(new PolylineOptions().addAll(newPath).color(Color.GRAY).width(10));\n\n //make it clickable show that the info about distance/duration will show\n polyline.setClickable(true);\n\n RouteArrayList.add(new Route(polyline, route.legs[0]));\n //keep track of routes.legs[0] too.., diction - key being the polyline id?\n }\n }\n });\n }", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points;\n PolylineOptions lineOptions = null;\n LatLng end=new LatLng(lat,lng);\n\n // Traversing through all the routes\n for (int i = 0; i < result.size(); i++) {\n points = new ArrayList<>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for (int j = 0; 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\n points.add(position);\n }\n\n if(i==result.size()-1){\n googleMap.addMarker(new MarkerOptions().position(points.get(points.size()-1)));\n// mapBounds = new LatLngBounds(points.get(points.size()-1),end);\n }\n if(i==0){\n// end = points.get(0);\n googleMap.addMarker(new MarkerOptions().position(points.get(0)).title(from_place_name)).showInfoWindow();\n }\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(10);\n lineOptions.color(Color.BLUE);\n\n Log.d(\"onPostExecute\",\"onPostExecute lineoptions decoded\");\n\n }\n\n // Drawing polyline in the Google Map for the i-th route\n if(lineOptions != null) {\n Log.d(\"POLYLINE\",\"draw\");\n googleMap.addPolyline(lineOptions);\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mapBounds.getCenter(),getBoundsZoomLevel(mapBounds.northeast,mapBounds.southwest,256,256)));\n// googleMap.animateCamera(CameraUpdateFactory.zoomTo(10));\n }\n else {\n Log.d(\"onPostExecute\",\"without Polylines drawn\");\n }\n }", "public LocationPoint(int type, long trailDBId, String latitude, String longitude, String title, String description) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.type = type;\n this.title = title;\n this.description = description;\n this.trailDBId = trailDBId;\n }", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "@Override\n public void run() {\n String origin = slat + \",\" + slng;\n String dest = dlat + \",\" + dlng;\n// String googleApiKey = \"AIzaSyC7V9uWEfYabkwgSNF2zyDedJcHilCDIpM\";\n String googleApiKey = \"AIzaSyCFZyKKvqUSacq3gDLw5rCfgFohQMYWyKI\";\n String tomtomApiKey = \"93lGMTmQuN5JmgZqR0HGb3TwYvrDSz6i\";\n\n// URL url = new URL(\"https://maps.googleapis.com/maps/api/directions/json?origin=\"\n// + origin + \"&destination=\" + dest + \"&travel_mode=DRIVING\" +\n// \"&key=\" + googleApiKey);\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = null;\n if (useApi == GOOGLE_API) {\n /* for google */\n url = new URL(\"https://maps.googleapis.com/maps/api/directions/json?origin=\"\n + origin + \"&destination=\" + dest + \"&travel_mode=DRIVING\" +\n \"&key=\" + googleApiKey);\n } else if (useApi == TOM_TOM_API) {\n /* for tomtom */\n if (wayPoints != null && wayPoints.length() > 0) {\n url = new URL(\"https://api.tomtom.com/routing/1/calculateRoute/\" + origin +\n \":\" + wayPoints + \":\" + dest +\n \"/json?&travelMode=car&key=\" + tomtomApiKey);\n } else {\n url = new URL(\"https://api.tomtom.com/routing/1/calculateRoute/\" + origin +\n \":\" + dest +\n \"/json?&travelMode=car&key=\" + tomtomApiKey);\n }\n ServerAsyncTask serverAsyncTask = new ServerAsyncTask(context, serverHelper);\n serverHelper.setUrl(url.toString());\n serverHelper.setTag(map);\n serverAsyncTask.showCallProgress(false);\n serverAsyncTask.execute();\n }\n } catch (Exception e) {\n Helper.printLogMsg(\"Exception while reading url\", e.toString());\n }\n\n// CameraPosition cameraPosition = new CameraPosition.Builder()\n// .target(new com.google.android.gms.maps.model.LatLng(slat, slng)).zoom(16).build();\n// map.animateCamera(CameraUpdateFactory\n// .newCameraPosition(cameraPosition));\n }", "public void onMapClick (LatLng point) {\n\t\tmap.clear();\n\t\tdouble lat1 = point.latitude;\n\t\tdouble lng1 = point.longitude;\n\t\tlat=String.valueOf(lat1);\n\t\tlongi=String.valueOf(lng1);\n\t\tGeocoder gcd = new Geocoder(Home.this, Locale.getDefault());\n\t\tList<Address> addresses;\n\t\ttry {\n\t\t\taddresses = gcd.getFromLocation(lat1, lng1, 1);\n\t\t\tif (addresses.size() > 0) \n\t\t\t\t\n\t\t\t\theading.setText(addresses.get(0).getSubAdminArea());\n\t\t\tToast.makeText(Home.this, addresses.get(0).getLocality(),Toast.LENGTH_SHORT).show();\t\t\t\n\t\t\tMarkerOptions options = new MarkerOptions();\n\t\t\toptions.position(point);\n\t\t\tBitmap icon = BitmapFactory.decodeResource(Home.this.getResources(),\n\t\t\t\t\tR.drawable.pin);\n\t\t\tBitmap bhalfsize=Bitmap.createScaledBitmap(icon, icon.getWidth()/5,icon.getHeight()/5, false);\n\t\t\toptions.icon(BitmapDescriptorFactory.fromBitmap(bhalfsize));\n\t\t\toptions.title(addresses.get(0).getLocality());\t\t\n\t\t\tmap.addMarker(options);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@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 }", "public RoutePacket(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "@Override\n\t\tpublic void onGetDrivingRouteResult(DrivingRouteResult drivingrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (drivingrouteresult == null || drivingrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (drivingrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (drivingrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tN_routeline = drivingrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\n\t\t\t\t\tDrivingRouteLine.DrivingStep step = (DrivingStep) N_routeline.getAllStep().get(i);\n\n\t\t\t\t\tSB.append(i + \"\\t在\\t:\" + step.getEntranceInstructions() + \"\\t\\t\\t\")\n\t\t\t\t\t\t\t.append(i + \"\\t在\\t:\" + step.getExitInstructions() + \"\\t\\t\\t\");\n\t\t\t\t}\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tDrivingOverlayUtil drivingoverlayutil = new DrivingOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\tdrivingoverlayutil.setData(drivingrouteresult.getRouteLines().get(0));\n\t\t\t\tdrivingoverlayutil.addToMap();\n\t\t\t\tdrivingoverlayutil.zoomToSpan();\n\n\t\t\t}\n\n\t\t}", "public String getRoutePoint() {\n\t\t\treturn routePoint;\n\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n List<LatLng> listPoints = UtilsGoogleMaps.extractListPointsFromListRouteSegments(route.getListRouteSegment());\n\n if(listPoints.size()>0){\n setTitleMap(route.getName());\n drawSegments(listPoints);\n drawMarkers(listPoints.get(0), listPoints.get(listPoints.size()-1));\n displayEstimationTimeAndMileage(listPoints);\n scaleMap(listPoints);\n }\n }", "private void drawRoute(LatLng prevCoords, LatLng curCoords) {\n\n if(!isRequiredMetersComplete()){\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.colorPrimary)));\n }\n else{\n if(isOverPace){\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.goodGreen)));\n }else{\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.badRed)));\n }\n }\n }", "public LocationPoint(int type, String latitude, String longitude, String title, String description) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.type = type;\n this.title = title;\n this.description = description;\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == Activity.RESULT_OK) {\n try {\n if(requestCode == CREATE_WAYPOINT_REQUEST) {\n Bundle extras = data.getExtras();\n String descText = data.getStringExtra(\"DESC_TEXT\");\n String[] images = data.getStringArrayExtra(\"IMAGES_LIST\");\n\n Waypoint waypoint = new Waypoint(currentRoute.getId());\n waypoint.setDescription(descText);\n waypoint.setPhoto(images);\n waypoint.setTimestamp(System.currentTimeMillis());\n waypoint.setLat(this.lat);\n waypoint.setLng(this.lng);\n /*\n GPS CODE - OR getLastKnownPosition()\n */\n\n\n DatabaseHandler bhhandle = new DatabaseHandler(this.getApplicationContext());\n bhhandle.addWaypoint(waypoint);\n\n\n //Toast.makeText(this.getApplicationContext(),descText,1000);\n //STORE IN DATABASE\n //SEND TO SERVER\n //SUMMON CTHULHU\n } else if (requestCode == CREATE_WALK_REQUEST) {\n\t /*Handle the new route*/\n\t Bundle extras = data.getExtras();\n\t\n\t String shortDes = data.getStringExtra(\"SHORT_STRING\");\n\t String longDes = data.getStringExtra(\"LONG_STRING\");\n\t String title = data.getStringExtra(\"TITLE_STRING\");\n\t\n\t this.currentRoute = new Route(title,shortDes,longDes);\n\t\n\t DatabaseHandler db = new DatabaseHandler(this.getApplicationContext());\n\t currentRoute.setId(db.addRoute(currentRoute));\n\t TextView label = (TextView) findViewById(R.id.txtTourRunning);\n\t label.setText(\"Current Tour: \" + currentRoute.getTitle());\n\t\n\t if(currentRoute.getId() <= 0) {\n\t Toast.makeText(MainActivity.this,\"Database Write Failure\", Toast.LENGTH_LONG).show();\n } else {\n \t\n \t}\n \t}\n \t} catch (NullPointerException e) {\n Toast.makeText(MainActivity.this, \"Something bad happened\", Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points;\n PolylineOptions lineOptions = null;\n\n // Traversing through all the routes\n for (int i = 0; i < result.size(); i++) {\n points = new ArrayList<>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for (int j = 0; 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\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(10);\n lineOptions.color(Color.BLUE);\n\n Log.d(\"onPostExecute\",\"onPostExecute lineoptions decoded\");\n\n }\n\n // Drawing polyline in the Google Map for the i-th route\n if(lineOptions != null) {\n mMap.addPolyline(lineOptions);\n }\n else {\n Log.d(\"onPostExecute\",\"without Polylines drawn\");\n }\n }", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points;\n PolylineOptions lineOptions = null;\n\n // Traversing through all the routes\n for (int i = 0; i < result.size(); i++) {\n points = new ArrayList<>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for (int j = 0; 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\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(10);\n lineOptions.color(Color.RED);\n\n Log.d(\"onPostExecute\",\"onPostExecute lineoptions decoded\");\n\n }\n\n // Drawing polyline in the Google Map for the i-th route\n if(lineOptions != null) {\n mMap.addPolyline(lineOptions);\n }\n else {\n Log.d(\"onPostExecute\",\"without Polylines drawn\");\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 QueryDirections() {\n\t\tshowProgress(true, \"正在搜索导航路线...\");\n\t\t// Spawn the request off in a new thread to keep UI responsive\n\t\tfor (final FloorInfo floorInfo : floorList) {\n\t\t\tif (floorInfo.getPoints() != null\n\t\t\t\t\t&& floorInfo.getPoints().length >= 2) {\n\n\t\t\t\tThread t = new Thread() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start building up routing parameters\n\t\t\t\t\t\t\tRouteTask routeTask = RouteTask\n\t\t\t\t\t\t\t\t\t.createOnlineRouteTask(\n\t\t\t\t\t\t\t\t\t\t\tfloorInfo.getRouteServerPath(),\n\t\t\t\t\t\t\t\t\t\t\tnull);\n\n\t\t\t\t\t\t\tRouteParameters rp = routeTask\n\t\t\t\t\t\t\t\t\t.retrieveDefaultRouteTaskParameters();\n\t\t\t\t\t\t\tNAFeaturesAsFeature rfaf = new NAFeaturesAsFeature();\n\t\t\t\t\t\t\t// Convert point to EGS (decimal degrees)\n\t\t\t\t\t\t\t// Create the stop points (start at our location, go\n\t\t\t\t\t\t\t// to pressed location)\n\t\t\t\t\t\t\t// StopGraphic point1 = new StopGraphic(mLocation);\n\t\t\t\t\t\t\t// StopGraphic point2 = new StopGraphic(p);\n\t\t\t\t\t\t\trfaf.setFeatures(floorInfo.getPoints());\n\t\t\t\t\t\t\trfaf.setCompressedRequest(true);\n\t\t\t\t\t\t\trp.setStops(rfaf);\n\n\t\t\t\t\t\t\t// Set the routing service output SR to our map\n\t\t\t\t\t\t\t// service's SR\n\t\t\t\t\t\t\trp.setOutSpatialReference(wm);\n\t\t\t\t\t\t\trp.setFindBestSequence(true);\n\t\t\t\t\t\t\trp.setPreserveFirstStop(true);\n\t\t\t\t\t\t\tif (floorInfo.getEndPoint() != null) {\n\t\t\t\t\t\t\t\trp.setPreserveLastStop(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Solve the route and use the results to update UI\n\t\t\t\t\t\t\t// when received\n\t\t\t\t\t\t\tfloorInfo.setRouteResult(routeTask.solve(rp));\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tmException = e;\n\t\t\t\t\t\t\t// mHandler.post(mUpdateResults);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trouteIndex++;\n\t\t\t\t\t\tif (routeIndex >= routeCount) {\n\t\t\t\t\t\t\tmHandler.post(mSetCheckMap);\n\t\t\t\t\t\t\tmHandler.post(mUpdateResults);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t// Start the operation\n\t\t\t\tt.start();\n\t\t\t}\n\t\t}\n\n\t}", "public void testRoute() {\r\n\t\tLog.i(\"JUNIT\", \"Routing test started\");\r\n\t\t// create route with known points\r\n\t\tRoute pr = new Route(new GeoLocation(49.904005, 10.859725),\r\n\t\t\t\tnew GeoLocation(49.902637, 10.870646));\r\n\t\tList<GeoLocation> listLocations = new LinkedList<GeoLocation>();\r\n\t\t// retrieve path\r\n\t\tlistLocations = pr.getPath();\r\n\r\n\t\t// check maneuver count == 7\r\n\t\t// assertEquals(listLocations.size(),7);\r\n\t\tassertTrue(listLocations.size() > 0);\r\n\t}", "public void setDirectionOfTravel(typekey.DirectionOfTravelPEL value);", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points;\n PolylineOptions lineOptions = null;\n\n // Traversing through all the routes\n for (int i = 0; i < result.size(); i++) {\n points = new ArrayList<>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for (int j = 0; 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\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(10);\n lineOptions.color(Color.RED);\n\n Log.d(\"onPostExecute\", \"onPostExecute lineoptions decoded\");\n\n }\n\n // Drawing polyline in the Google Map for the i-th route\n if (lineOptions != null) {\n mMap.addPolyline(lineOptions);\n } else {\n Log.d(\"onPostExecute\", \"without Polylines drawn\");\n }\n }", "public String getRouteType() {\n return routeType;\n }", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points = null;\n PolylineOptions lineOptions = null;\n\n // Traversing through all the routes\n for (int i = 0; i < result.size(); i++) {\n points = new ArrayList<>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for (int j = 0; 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\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(10);\n Log.d(\"onPostExecute\",\"onPostExecute lineoptions decoded\");\n }\n\n // Drawing polyline in the Google Map for the i-th route\n if(lineOptions != null) {\n // set percentage animation, draw black line on grey line\n /*final Polyline backgroundPolyline = mMap.addPolyline(lineOptions.color(GREY));\n final Polyline foregroundPolyline = mMap.addPolyline(lineOptions.color(Color.BLACK));\n setPolylinePercentageAnimation(foregroundPolyline, backgroundPolyline);*/\n\n // set color animation\n final Polyline foregroundPolyline = mMap.addPolyline(lineOptions);\n setPolylineColorAnimation(foregroundPolyline);\n }\n else {\n Log.d(\"onPostExecute\",\"without Polylines drawn\");\n }\n }", "@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 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 }", "public void setStartPoint(Point2D p)throws NoninvertibleTransformException{\n if(p == null){\n start = null;\n fastestPath = null;\n removePointer(\"startPointIcon\");\n closeDirectionList();\n routePanel.getStartAddressField().setForeground(Color.gray);\n routePanel.getStartAddressField().setText(\"Enter start address\");\n return;\n }\n //Recalibrate position for precision\n Insets x = getInsets();\n p.setLocation(p.getX(), p.getY() - x.top + x.bottom);\n\n //Transform from screen coordinates to map Values.\n start = transformPoint(p);\n MapPointer startPoint = new MapPointer(start, \"startPointIcon\");\n addPointer(startPoint);\n if(end != null && start != null) //check if a route should be found.\n findFastestRoute(start, end);\n repaint();\n }", "public RoutePacket(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "@Override\r\n\tpublic void placeRoad(EdgeLocation edgeLoc) {\n\t\t\r\n\t}", "public static String buildRoute(String controlPoints, String id, \n String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, \n SymbolModifiers attributes) {\n \n String pointArrayStringList = \"\"; \n double width;\n double leftWidth;\n double rightWidth; \n\n try {\n // Get the points of the icons. For the polyarc we need only\n // one point, the pivot point, then the rest of the points for the \n // polygon. \n String[] latlons = controlPoints.split(\" \");\n if (latlons.length >= 2) {\n width = attributes.AM_DISTANCE.get(0);\n leftWidth = width / 2;\n rightWidth = width / 2;\n \n // Build the polyarc\n pointArrayStringList = XsltCoordinateWrapper.getRouteKml(latlons,\n id, name, description, lineColor, fillColor, altitudeMode,\n leftWidth, rightWidth, attributes.X_ALTITUDE_DEPTH.get(0), attributes.X_ALTITUDE_DEPTH.get(1));\n\n } else {\n // illegal number of points exception\n throw new InvalidNumberOfPointsException();\n }\n } catch (Exception e) {\n pointArrayStringList = \"\"; \n }\n\n return pointArrayStringList;\n\n }", "public ArrayList<Coordinate> transportLinePath()\r\n {\r\n Coordinate next_street1 = null;\r\n Coordinate next_street2 = null;\r\n Street next_street = null;\r\n ArrayList<Coordinate> line_coordinates = new ArrayList<Coordinate>();\r\n\r\n for (int i = 0; i < getStreetsMap().size(); i++)\r\n {\r\n Street s = getStreetsMap().get(i);\r\n Coordinate this_street1 = s.getCoordinates().get(0);\r\n Coordinate this_street2 = s.getCoordinates().get(2);\r\n\r\n if (i + 1 < getStreetsMap().size())\r\n {\r\n next_street = getStreetsMap().get(i+1);\r\n next_street1 = next_street.getCoordinates().get(0);\r\n next_street2 = next_street.getCoordinates().get(2);\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n\r\n for (Stop stop : getStopsMap())\r\n {\r\n if (stop.getStreet().equals(s))\r\n {\r\n line_coordinates.add(stop.getCoordinate());\r\n }\r\n }\r\n\r\n if (s.getCoordinates().get(1) != null)\r\n {\r\n line_coordinates.add(s.getCoordinates().get(1));\r\n }\r\n\r\n //11\r\n if (this_street1.getX() == next_street1.getX() && this_street1.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n //12\r\n else if (this_street1.getX() == next_street2.getX() && this_street1.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n // 21\r\n else if (this_street2.getX() == next_street1.getX() && this_street2.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n //22\r\n else if (this_street2.getX() == next_street2.getX() && this_street2.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n\r\n }\r\n\r\n line_coordinates.add(getStopsMap().get(getStopsMap().size()-1).getCoordinate());\r\n return line_coordinates;\r\n }", "public void testGraphhopper2(List<PointDto> puntos){\n \n CmdArgs args = new CmdArgs().put(\"config\", GraphhopperProperties.getString(\"Config\"))\n .put(\"datareader.file\",GraphhopperProperties.getString(\"OSMFile\"))\n .put(\"graph.location\", GraphhopperProperties.getString(\"LocationHopperData\"));\n GraphHopper hopper = new GraphHopperOSM().init(args).importOrLoad();\n \n List<GHPoint> points = new ArrayList<>();\n points.add(new GHPoint(-17.7580821, -63.1746598));\n points.add(new GHPoint(-17.7584948, -63.1749769));\n points.add(new GHPoint(-17.7600252, -63.1712026));\n \n // simple configuration of the request object, see the GraphHopperServlet classs for more possibilities.\n GHRequest req = new GHRequest(points).\n setWeighting(GraphhopperProperties.getString(\"Weighting\")).\n setVehicle(GraphhopperProperties.getString(\"Vehicule\")).\n setLocale(Locale.US);\n GHResponse rsp = hopper.route(req);\n\n // first check for errors\n if(rsp.hasErrors()) {\n // handle them!\n // rsp.getErrors()\n System.out.println(\"ocurrio un error\");\n System.out.println(rsp.toString());\n return;\n }\n\n // use the best path, see the GHResponse class for more possibilities.\n PathWrapper path = rsp.getBest();\n\n // points, distance in meters and time in millis of the full path\n PointList pointList = path.getPoints();\n double distance = path.getDistance();\n long timeInMs = path.getTime();\n \n System.out.println(\"Distancia total--\"+distance);\n\n InstructionList il = path.getInstructions();\n // iterate over every turn instruction\n for(Instruction instruction : il) {\n System.out.println(instruction.getDistance());\n }\n\n // or get the json\n List<Map<String, Object>> iList = il.createJson();\n\n // or get the result as gpx entries:\n List<GPXEntry> list = il.createGPXList();\n }", "public LocationPoint(int type, long trailDBId, String latitude, String longitude, String title, String description, String cid, String lac) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.trailDBId = trailDBId;\n this.type = type;\n this.title = title;\n this.description = description;\n this.cid = cid;\n this.lac = lac;\n }", "private void createMapOfSecondType(){\n\n this.typeOfMap=2;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n\n }", "private void onSendMap() {\n\t\tif(localBytes != null){\n\t\t\t// Prepare data intent \n\t\t\tIntent data = new Intent();\n\t\t\t// Pass relevant data back as a result\n\t\t\tif(tempLocation != null){\n\t\t\t\tdata.putExtra(\"lat\", tempLocation.getLatitude());\n\t\t\t\tdata.putExtra(\"lon\", tempLocation.getLongitude());\n\t\t\t}\n\t\t\tdata.putExtra(\"locationSnapshot\", localBytes);\n\t\t\t// Activity finished ok, return the data\n\t\t\tsetResult(RESULT_OK, data); // set result code and bundle data for response\n\n\t\t}\n\t\telse{\n\t\t\t// send reverse geo coded address\n\n\t\t}\n\t\tfinish(); // closes the activity, pass data to parent\n\t}", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points = null;\n PolylineOptions lineOptions = null;\n MarkerOptions markerOptions = new MarkerOptions();\n String distance = \"\";\n String duration = \"\";\n\n if(result.size()<1){\n return;\n }\n\n // Traversing through all the routes\n for(int i=0;i<result.size();i++){\n points = new ArrayList<LatLng>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for(int j=0;j<path.size();j++){\n HashMap<String,String> point = path.get(j);\n\n if(j==0){ // Get distance from the list\n distance = (String)point.get(\"distance\");\n continue;\n }else if(j==1){ // Get duration from the list\n duration = (String)point.get(\"duration\");\n continue;\n }\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\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(lWidth);\n lineOptions.color(lColor);\n\n }\n\n onDoneDrawDirectionListener.onDoneDrawDirection(duration, distance);\n\n // Drawing polyline in the Google Map for the i-th route\n gMap.addPolyline(lineOptions);\n }", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points = null;\n PolylineOptions lineOptions = null;\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Traversing through all the routes\n for(int i=0;i<result.size();i++){\n points = new ArrayList<LatLng>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for(int j=0;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\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(8);\n lineOptions.color(getResources().getColor(R.color.direction_line));\n }\n\n try{\n googleMap.addPolyline(lineOptions);\n }\n catch (Exception e){}\n // Drawing polyline in the Google Map for the i-th route\n\n }", "@Override\n public void calcRoute(final GeoPoint origin, final GeoPoint destination, double bearing, CallbackOnlineRouteReceiver callback){\n final String origLatLong = origin.getLatitude() + \",\" + origin.getLongitude();\n String destLatLong = destination.getLatitude() + \",\" + destination.getLongitude();\n\n // converting the heading to a string\n String heading = String.valueOf(bearing).split(\"\\\\.\")[0];\n\n // then we make the request to Bing API\n BingRequests mapsService = RoutingAPIs.getInstance().connectToBingMaps();\n Call<BingRespGetRoute> responseGetRoute =\n mapsService.requestDirections(\n origLatLong,\n destLatLong,\n heading,\n NavConfig.getLanguageTag(),\n NavConfig.API_KEY);\n\n // enqueuing the response\n responseGetRoute.enqueue(new Callback<BingRespGetRoute>() {\n @Override\n public void onResponse(@NonNull Call<BingRespGetRoute> call, @NonNull Response<BingRespGetRoute> response) {\n\n if (response.isSuccessful() && response.body() != null) {\n // once we get a successful response...\n List<RoutePoint> routePoints = new ArrayList<>(); // we start a new list of RoutePoints, that will be returned\n\n try {\n // we get a list of all the route points\n List<GeoPoint> routeGeoPoints = response.body()\n .getBingRouteResourceSets()[0]\n .getResources()[0]\n .getRoutePath()\n .getLine()\n .getLinePoints();\n\n // then we get a list of all pertinent data from the Bing API\n BingRouteLeg[] bingRouteLegs = response.body()\n .getBingRouteResourceSets()[0]\n .getResources()[0]\n .getRouteLegs();\n\n List<BingItineraryItem> allItems = new ArrayList<>();\n for (BingRouteLeg currentLeg : bingRouteLegs) {\n // adding all itinerary items on the same list (itinerary items encapsulate traffic info, instructions, ...)\n allItems.addAll(Arrays.asList(currentLeg.getItineraryItems()));\n }\n\n // we create a final version of our items list\n final List<BingItineraryItem> allInstructions = new ArrayList<>(allItems);\n\n // finally, we create a string with all route point coordinates to feed the snap to roads request\n String pointsString = \"\";\n for (GeoPoint point : routeGeoPoints) {\n pointsString = pointsString.concat(String.valueOf(point.getLatitude()))\n .concat(\",\")\n .concat(String.valueOf(point.getLongitude()))\n .concat(\";\");\n }\n // for the last point, we simply remove the final \";\"\n pointsString = pointsString.substring(0, pointsString.length() - 1);\n\n Log.d(TAG, \"Bing request Get Route was successful. Requesting snap to roads.\");\n // once we get a successful response, we make a new snap to roads request\n Call<BingRespSnapToRoad> responseSnapToRoad =\n mapsService.requestSnapToRoad(\n pointsString,\n NavConfig.API_KEY);\n\n // enqueuing the snap to roads response\n responseSnapToRoad.enqueue(new Callback<BingRespSnapToRoad>() {\n\n @Override\n public void onResponse(Call<BingRespSnapToRoad> call, Response<BingRespSnapToRoad> response) {\n\n try {\n\n BingSnappedPoint[] snappedPoints\n = response.body()\n .getBingSnapResourceSets()[0]\n .getResources()[0]\n .getSnappedPoints();\n\n List<RoutePoint> allRoutePoints = new ArrayList<>();\n\n // now we build each RoutePoint\n for (BingSnappedPoint point : snappedPoints) {\n\n double latitude = point.getCoordinates().getLatitude();\n double longitude = point.getCoordinates().getLongitude();\n\n GeoPoint gp = new GeoPoint(latitude, longitude);\n RoutePoint newRP = new RoutePoint(gp);\n\n newRP.setStreetName(point.getStreetName());\n newRP.setRecommendedSpeed(String.valueOf(point.getSpeedLimit()));\n\n allRoutePoints.add(newRP);\n }\n\n /* we end up with two parallel lists. One with all the points (allRoutePoints) and another\n with all the instruction data (allInstructions). We have to join them together. We'll cycle\n through all instructions and, for each one, we'll find the closest RoutePoint. Once we do,\n we simply assign all the instructions to that point */\n\n for (BingItineraryItem currentItem : allInstructions) {\n\n // for each item, we find its closest RoutePoint\n RoutePoint closestPoint = findClosestRoutePoint(currentItem, allRoutePoints);\n\n // and complement it\n if (closestPoint != null)\n complementRoutePointFromItem(closestPoint, currentItem);\n\n }\n callback.returnSuccess(allRoutePoints);\n\n } catch (Exception e) {\n Log.e(TAG, \"Exception while retrieving snap to roads: \" + response.message());\n Log.e(TAG, \"Processing original request\");\n e.printStackTrace();\n\n // On failure, we process our original response, without the snapped points\n List<RoutePoint> originalResponseRPs = processOriginalResponse(routeGeoPoints, allInstructions);\n callback.returnSuccess(originalResponseRPs);\n }\n }\n\n @Override\n public void onFailure(Call<BingRespSnapToRoad> call, Throwable throwable) {\n Log.e(TAG, \"ERROR while retrieving Bing snap to roads request. Processing original request\");\n // On failure, we process our original response, without the snapped points\n List<RoutePoint> originalResponseRPs = processOriginalResponse(routeGeoPoints, allInstructions);\n callback.returnSuccess(originalResponseRPs);\n }\n });\n\n } catch (Exception e) {\n Log.e(TAG, \"Exception while retrieving route: \" + response.message());\n e.printStackTrace();\n callback.returnFailure(origin, destination); // calculate an offline route on failure\n }\n } else {\n Log.e(TAG, \"Route request not accepted: \" + response.message());\n callback.returnFailure(origin, destination); // calculate an offline route on failure\n }\n }\n @Override\n public void onFailure(@NonNull Call<BingRespGetRoute> call, @NonNull Throwable t) {\n Log.w(TAG, \"No connection.\");\n callback.returnFailure(origin, destination); // calculate an offline route on failure\n }\n });\n }", "@Bean\n public TypeMap<WaypointDto, Waypoint> getWaypointDtoWaypointTypeMap() {\n return getModelMapper().createTypeMap(WaypointDto.class, Waypoint.class, \"WaypointDtoWaypoint\")\n .addMappings(mapper -> mapper.when(isNotNull()).map(WaypointDto::getPosition, Waypoint::setPosition))\n\n .addMappings(mapper -> mapper.skip(Waypoint::setToThisWp))\n .addMappings(mapper -> mapper.skip(Waypoint::setFromThisWp))\n\n .addMappings(mapper -> mapper.using(MappingContext::getDestination).map(WaypointDto::getCity, Waypoint::setCity))\n .addMappings(mapper -> mapper.using(MappingContext::getDestination).map(WaypointDto::getCarriage, Waypoint::setCarriage));\n }", "@Override\r\n\t protected void onPostExecute(List<List<HashMap<String, String>>> result) {\r\n\t ArrayList<LatLng> points = null;\r\n\t PolylineOptions lineOptions = null;\r\n\t MarkerOptions markerOptions = new MarkerOptions();\r\n\t String distance = \"\";\r\n\t String duration = \"\";\r\n\t \r\n\t if(result.size()<1){\r\n\t Toast.makeText(getBaseContext(), \"No Points\", Toast.LENGTH_SHORT).show();\r\n\t return;\r\n\t }\r\n\t \r\n\t // Traversing through all the routes\r\n\t for(int i=0;i<result.size();i++){\r\n\t points = new ArrayList<LatLng>();\r\n\t lineOptions = new PolylineOptions();\r\n\t \r\n\t // Fetching i-th route\r\n\t List<HashMap<String, String>> path = result.get(i);\r\n\t \r\n\t // Fetching all the points in i-th route\r\n\t for(int j=0;j<path.size();j++){\r\n\t HashMap<String,String> point = path.get(j);\r\n\t \r\n\t if(j==0){ // Get distance from the list\r\n\t distance = (String)point.get(\"distance\");\r\n\t continue;\r\n\t }else if(j==1){ // Get duration from the list\r\n\t duration = (String)point.get(\"duration\");\r\n\t continue;\r\n\t }\r\n\t \r\n\t double lat = Double.parseDouble(point.get(\"lat\"));\r\n\t double lng = Double.parseDouble(point.get(\"lng\"));\r\n\t LatLng position = new LatLng(lat, lng);\r\n\t \r\n\t points.add(position);\r\n\t }\r\n\t \r\n\t // Adding all the points in the route to LineOptions\r\n\t lineOptions.addAll(points);\r\n\t lineOptions.width(10);\r\n\t lineOptions.color(Color.BLUE);\r\n\t }\r\n\t \r\n\t // tvDistanceDuration.setText(\"Distance:\"+distance + \", Duration:\"+duration);\r\n\t \r\n\t // Drawing polyline in the Google Map for the i-th route\r\n\t map.addPolyline(lineOptions);\r\n\t }", "private void drawRoutes () {\n // Lay ngay cua tour\n Date tourDate = OnlineManager.getInstance().mTourList.get(tourOrder).getmDate();\n // Kiem tra xem ngay dien ra tour la truoc hay sau hom nay. 0: hom nay, 1: sau, -1: truoc\n int dateEqual = Tour.afterToday(tourDate);\n // Kiem tra xem tour da dien ra chua\n if (dateEqual == -1) {\n // Tour da dien ra, khong ve gi ca\n } else if (dateEqual == 1) {\n // Tour chua dien ra, khong ve gi ca\n } else {\n // Tour dang dien ra thi kiem tra gio\n /* Chang sap toi mau do, today nam trong khoang src start va src end\n Chang dang di chuyen mau xanh, today nam trong khoang src end va dst start\n Chang vua di qua mau xam, today nam trong khoang dst start va dst end */\n ArrayList<TourTimesheet> timesheets = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet();\n // Danh dau chang dang di qua\n int changDangDiQuaOrder = -1;\n // Danh dau chang sap di qua\n int changSapDiQuaOrder = -1;\n if(Tour.afterCurrentHour(timesheets.get(0).getmStartTime()) == 1){\n // Chang sap di qua mau do\n // Neu chua ve chang sap di, ve duong mau do\n if (timesheets.size() >= 2) {\n drawRoute(Color.RED, timesheets.get(0).getmBuildingLocation(), timesheets.get(1).getmBuildingLocation());\n }\n } else {\n for (int i = 0; i < timesheets.size() - 1; i++) {\n // Kiem tra xem chang hien tai la truoc hay sau gio nay. 0: gio nay, 1: gio sau, -1: gio truoc\n int srcStartEqual = Tour.afterCurrentHour(timesheets.get(i).getmStartTime());\n int srcEndEqual = Tour.afterCurrentHour(timesheets.get(i).getmEndTime());\n int dstStartEqual = Tour.afterCurrentHour(timesheets.get(i + 1).getmStartTime());\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(i).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(i + 1).getmBuildingLocation();\n if (srcStartEqual == -1 && srcEndEqual == 1) {\n // Chang dang di qua mau xanh\n // Neu chua ve chang dang di, ve duong mau xanh\n drawRoute(Color.BLUE, srcLocation, dstLocation);\n // Danh dau chang dang di qua\n changDangDiQuaOrder = i;\n // Thoat khoi vong lap\n break;\n } else if (srcEndEqual == -1 && dstStartEqual == 1) {\n // Chang sap toi mau do\n // Neu chua ve chang sap toi, ve duong mau do\n drawRoute(Color.RED, srcLocation, dstLocation);\n // Danh dau chang sap di qua\n changSapDiQuaOrder = i;\n // Thoat khoi vong lap\n break;\n }\n }\n }\n // Kiem tra xem da ve duoc nhung duong nao roi\n if (changDangDiQuaOrder != - 1) {\n // Neu ve duoc chang dang di qua roi thi ve tiep 2 chang con lai\n if (changDangDiQuaOrder < timesheets.size() - 2) {\n // Neu khong phai chang ket thuc thi ve tiep chang sap di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changDangDiQuaOrder + 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changDangDiQuaOrder + 2).getmBuildingLocation();\n drawRoute(Color.RED, srcLocation, dstLocation);\n }\n if (changDangDiQuaOrder > 0) {\n // Neu khong phai chang bat dau thi ve tiep chang da di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changDangDiQuaOrder - 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changDangDiQuaOrder).getmBuildingLocation();\n drawRoute(Color.GRAY, srcLocation, dstLocation);\n }\n }\n if (changSapDiQuaOrder != - 1) {\n // Neu ve duoc chang sap di qua roi thi ve tiep 2 chang con lai\n if (changSapDiQuaOrder > 0) {\n // Neu khong phai chang bat dau thi ve tiep chang dang di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changSapDiQuaOrder - 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changSapDiQuaOrder).getmBuildingLocation();\n drawRoute(Color.BLUE, srcLocation, dstLocation);\n }\n if (changSapDiQuaOrder > 1) {\n // Neu khong phai chang bat dau thi ve tiep chang da di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changSapDiQuaOrder - 2).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changSapDiQuaOrder - 1).getmBuildingLocation();\n drawRoute(Color.GRAY, srcLocation, dstLocation);\n }\n }\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\r\n float zoomLevel = 16.0f; //This goes up to 21\r\n\r\n switch (mPost_L){\r\n\r\n case \"Mellor Building\":\r\n //Mellor Building\r\n LatLng mellor = new LatLng(53.010042, -2.180419);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(mellor)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car park A\r\n LatLng carPark1 = new LatLng(53.010189, -2.180913);\r\n mMap.addMarker(new MarkerOptions().position(carPark1).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark1, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark2 = new LatLng(53.010197, -2.178928);\r\n mMap.addMarker(new MarkerOptions().position(carPark2).title(mPost_L +\" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark2, zoomLevel));\r\n break;\r\n\r\n\r\n case \"Ember Lounge\":\r\n //Ember Lounge\r\n LatLng ember = new LatLng(53.009524, -2.179833);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(ember)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car park A\r\n LatLng carPark1a = new LatLng(53.010189, -2.180913);\r\n mMap.addMarker(new MarkerOptions().position(carPark1a).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark1a, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark2b = new LatLng(53.010197, -2.178928);\r\n mMap.addMarker(new MarkerOptions().position(carPark2b).title(mPost_L +\" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark2b, zoomLevel));\r\n break;\r\n\r\n case \"LRV and Verve\":\r\n //LRV and Verve\r\n LatLng lrvAndverve = new LatLng(53.007882, -2.175342);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(lrvAndverve)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car Park A\r\n LatLng carPark3 = new LatLng(53.007652, -2.175546);\r\n mMap.addMarker(new MarkerOptions().position(carPark3).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark3, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark4 = new LatLng(53.008826, -2.175459);\r\n mMap.addMarker(new MarkerOptions().position(carPark4).title(mPost_L + \" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark4, zoomLevel));\r\n break;\r\n\r\n\r\n case \"Sir Stanley Matthews Sports hall\":\r\n //Stanley Matthews Sports hall\r\n LatLng SMsportsHall = new LatLng(53.007882, -2.175342);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(SMsportsHall)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n\r\n //Car Park A\r\n LatLng carPark5 = new LatLng(53.008605, -2.174087);\r\n mMap.addMarker(new MarkerOptions().position(carPark5).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark5, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark6 = new LatLng(53.009739, -2.174776);\r\n mMap.addMarker(new MarkerOptions().position(carPark6).title(mPost_L + \" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark6, zoomLevel));\r\n break;\r\n\r\n\r\n case \"S520 (Mellor Building)\":\r\n //Mellor Building (S520)\r\n LatLng s520mellor = new LatLng(53.010042, -2.180419);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(s520mellor).snippet(\"5th Floor of Mellor Building!\")\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car park A\r\n LatLng carPark7 = new LatLng(53.010189, -2.180913);\r\n mMap.addMarker(new MarkerOptions().position(carPark7).title(\"Mellor Building Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark7, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark8 = new LatLng(53.010197, -2.178928);\r\n mMap.addMarker(new MarkerOptions().position(carPark8).title(\"Mellor Building Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark8, zoomLevel));\r\n break;\r\n\r\n }\r\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 }", "public RoutePacket(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\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 protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points = null;\n PolylineOptions lineOptions = null;\n MarkerOptions markerOptions = new MarkerOptions();\n distance=\"\";\n duration = \"\";\n\n if(result.size()<1){\n Toast.makeText(getBaseContext(), \"No Points\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Traversing through all the routes\n for(int i=0;i<result.size();i++){\n points = new ArrayList<LatLng>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for(int j=0;j<path.size();j++){\n HashMap<String,String> point = path.get(j);\n\n if(j==0){ // Get distance from the list\n distance = (String)point.get(\"distance\");\n continue;\n }else if(j==1){ // Get duration from the list\n duration = (String)point.get(\"duration\");\n continue;\n }\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\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(2);\n lineOptions.color(Color.RED);\n }\n dist.setText(\"Distance:\" + distance);\n dur.setText(\"Duration:\" + duration);\n calculateDuration(duration);\n Log.d(\"Dura\",duration.substring(0,duration.length()-4));\n }" ]
[ "0.61692375", "0.5972977", "0.59434736", "0.5938343", "0.577544", "0.57661295", "0.5723379", "0.5689372", "0.5689081", "0.5662223", "0.55785877", "0.5578459", "0.55443627", "0.55383617", "0.55350214", "0.55311906", "0.5505448", "0.5494284", "0.549412", "0.54925376", "0.54896307", "0.5487353", "0.5470903", "0.54437834", "0.54303014", "0.54082996", "0.53855884", "0.5383545", "0.53783137", "0.53434557", "0.5340993", "0.5339735", "0.5308275", "0.5288496", "0.5278511", "0.525796", "0.52540725", "0.5253859", "0.5250399", "0.5240756", "0.5240451", "0.52404463", "0.5230378", "0.521041", "0.5207598", "0.5199721", "0.51958567", "0.51845205", "0.51806253", "0.51708657", "0.51677746", "0.5165666", "0.5163242", "0.515084", "0.51329136", "0.5129702", "0.5125755", "0.5120345", "0.51103085", "0.51087856", "0.51083523", "0.51015186", "0.5093746", "0.50903654", "0.50886214", "0.5086667", "0.50844353", "0.5049395", "0.5048385", "0.5048309", "0.5039598", "0.50378734", "0.50331324", "0.50328803", "0.5031956", "0.5029162", "0.5028998", "0.5024753", "0.50210965", "0.5016685", "0.5004409", "0.5002889", "0.49985024", "0.4997459", "0.49960208", "0.49957106", "0.49954346", "0.4991795", "0.49914855", "0.4984495", "0.49808496", "0.49789435", "0.49783608", "0.4977887", "0.49748567", "0.49740112", "0.49687868", "0.49676165", "0.49660793", "0.49616602", "0.49591336" ]
0.0
-1
animating doesn't allow to perform user actions
public boolean execute(byte action) { if (diff[0] != 0 || diff[1] != 0) { return false; } else { getPoint(currentPoint); if (currentPointAction == FInteractionUtils.ACTION_NONE) { switch (action) { case ACTION_NEXT_POINT: currentPoint++; if (currentPoint > endPoint) { currentPoint = endPoint; } startTimeout(); runFocusPoint(); break; case ACTION_PREV_POINT: currentPoint--; if (currentPoint < firstPoint) { currentPoint = firstPoint; } startTimeout(); runFocusPoint(); break; case FInteractionUtils.ACTION_FOCUS_TO_HOVER_MENU: FInteractionUtils.setFocusToHoverMenu(); break; case FInteractionUtils.ACTION_CHANGE_TO_MAIN_MENU: FMap.cancelTask(); FInteractionUtils.changeToMainMenu(); break; default: FMap.cancelTask(); //add the scroll fi.execute(action); break; } } else { FMap.cancelTask(); //execute the point action switch (currentPointAction) { case FInteractionUtils.ACTION_CHANGE_TO_MAIN_MENU: FInteractionUtils.changeToMainMenu(); break; case ACTION_LOAD_MAP: FRutePlanner.currentRute++; if (FRutePlanner.currentRute >= FRutePlanner.rutes.length) { return this.execute(FInteractionUtils.ACTION_CHANGE_TO_MAIN_MENU); } init(FRutePlanner.rutes[FRutePlanner.currentRute]); break; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void animate() {\n }", "@Override\r\n protected boolean hasAnimation() {\r\n return true;\r\n }", "protected abstract void animate(int anim);", "default boolean shouldAnimate() {\n return true;\n }", "@Override\n public void actionPerformed( ActionEvent actionEvent )\n {\n repaint(); // repaint animator\n }", "private void ufoMotion() {\n leftToRightAnimation(ufo, 500);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!clickable)\n ufoMotion();\n }\n }, 1000);\n }", "@Override\n protected void animStart() {\n }", "protected abstract void onAnimStart(boolean isCancelAnim);", "@Override\n protected void animStop() {\n }", "public abstract void animationStarted();", "public void animate() {\n\t\t\n\t\t// already exploded\n\t\tif (disabled > explodeTime) {\n\t\t\treturn;\n\t\t} // if\n\n\t\t// exploding now\n\t\tif (disabled > 0) {\n\t\t\tsphere.explode();\n\t\t\tdisabled++;\n\t\t\treturn;\n\t\t} // if\n\t\t\n\t\t// move sphere and this\n\t\tlocation.add(movement);\n\t\tsphere.move(movement);\n\t\t\n\t\t// bounce back if too far out\n\t\tif(location.distance(new Tuple(0, 0, 0)) > FIELD_SIZE) {\n\t\t\tmovement.scale(-1, -1, -1);\n\t\t} // if\n\t}", "private void rerunAnimation() {\n transition.playFromStart();\r\n}", "@Override\n\tpublic boolean performsBlockAnimation() {\n\t\treturn false;\n\t}", "public abstract void animationStopped();", "void startAnimation();", "@Override\n\tpublic void onAnimationStart(Animator arg0) {\n\t\tif (mState.getState() != 0) {\n\t\t\tGBTools.GBsetAlpha(bv, 0.0F);\n\t\t\tbv.setState(mState.getState());\n\t\t\tbv.setPressed(false);\n\t\t}\n\t\tbv.bringToFront();\n\t\tmBoardView.invalidate();\n\t}", "@Override\n\t\tprotected void doTransition() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\trepaint(); //Timer will invoke this method which then refreshes the screen\r\n\t\t\t\t // for the \"animation\"\r\n\t}", "private void canonMotion() {\n leftToRightAnimation(canon, 1000);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!clickable)\n canonMotion();\n }\n }, 2000);\n }", "public void animate()\n\t{\n\t\tanimation.read();\n\t}", "public void onUnfocusAnimationShortCircuited() {\n mShortCircuitUnfocusAnimation = false;\n }", "public void animateToggle() {\n/* 147 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartAnim();\r\n\t\t\t}", "public void animateButtons ()\r\n\t{\r\n\t\tGraphics g = getGraphics ();\r\n\t\t\r\n\t\tif (display == true){\r\n\t\t\tdelay (1000);\r\n\t\t\tdisplayCode(g);\r\n\t\t}\r\n\t\telse if (display == false){\r\n\t\t\thandleAction(g);\r\n\t\t}\r\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getSource() instanceof Timer) {\r\n if (animatedPos == canvas.size() - 1)\r\n animatedDir = -1;\r\n if (animatedPos == 0)\r\n animatedDir = 1;\r\n animatedPos += animatedDir;\r\n repaint();\r\n }\r\n }", "@Override\n\tpublic boolean update(Animations obj) {\n\t\treturn false;\n\t}", "public void startAnimation() {\n int delay = 50; // milliseconds\n ActionListener taskPerformer = new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if (counter < points.length - 1) {\n counter += 20;\n if (counter > points.length) {\n counter = points.length - 1;\n ((Timer) evt.getSource()).stop();\n notifyStopped();\n }\n validate();\n repaint();\n } else {\n ((Timer) evt.getSource()).stop();\n notifyStopped();\n }\n }\n };\n new Timer(delay, taskPerformer, getFreeColClient()).start();\n }", "private void bonusAction() throws InterruptedException {\n\n bonusActionPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> bonusActionPane.setVisible(false) );\n delay.play();\n\n }", "public void anim() {\n // start the timer\n t.start();\n }", "@Override public void onAnimationCancel(Animator arg0) {\n\n }", "public void act() \n {\n // Add your action code here.\n /*\n if ( pixelsMoved >= 20 )\n {\n moving = false;\n pixelsMoved = 0;\n }\n */\n if ( moving )\n {\n move(1);\n pixelsMoved++;\n \n if ( pixelsMoved >= 20 )\n {\n setMoving( false );\n }\n }\n }", "@Override\n\tpublic void animate(GLAutoDrawable drawable) {\n\n\t}", "public final void easeIn() {\n float originX = phasesUI.getX();\n MoveToAction out = new MoveToAction();\n out.setPosition(phasesUI.getWidth() * -1, phasesUI.getY());\n out.setDuration(PhaseConstants.PANEL_EASE_DURATION / 3);\n\n VisibleAction show = new VisibleAction();\n show.setVisible(true);\n\n MoveToAction in = new MoveToAction();\n in.setPosition(originX, phasesUI.getY());\n in.setDuration(PhaseConstants.PANEL_EASE_DURATION);\n\n SequenceAction seq = new SequenceAction(out, show, in);\n phasesUI.addAction(seq);\n\n //phasesUI.setVisible(true);\n toggle = true;\n }", "public void act() \n {\n gravity();\n animate();\n }", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\t\torderCicle.setClickable(false);// 转动时不可被点击\n\t\t\t\t\t}", "private void startAnimation(){\n\t TimerActionListener taskPerformer = new TimerActionListener();\n\t new Timer(DELAY, taskPerformer).start();\n \t}", "public void doAnimateStep () {\n\t\tadvanceSimulation();\n\t\tpaint();\n\t}", "void onAnimationStart();", "@Override\n public void run() {\n runAnimation();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tVariable animateVar = Variable\r\n\t\t\t\t\t\t.getVariable(Grapher2DConstants.Grapher2DAnimateFlag);\r\n\t\t\t\tValue oldAnimateValue = animateVar.evaluate();\r\n\t\t\t\tanimateVar.set(new BooleanValue(false));\r\n\r\n\t\t\t\t// save the script\r\n\t\t\t\tActionScriptSaveUtilities.promptUserToSaveScript();\r\n\r\n\t\t\t\t// restart animation if it was on before\r\n\t\t\t\tanimateVar.set(oldAnimateValue);\r\n\t\t\t}", "public void notifyMoveAnimationFinished();", "@Override\n public void onAnimationStart(Animation arg0) {\n \n }", "public void readyToGoAnimation() {\n TranslateTransition leave = new TranslateTransition(Duration.millis(600), syncBox);\n leave.setByY(80.0);\n // Buttons slide in and clickable address appears simultaneously.\n TranslateTransition arrive = new TranslateTransition(Duration.millis(600), controlsBox);\n arrive.setToY(0.0);\n FadeTransition reveal = new FadeTransition(Duration.millis(500), addressControl);\n reveal.setToValue(1.0);\n ParallelTransition group = new ParallelTransition(arrive, reveal);\n // Slide out happens then slide in/fade happens.\n SequentialTransition both = new SequentialTransition(leave, group);\n both.setCycleCount(1);\n both.setInterpolator(Interpolator.EASE_BOTH);\n both.play();\n }", "public void mo84055a() {\n if (getVisibility() == 0) {\n animate().cancel();\n setLayerType(2, null);\n animate().alpha(0.0f).setListener(new Animator.AnimatorListener() {\n /* class com.zhihu.android.article.widget.ArticleFloatingTipsView.C172711 */\n\n public void onAnimationCancel(Animator animator) {\n }\n\n public void onAnimationRepeat(Animator animator) {\n }\n\n public void onAnimationStart(Animator animator) {\n }\n\n public void onAnimationEnd(Animator animator) {\n ArticleFloatingTipsView.this.setVisibility(4);\n ArticleFloatingTipsView.this.setLayerType(0, null);\n }\n }).start();\n }\n }", "@Override\n public void act(float delta) {\n }", "@Override public void onAnimationStart(Animator arg0) {\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "protected abstract void animationLogicTemplate();", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n\tpublic boolean act(float delta) {\n\t\tif(!isRunning) return true;\n\t\t\n\t\t\n\t\treturn false;\n\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "public void e()\n/* */ {\n/* 193 */ if (!this.g) {\n/* 194 */ AnimatorSet localAnimatorSet = new AnimatorSet();\n/* 195 */ localAnimatorSet.play(a(this.b)).with(b(this.c));\n/* 196 */ localAnimatorSet.setDuration(this.f).start();\n/* 197 */ this.c.setVisibility(View.VISIBLE);\n/* 198 */ this.g = true;\n/* */ }\n/* */ }", "void animation() {\n LinearLayout linearLayout = findViewById(R.id.loginLinear);\n animationDrawable = (AnimationDrawable)linearLayout.getBackground();\n animationDrawable.setEnterFadeDuration(5000);\n animationDrawable.setExitFadeDuration(5000);\n\n }", "@Override\r\n\tpublic void tick() {\r\n\t\tif(interacted == false)\r\n\t\t\tinteract();\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tslideShow();\n\t\t\t\t\n\t\t\t}", "@Override\n public void run() {\n MaterialAnimator.animate(Transition.ZOOMOUT, btnFAB, 1000);\n btnFAB.setVisibility(Style.Visibility.HIDDEN);\n btnFAB.setOpacity(0);\n\n // Setting the visibility of the music panel\n musicPanel.setVisibility(Style.Visibility.VISIBLE);\n musicPanel.setOpacity(1);\n\n // Setting the music label with Bounce up animation\n lblMusic.setText(\"Pharell Williams / Love Yourself to Dance\");\n MaterialAnimator.animate(Transition.BOUNCEINUP, lblMusic, 1000);\n\n // Setting the image of the artist\n imgMusic.setUrl(\"http://thatgrapejuice.net/wp-content/uploads/2013/08/pharrell-williams-that-grape-juice.png\");\n }", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\r\n\t\t\t}", "void fadeIn(boolean animation);", "public void onAnimationStart(Animation animation) {\n\r\n }", "public void toggleAnim(boolean show) {\n if (animatorSet != null) {\n if (preAnimationEndAlpha == (show ? 1f : 0f)) {\n return;\n } else {\n animatorSet.cancel();\n }\n }\n if (show) {\n toogleVisible(mContainer, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n /* boolean needShow = false;\n for (View control : mControlsVisible.keySet()) {\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 begin\n Boolean prevVisibility = mControlsVisible.get(control);\n needShow = needShow || prevVisibility;\n if (!prevVisibility) {\n continue;\n }\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 end\n toogleVisible(control, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n }\n if (needShow) {\n toogleVisible(mContainer, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n }*/\n preAnimationEndAlpha = 1f;\n } else {\n toogleVisible(mContainer, 1f, 0f, SmoothImageView.ANIMATION_DURATION);\n /* for (View control : mControlsVisible.keySet()) {\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 begin\n Boolean prevVisibility = mControlsVisible.get(control);\n if (!prevVisibility) {\n continue;\n }\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 end\n toogleVisible(control, 1f, 0f, SmoothImageView.ANIMATION_DURATION);\n }*/\n preAnimationEndAlpha = 0f;\n }\n if (animatorSet != null) {\n animatorSet.start();\n }\n }", "public /* synthetic */ void lambda$onTouchEventMy$3() {\n this.animationInProgress = false;\n applyViewsLayoutParams(0);\n AndroidUtilities.unlockOrientation(this);\n }", "public abstract void animation(double seconds);", "public abstract void animationReelFinished();", "public void setAnimation() {\r\n\r\n // start outside the screen and move down until the clock is out of sight\r\n ObjectAnimator moveDown = ObjectAnimator.ofFloat(this, \"y\", -100, screenY + 100);\r\n AnimatorSet animSet = new AnimatorSet();\r\n animSet.play(moveDown);\r\n\r\n // Set duration to 4000 milliseconds\r\n animSet.setDuration(4000);\r\n\r\n animSet.start();\r\n\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animator arg0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void move() {\n\t\tif (!visible) {\r\n\t\t\thideTurtle();\r\n\t\t}\r\n\t}", "private void terminateAnimation() {\n doRun = false;\n }", "@Override\r\n public void actionPerformed(ActionEvent ae)\r\n {\r\n renderer.unpauseScene();\r\n }", "private void animateIn() {\n AnimatorSet buildAnimatorSet = buildAnimatorSet(this.mLayoutView, (float) this.mLayoutView.findViewById(C0010R$id.panel_container).getHeight(), 0.0f, 0.0f, 1.0f, 250);\n ValueAnimator valueAnimator = new ValueAnimator();\n valueAnimator.setFloatValues(0.0f, 1.0f);\n buildAnimatorSet.play(valueAnimator);\n buildAnimatorSet.start();\n this.mLayoutView.getViewTreeObserver().removeOnPreDrawListener(this.mOnPreDrawListener);\n }", "@Override\n\t\t public void actionPerformed(ActionEvent e) {\n\t\t \t\t \tStopMusic(2);\n\t\t \t\t \tStopMusic(3);\n\t\t \t\t \tbm.play();\n\t\t \ttry {\n\t\t\t\t\t\t\tnew Maze();\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t \t//getTopLevelAncestor().setVisible(false);\n\t\t \tframe.dispose();\n\t\t }", "public void animate(){\n\n if (ra1.hasStarted() && ra2.hasStarted()) {\n\n// animation1.cancel();\n// animation1.reset();\n// animation2.cancel();\n// animation2.reset();\n gear1Img.clearAnimation();\n gear2Img.clearAnimation();\n initializeAnimations(); // Necessary to restart an animation\n button.setText(R.string.start_gears);\n }\n else{\n gear1Img.startAnimation(ra1);\n gear2Img.startAnimation(ra2);\n button.setText(R.string.stop_gears);\n }\n }", "@Override\r\n public void onAnimationCancel(Animator arg0)// 动画取消\r\n {\n\r\n }", "public void startAnimating() {\n\t\tif (!mAnimating) {\n\t\t\tmAnimating = true;\n\t\t\tmAnimationProgress = mProgress;\n\t\t\tmAnimationHandler.sendEmptyMessage(0);\n\t\t}\n\t}", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent ae) {\n renderer.unpauseScene();\n }", "public void startAnimation() {\r\n\t\tani.start();\r\n\t}", "@Override\n public void onAnimationCancel(Animator arg0) {\n\n }", "public void interactWhenSteppingOn() {\r\n\t\t\r\n\t}", "@Override\n public void run() {\n MaterialAnimator.animate(Transition.ZOOMIN, btnFAB, 1000);\n btnFAB.setVisibility(Style.Visibility.VISIBLE);\n btnFAB.setOpacity(1);\n\n // Hide the music panel once the pause button is clicked\n musicPanel.setVisibility(Style.Visibility.HIDDEN);\n musicPanel.setOpacity(0);\n\n // Setting the previous music label with Bounce down animation\n lblMusic.setText(\"Lady Gaga / Telephone\");\n MaterialAnimator.animate(Transition.BOUNCEINDOWN, lblMusic, 1000);\n\n // Setting the image of the artist\n imgMusic.setUrl(\"https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRi9lfCkLutb7ugJlIjn84qWNoiICopC-Vyx7QQJRHF5E7GlqFG\");\n }", "@Override\r\n\t\tpublic void onAnimationCancel(Animator arg0) {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tmotion.displace();\r\n\t\tmotion.circleIntersects();\r\n\t\t//check collision\r\n\t\tmotion.intersectBound();\r\n\t\trepaint(); // repaints this component\r\n\t}", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t}", "@Override\n\t\tpublic void onAnimationStart(Animator animation) {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animator animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\r\n public void onAnimationStart(Animator arg0)// 动画开始\r\n {\n\r\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 }", "private void anullerAction()\r\n\t{\r\n\t\tthis.hide();\r\n\t}", "public void f_restart() {\n\n result.setVisibility(View.GONE);\n request_button_content.setVisibility(View.VISIBLE);\n\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n pulsator_left.setVisibility(View.VISIBLE);\n pulsator_up.setVisibility(View.VISIBLE);\n pulsator_right.setVisibility(View.VISIBLE);\n\n visible = false;\n TransitionSet set_request = new TransitionSet()\n .addTransition(new Scale(0.7f))\n .addTransition(new Fade())\n .setInterpolator(visible ? new LinearOutSlowInInterpolator() :\n new FastOutLinearInInterpolator());\n\n TransitionManager.beginDelayedTransition(request_button_content, set_request);\n btnClick.setVisibility(visible ? View.GONE : View.VISIBLE);\n }\n }, 250);\n }", "@Override\n\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\n\t\t}", "@Override\n public void onAnimationStart(Animator animation) {\n findViewById(R.id.btn_sticker1).setVisibility(View.GONE);\n findViewById(R.id.btn_sticker2).setVisibility(View.GONE);\n findViewById(R.id.btn_sticker3).setVisibility(View.GONE);\n findViewById(R.id.btn_camera_sticker_album).setVisibility(View.VISIBLE);\n findViewById(R.id.btn_camera_filter_album).setVisibility(View.VISIBLE);\n findViewById(R.id.btn_return).setVisibility(View.VISIBLE);\n\n\n\n //瞬间隐藏掉面板上的东西\n mStickerLayout.setVisibility(View.GONE);\n }", "public void animationTrans() {\n float unitAngle;\n if (type == CIRCLE) {\n unitAngle = (float) 360 / defaultCount;\n } else {\n unitAngle = 45f;\n }\n final float oldAngle = mAngle;\n float nAngle = mAngle % actualAngle;\n float gapAngle = (float) (nAngle / unitAngle) - (int) (nAngle / unitAngle);\n\n final float willAngle;\n if (type == CIRCLE) {\n willAngle = (float) ((0.5 - gapAngle) * unitAngle);\n } else {\n if (gapAngle < 0.5) {\n willAngle = (float) ((0 - gapAngle) * unitAngle);\n } else {\n willAngle = (float) ((1 - gapAngle) * unitAngle);\n }\n }\n Animation a = new Animation() {\n\n @Override\n protected void applyTransformation(float interpolatedTime, Transformation t) {\n\n mAngle = oldAngle + willAngle * interpolatedTime;\n\n requestLayout();\n }\n\n @Override\n public boolean willChangeBounds() {\n return true;\n }\n };\n\n a.setDuration(200);\n startAnimation(a);\n }", "@Override\n\t\t\tpublic boolean onTouch(View arg0, MotionEvent arg1) {\n\t\t\t\tif ( arg1.getActionMasked() == MotionEvent.ACTION_UP){\n\t\t\t\t\tanimate();\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public /* synthetic */ void lambda$onTouchEventMy$1() {\n this.animationInProgress = false;\n switchToPreviousMessage();\n AndroidUtilities.unlockOrientation(this);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tVariable animateVar = Variable\r\n\t\t\t\t\t\t.getVariable(Grapher2DConstants.Grapher2DAnimateFlag);\r\n\t\t\t\tanimateVar.set(new BooleanValue(false));\r\n\r\n\t\t\t\t// load the script\r\n\t\t\t\tExpressionConsoleHistory history = ActionScriptLoadUtilities\r\n\t\t\t\t\t\t.promptUserToLoadScript();\r\n\r\n\t\t\t\tMap<String, String> initialSymbolTable = history\r\n\t\t\t\t\t\t.getInitialSymbolTableSnapshot();\r\n\r\n\t\t\t\tMap<String, Variable> currentSymbolTable = Variable\r\n\t\t\t\t\t\t.getSymbolTable();\r\n\r\n\t\t\t\tExpressionConsoleModel console = ExpressionConsoleModel\r\n\t\t\t\t\t\t.getInstance();\r\n\r\n\t\t\t\tRecursiveDescentParser parser = console.getParser();\r\n\r\n\t\t\t\t// initialize the symbol table\r\n\t\t\t\tfor (Iterator<Entry<String, Variable>> it = currentSymbolTable\r\n\t\t\t\t\t\t.entrySet().iterator(); it.hasNext();) {\r\n\t\t\t\t\tEntry<String, Variable> currentEntry = it.next();\r\n\t\t\t\t\tString newValue = initialSymbolTable.get(currentEntry\r\n\t\t\t\t\t\t\t.getKey());\r\n\t\t\t\t\tString expressionToEvaluate = currentEntry.getKey() + \" = \"\r\n\t\t\t\t\t\t\t+ (newValue == null ? \"0\" : newValue);\r\n\t\t\t\t\tparser.parse(expressionToEvaluate).evaluate();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// step through all events\r\n\t\t\t\tList<ExpressionConsoleHistoryEntry> historyList = history\r\n\t\t\t\t\t\t.getExpressionList();\r\n\r\n\t\t\t\tfor (Iterator<ExpressionConsoleHistoryEntry> it = historyList\r\n\t\t\t\t\t\t.iterator(); it.hasNext();) {\r\n\t\t\t\t\tExpressionConsoleHistoryEntry currentEntry = it.next();\r\n\t\t\t\t\tif (currentEntry.getType() == ExpressionConsoleHistoryEntry.INPUT)\r\n\t\t\t\t\t\tconsole.enterExpression(currentEntry.getString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// restart animation if it was on before\r\n\t\t\t\t// animateVar.set(oldAnimateValue);\r\n\t\t\t}" ]
[ "0.72050864", "0.6864488", "0.6714957", "0.6706994", "0.66267616", "0.6579531", "0.65335184", "0.651023", "0.6488881", "0.64326614", "0.64262575", "0.64078325", "0.6404332", "0.637358", "0.6367584", "0.63300204", "0.6250111", "0.622817", "0.6215168", "0.62126905", "0.62121934", "0.61962914", "0.61736655", "0.6168861", "0.6158217", "0.61578417", "0.6151804", "0.61444205", "0.6140109", "0.61390805", "0.6136578", "0.6125987", "0.6119352", "0.61177355", "0.61140776", "0.609758", "0.6083061", "0.6076643", "0.6067854", "0.60650176", "0.6064757", "0.6063143", "0.60598075", "0.60538733", "0.60464007", "0.6037456", "0.6028276", "0.6028276", "0.60142046", "0.60007805", "0.60007805", "0.60007805", "0.60007805", "0.59986585", "0.59936327", "0.59936327", "0.5992586", "0.59856933", "0.59846354", "0.59765464", "0.59676856", "0.59601283", "0.59601283", "0.59588164", "0.5956253", "0.5948989", "0.59475386", "0.5947025", "0.59435785", "0.59427613", "0.5940051", "0.59342164", "0.5916326", "0.59102064", "0.5902154", "0.5901113", "0.58984005", "0.5894969", "0.5894744", "0.5888863", "0.5887184", "0.58833843", "0.5876272", "0.5873562", "0.58725965", "0.5870971", "0.58708197", "0.58705974", "0.5870286", "0.586833", "0.58662623", "0.58552855", "0.5848327", "0.5843278", "0.58348197", "0.58347064", "0.5826419", "0.58151466", "0.5811913", "0.58107436", "0.58089596" ]
0.0
-1
executes an action for current point. can be loading a new map or anyelse
public static void runFocusPoint() { //center map to current point point = getPoint(currentPoint); if (prevPoint[0] != point[0]) { if (prevPoint[0] > point[0]) { diff[0] = prevPoint[0] - point[0]; prevPoint[0] -= FImageGrid.scrollIncrement; } else { diff[0] = point[0] - prevPoint[0]; prevPoint[0] += FImageGrid.scrollIncrement; } } if (prevPoint[1] != point[1]) { diff[1] = prevPoint[1] - point[1]; if (prevPoint[1] > point[1]) { diff[1] = prevPoint[1] - point[1]; prevPoint[1] -= FImageGrid.scrollIncrement; } else { diff[1] = point[1] - prevPoint[1]; prevPoint[1] += FImageGrid.scrollIncrement; } } if (diff[0] > 0 || diff[1] > 0) { diff[0] -= FImageGrid.scrollIncrement; diff[1] -= FImageGrid.scrollIncrement; if (diff[0] <= FImageGrid.scrollIncrement) { diff[0] = 0; prevPoint[0] = point[0]; } if (diff[1] <= FImageGrid.scrollIncrement) { diff[1] = 0; prevPoint[1] = point[1]; } //System.out.print("prev[" + prevPoint[0] + "," + prevPoint[1] + "] | "); //System.out.print("next[" + point[0] + "," + point[1] + "] | "); //System.out.println("diff[" + diff[0] + "," + diff[1] + "]"); centerMapTo(prevPoint[0] + transformCoordenate(mapPos, X_COORD), prevPoint[1] + transformCoordenate(mapPos, Y_COORD)); } else { diff = new int[]{0, 0}; if (currentPoint - 1 > 0) { prevPoint = getPoint(currentPoint - 1); } else { prevPoint = point; } centerMapTo(point[0] + transformCoordenate(mapPos, X_COORD), point[1] + transformCoordenate(mapPos, Y_COORD)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean execute(byte action) {\n if (diff[0] != 0 || diff[1] != 0) {\n return false;\n } else {\n getPoint(currentPoint);\n if (currentPointAction == FInteractionUtils.ACTION_NONE) {\n switch (action) {\n case ACTION_NEXT_POINT:\n currentPoint++;\n if (currentPoint > endPoint) {\n currentPoint = endPoint;\n }\n startTimeout();\n runFocusPoint();\n break;\n case ACTION_PREV_POINT:\n currentPoint--;\n if (currentPoint < firstPoint) {\n currentPoint = firstPoint;\n }\n startTimeout();\n runFocusPoint();\n break;\n case FInteractionUtils.ACTION_FOCUS_TO_HOVER_MENU:\n FInteractionUtils.setFocusToHoverMenu();\n break;\n case FInteractionUtils.ACTION_CHANGE_TO_MAIN_MENU:\n FMap.cancelTask();\n FInteractionUtils.changeToMainMenu();\n break;\n default:\n FMap.cancelTask();\n //add the scroll\n fi.execute(action);\n break;\n }\n } else {\n FMap.cancelTask();\n //execute the point action\n switch (currentPointAction) {\n case FInteractionUtils.ACTION_CHANGE_TO_MAIN_MENU:\n FInteractionUtils.changeToMainMenu();\n break;\n case ACTION_LOAD_MAP:\n FRutePlanner.currentRute++;\n if (FRutePlanner.currentRute >= FRutePlanner.rutes.length) {\n return this.execute(FInteractionUtils.ACTION_CHANGE_TO_MAIN_MENU);\n }\n init(FRutePlanner.rutes[FRutePlanner.currentRute]);\n break;\n }\n }\n }\n return false;\n }", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\tif(gui.getMapPointSelectMode() == MapPointSelectMode.START){\n\t\t\t\t\t\tSPath path = SPath.getCurrentPath();\n\t\t\t\t\t\tif(path != null){\n\t\t\t\t\t\t\t//Set the start point.\n\t\t\t\t\t\t\tpath.setStartPoint(e.getPoint(), width, height);\n\t\t\t\t\t\t\t//Reset select mode.\n\t\t\t\t\t\t\tgui.resetSelectMode();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//If current mode is finish.\n\t\t\t\t\telse if(gui.getMapPointSelectMode() == MapPointSelectMode.FINISH){\n\t\t\t\t\t\tSPath path = SPath.getCurrentPath();\n\t\t\t\t\t\tif(path != null){\n\t\t\t\t\t\t\t//Set the finish point.\n\t\t\t\t\t\t\tpath.setFinishPoint(e.getPoint(), width, height);\n\t\t\t\t\t\t\t//Reset select mode.\n\t\t\t\t\t\t\tgui.resetSelectMode();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n Boolean success = m_mapLoader.checkForMapDataUpdate();\n if (!success) {\n Toast.makeText(m_activity, \"MapLoader is being busy with other operations\",\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View v) {\n pickPointOnMap();\n }", "@Override\n public void execute()\n {\n measurementPoint = new MeasurementPoint(position);\n // Add marker to map and get the position of the marker on the map\n markerPositionOnMap = mapCanvas.addMarker(position, layer.getLayerName(), \"\", layer.getColor());\n // Add marker position to measurementPoint\n measurementPoint.setMarkerPositionOnMap(markerPositionOnMap);\n // Add measurementPoint to layerManager\n layer.addMeasurementPoint(measurementPoint);\n }", "public void displayShapefile(File file) throws Exception {\n FileDataStore store = FileDataStoreFinder.getDataStore(file);\n featureSource = store.getFeatureSource();\n setGeometry(); //definimos la geometria\n\n /*\n * Crea el jmapFrame y lo configura para mostrar el shapefile con estilo por defecto\n */\n MapContent map = new MapContent();\n map.setTitle(\"Ejemplo seleccion y dibujo\");\n Style style = createDefaultStyle();\n Layer layer = new FeatureLayer(featureSource, style);\n map.addLayer(layer);\n mapFrame = new JMapFrame(map);\n mapFrame.enableToolBar(true);\n mapFrame.enableStatusBar(true);\n \n \n /**\n * Agregamos los atributos necesarios para crear los botones que permita dibujar un punto en el mapa y otro para seleccionar la figura\n * geometrica mas cercana a donde el usuario haga click\n */\n JToolBar toolBarDibujo = mapFrame.getToolBar();\n JButton botonDibujo = new JButton(\"Draw\");\n toolBarDibujo.addSeparator();\n toolBarDibujo.add(botonDibujo);\n\n botonDibujo.addActionListener(e -> mapFrame.getMapPane().setCursorTool(new CursorTool() { //accion al seleccionar el boton \"draw\"\n @Override\n public void onMouseClicked(MapMouseEvent ev) {\n \tint respuesta= JOptionPane.showConfirmDialog(null, \"¿Desea guardar este punto?\", \"Confirmar\",JOptionPane.YES_NO_OPTION);\n \tif(respuesta==0) {\n \t\tString texto=JOptionPane.showInputDialog(null, \"Nombre del lugar\");\n \t\tDirectPosition2D p = ev.getWorldPos();\n System.out.println(p.getX() + \" -- \" + p.getY());\n drawMyPoint(p.getX(), p.getY(), map, texto);\n \t}\n \telse{\n \t\tSystem.out.println(\"Punto no guardado\");\n \t}\n \n }\n })); \n\n JToolBar toolBar = mapFrame.getToolBar();\n JButton btn = new JButton(\"Select\"); //el boton que agregamos\n toolBar.addSeparator();\n toolBar.add(btn);\n\n\n btn.addActionListener(e ->mapFrame.getMapPane().setCursorTool(new CursorTool() {@Override //accion al seleccionar el boton \"select\"\n public void onMouseClicked(MapMouseEvent ev) {\n selectFeatures(ev);\n }\n }));\n\n \n mapFrame.setSize(600, 600);\n mapFrame.setVisible(true);\n}", "@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 }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tAsset asset = ((ImageFileImagePanelModel)imagePanel.getModel()).getAsset(index);\n\t\t\t\t\t\t\tif (!AssetManager.hasAsset(asset)) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAssetManager.putAsset(asset);\n\t\t\t\t\t\t\t\tMapTool.serverCommand().putAsset(asset);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tZone zone = new Zone(asset.getId());\n\t\t\t\t\t\t\tzone.setType(Zone.Type.MAP);\n\t\t\t\t\t\t\t\n\t\t MapTool.addZone(zone);\n\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void onMapClick(LatLng point) {\n\t\t\t\t\tLog.d(\"数据测试\", \"\");\n\t\t\t\t\t\n\t\t\t\t}", "public void actionPerformed(ActionEvent evt){\n\t\t\t\tint save = -1;\n\t\t\t\tif(!map.getElevation().equalsIgnoreCase(\"\")){\n\t\t\t\t\tsave = JOptionPane.showConfirmDialog(null, \"Save current work?\", \"Save\", JOptionPane.YES_NO_CANCEL_OPTION);\n\t\t\t\t\tif(save != JOptionPane.CANCEL_OPTION){\n\t\t\t\t\t\tif(save == JOptionPane.YES_OPTION){\n\t\t\t\t\t\t\tsaveMap();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmap.makeUniform(0);\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onMapClick(LatLng latLng) {\n if(isJoinNode){\n return;\n }\n if(isAddMarker){\n commandManager.doCommand(\n new AddOnePointCommand(\n this,\n mDbHelper,\n latLng,\n PATH_CATEGORY));\n isAddMarker = false;\n fab_add_marker.setSelected(false);\n }\n else if(isEditNode && !isJoinNode){\n if(selectedPosition == null){\n SnackbarUtil.showSnackBar(root_map, snackbar,\"Pilih point terlebih dahulu.\", Snackbar.LENGTH_LONG);\n } else{\n commandManager.doCommand(\n new AddPointCommand(\n this,\n mDbHelper,\n selectedPosition,\n latLng,\n PATH_CATEGORY));\n\n }\n } else if(isEditPolyline){\n long id = (long)selectedPolyline.getTag();\n Path selectedPath = null;\n for (Path path : paths){\n if(path.getId() == id){\n selectedPath = path;\n }\n }\n commandManager.doCommand(\n new AddPointBetweenPathCommand(\n this,\n mDbHelper,\n selectedPath,\n latLng,\n PATH_CATEGORY));\n }\n\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tmv.getController().animateTo(myLocationOverlay.getMyLocation());\n\t\t\t}", "@Override\n\tpublic void processMouseClicked(MouseEvent e) {\n\t\tmap.mouseClicked(e.getX(), e.getY());\n\t}", "@Override\n public void onMapClick(LatLng point) {\n double lati = point.latitude;\n\n\n // Getting longitude of the current location\n double longi = point.longitude;\n\n\n i = new Intent(MapsActivity.this, addtasks.class);\n\n\n Bundle b = new Bundle();\n b.putDouble(\"latitude\", lati);\n b.putDouble(\"longitude\", longi);\n i.putExtras(b);\n\n startActivity(i);\n\n }", "GameState requestActionTile();", "public void run() {\n if (topic.equals(Topic.CURSOR_LOCATION) && _plot != null && _plot.getCursorReception()) {\n CursorLocation cursorLoc = (CursorLocation) data;\n // Check that the cursor location event did not come\n // from this viewer.\n if (!cursorLoc.isSender(\"\" + hashCode())) {\n // Unpack the x,y coordinates and pass them along to\n // the cursor updated method.\n final Point3d p = cursorLoc.getLocation().getPoint();\n double x = p.getX();\n double y = p.getY();\n _plot.cursorTracked(x, y);\n cursorUpdated(x, y, false);\n }\n }\n }", "public void onClick(double lat, double lon)\n/* 60: */ {\n/* 61: 98 */ TileGIS self = this;\n/* 62: */ }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.map_minus_rl:\n mAMap.moveCamera(CameraUpdateFactory.zoomOut());\n break;\n case R.id.map_plus_rl:\n mAMap.moveCamera(CameraUpdateFactory.zoomIn());\n break;\n case R.id.locate_current_rl:\n mLocation = AllOnlineApp.getCurrentLocation();\n if (false/*mLocation != null*/) {\n LatLng cenpt = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n mAMap.moveCamera(CameraUpdateFactory.changeLatLng(cenpt));\n } else {\n LatLng cenpt = new LatLng(GlobalParam.getInstance().get_lat(), GlobalParam.getInstance().get_lng());\n mAMap.moveCamera(CameraUpdateFactory.changeLatLng(cenpt));\n }\n break;\n default:\n break;\n }\n }", "public void onMouseClick(Location point) {\n\t Thread t6 = new MoveMouth(0, 0, canvas);\n t6.start(); \n }", "@Override public void doAction(int option)\r\n{\r\n switch(option)\r\n {\r\n case 1: //view the map\r\n viewMap();\r\n break;\r\n case 2: //view/print a list\r\n viewList();\r\n break;\r\n case 3: // Move to a new location\r\n moveToNewLocation();\r\n break;\r\n case 4: // Manage the crops\r\n manageCrops();\r\n break;\r\n case 5: // Return to Main Menu\r\n System.out.println(\"You will return to the Main Menu now\");\r\n \r\n }\r\n}", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n getLocationPermission();\n }\n }", "@Override\n public boolean onMapClick(@NonNull LatLng point) {\n if (doceLugares()) {\n Toast.makeText(navegacionOptimizada.this,\"solo 12\", Toast.LENGTH_LONG).show();\n } else {\n style = mapboxMap.getStyle();\n if (style != null) {\n anadirLugar(style, intermedi3);\n anadirPunto(intermedi3);\n obtenerROptimi(style, stops);\n\n }\n }\n return true;\n }", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\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 void addPoint_action()\r\n/* */ {\r\n/* 94 */ this.points_action += 1;\r\n/* */ }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tint i = (e.getX()) / 6;\r\n\t\t\t\tint j = (e.getY()) / 6;\r\n\t\t\t\tmap.setNextMap(i, j, 1);\r\n\t\t\t\tmap.refresh1();\r\n\t\t\t\trepaint();\r\n\t\t\t}", "public abstract void applyAction(Action.ActionType type, TileObject actioneer, World world);", "@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 }", "public void usePoint(FireEngine engine) {\n actionPoints.computeIfPresent(engine, (e, p) -> p - 1);\n }", "@Override\n public void onMapClick(@NonNull LatLng point) {\n \n if (destinationMarker != null) {\n map.removeMarker(destinationMarker);\n }\n\n destinationMarker = map.addMarker(new MarkerOptions().position(point));\n\n destinationPosition = Point.fromLngLat(fLon.get(fLon.size()-1), fLat.get(fLon.size()-1));\n originPosition = Point.fromLngLat(originLocation.getLongitude(), originLocation.getLatitude());\n getRoute(originPosition, destinationPosition);\n\n }", "@Override\r\n public boolean onTap(GeoPoint arg0, MapView arg1) {\n if(getMyLocation()!=null){\r\n int size = 30;\r\n Point out=new Point();\r\n mMapView.getProjection().toPixels(getMyLocation(), out); \r\n Rect rect = new Rect(out.x-size,out.y-size,out.x+size,out.y+size);\r\n mMapView.getProjection().toPixels(arg0, out);\r\n if(rect.contains(out.x, out.y)){\r\n //Log.e(\"MyLocation\", \"click my location \");\r\n mPopView.setVisibility(View.GONE);\r\n MapView.LayoutParams params = (MapView.LayoutParams) mPopView.getLayoutParams();\r\n params.x = 0;// Y轴偏移\r\n params.y = -5;// Y轴偏移\r\n GeoPoint point = getMyLocation().e();\r\n params.point = point;\r\n //mMapCtrl.animateTo(point);\r\n mMapView.updateViewLayout(mPopView, params);\r\n mPopView.setVisibility(View.VISIBLE);\r\n }else{\r\n mPopView.setVisibility(View.GONE) ; \r\n }\r\n }\r\n return super.onTap(arg0, arg1);\r\n }", "@Override\n public boolean onMapClick(@NonNull LatLng mapClickPoint) {\n // Update the map click point circle's location\n mapboxMap.getStyle(new Style.OnStyleLoaded() {\n @Override\n public void onStyleLoaded(@NonNull Style style) {\n lastMapClickPoint = Point.fromLngLat(mapClickPoint.getLongitude(), mapClickPoint.getLatitude());\n\n GeoJsonSource deviceLocationSource = style.getSourceAs(MAP_CLICK_CIRCLE_LAYER_SOURCE_ID);\n if (deviceLocationSource != null) {\n deviceLocationSource.setGeoJson(Point.fromLngLat(\n mapClickPoint.getLongitude(), mapClickPoint.getLatitude()));\n }\n queryWifiSpotsWithTilequeryApi(mapClickPoint);\n }\n });\n return true;\n }", "public void act() \n {\n // Add your action code here.\n MyWorld world = (MyWorld) getWorld();\n jefe = world.comprobarJefe();\n \n \n explotar();\n \n if(jefe)\n {\n girarHaciaEnemigo();\n movimientoPegadoAJefe();\n }\n }", "@Override\n public void onMapLongClick(LatLng point){\n location = new cLocation(point, this);\n\n //Open a dialog for the user to allow the user to set the name for the saved location\n DialogFragment dialog = new AddLocationDialog();\n dialog.show(getFragmentManager(), getText(R.string.map_ask_add).toString());\n }", "private void executeAction(ElevatorAction first) {\n\n\t}", "public void run()\n {\n this.currentArea = map[xPosition][yPosition];\n this.choices = currentArea.getAreaChoices();\n this.enemy = currentArea.getEnemy();\n this.combat = new Combat(this);\n \n Choice option = PlayerInputHelper.getOption(currentArea.getOpeningLine(), choices);\n choice = option;\n \n try\n {\n Method action = option.getAction();\n if(option.isMovement())\n {\n currentArea = (IArea)action.invoke(mover,option.getDirection());\n run();\n }\n \n else if (!option.isMovement())\n {\n try\n {\n if(option.getInvokeOn().equals(\"c\"))\n {\n action.invoke(combat);\n }\n else\n {\n action.invoke(this);\n }\n }\n catch(NullPointerException e)\n {\n action.invoke(this);\n }\n \n }\n \n else\n {\n System.out.println(option.toString());\n }\n }\n \n catch(Exception e)\n {\n e.printStackTrace();\n }\n \n \n }", "public void onMapClick (LatLng point) {\n\t\tmap.clear();\n\t\tdouble lat1 = point.latitude;\n\t\tdouble lng1 = point.longitude;\n\t\tlat=String.valueOf(lat1);\n\t\tlongi=String.valueOf(lng1);\n\t\tGeocoder gcd = new Geocoder(Home.this, Locale.getDefault());\n\t\tList<Address> addresses;\n\t\ttry {\n\t\t\taddresses = gcd.getFromLocation(lat1, lng1, 1);\n\t\t\tif (addresses.size() > 0) \n\t\t\t\t\n\t\t\t\theading.setText(addresses.get(0).getSubAdminArea());\n\t\t\tToast.makeText(Home.this, addresses.get(0).getLocality(),Toast.LENGTH_SHORT).show();\t\t\t\n\t\t\tMarkerOptions options = new MarkerOptions();\n\t\t\toptions.position(point);\n\t\t\tBitmap icon = BitmapFactory.decodeResource(Home.this.getResources(),\n\t\t\t\t\tR.drawable.pin);\n\t\t\tBitmap bhalfsize=Bitmap.createScaledBitmap(icon, icon.getWidth()/5,icon.getHeight()/5, false);\n\t\t\toptions.icon(BitmapDescriptorFactory.fromBitmap(bhalfsize));\n\t\t\toptions.title(addresses.get(0).getLocality());\t\t\n\t\t\tmap.addMarker(options);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void onMouseClicked(MapMouseEvent ev) {\n \tint respuesta= JOptionPane.showConfirmDialog(null, \"¿Desea guardar este punto?\", \"Confirmar\",JOptionPane.YES_NO_OPTION);\n \tif(respuesta==0) {\n \t\tString texto=JOptionPane.showInputDialog(null, \"Nombre del lugar\");\n \t\tDirectPosition2D p = ev.getWorldPos();\n System.out.println(p.getX() + \" -- \" + p.getY());\n drawMyPoint(p.getX(), p.getY(), map, texto);\n \t}\n \telse{\n \t\tSystem.out.println(\"Punto no guardado\");\n \t}\n \n }", "void switchToMapSelectActivity();", "@Override\n public void performAction(int row, int col) throws MapException {\n if (GameData.get().getMap().getMapElement(row, col).getStructure() != null) {\n mCityActivity.inspectBuilding(row, col);\n }\n }", "public void act() \n {\n if(Greenfoot.mouseClicked(this)){\n storeMenu.getLastPressed(this,item,cost);\n changeImage();\n } \n }", "public void mapIsClicked(View view) {\n Controller.viewMappa();\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tx=(int)(e.getX()*(1/widthAttitude));\n\t\ty=(int)(e.getY()*(1/heightAttitude));\n\t\t//\t\tSystem.out.println(\"(\"+x + \",\" + y +\")\"+\"point in pixel\");\n\t\tif(!mode.equals(\"load\")) {\n\t\t\tif(item.equals(\"P\")) {\n\t\t\t\tPoint3D p1=new Point3D(x,y,0);\n\t\t\t\tMap map=new Map();\n\t\t\t\t//\t\t\t\tSystem.out.println(p1.x()+\" its the x \"+p1.y()+\"its the y \"+p1.z()+\" its the z\");\n\t\t\t\tp1=map.Pixels2Polar(p1);\n\t\t\t\t//\t\t\t\tSystem.out.println(p1.x()+\" its the x \"+p1.y()+\"its the y \"+p1.z()+\" its the z\");\n\t\t\t\tgame.getGameArray().add(new Packman(x,y,0,1,1)); \n\t\t\t\tSystem.out.println(\"new packman\");\n\t\t\t\trepaint();\n\t\t\t}\n\t\t\tif(item.equals(\"F\")) {\n\t\t\t\tgame.getGameArray().add(new Fruit(x,y,0,1));\n\t\t\t\tSystem.out.println(\"new fruit\");\n\t\t\t\trepaint();\n\t\t\t}\n\t\t}\n\t}", "void btnLoadMap();", "protected void doPostAlgorithmActions() {\r\n\r\n if (displayLoc == NEW) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }", "@Override\n public void onMapClick(LatLng point) {\n mMap.clear();\n\n // Add marker on clicked point\n mMap.addMarker(new MarkerOptions().position(point)\n .icon(BitmapDescriptorFactory\n .defaultMarker(BitmapDescriptorFactory.HUE_RED)))\n .setTag(true);\n\n // Set global lat and lng\n lat = point.latitude;\n lng = point.longitude;\n\n // Hide detail view\n hideDetails();\n }", "protected void execute() {\t\n \ttarget = Robot.trackingCamera.getTargetPosition();\n \t\n \tSmartDashboard.putNumber(\"targetX\", target[0]);\n \tSmartDashboard.putNumber(\"targetY\", target[1]);\n \t\n \tif(target[0] == TrackingCamera.NOTFOUND || lastDistance < 28){\n \t\tsuper.execute();\n \t\treturn;\n \t}\n \t\n \ttargetX = target[0];\n \ttargetY = target[1];\n \t\n \tsuper.execute();\n \t//System.out.println(distance);\n }", "public void updateLocation();", "public abstract void updateLocations();", "public void run() {\n editLocationRequest(row);\n }", "public void act() \n {\n setLocation(getX() + Hur_Speed, getY());\n }", "@Override\n\tpublic void run()\n\t{\n\t\tswitch (ubiToolType)\n\t\t{\n\t\tcase PUNKT:\n\t\t\tdoPoint();\n\t\t\tbreak;\n\t\tcase KREIS:\n\t\t\tdoCircle();\n\t\t\tbreak;\n\t\tcase LINIE:\n\t\t\tdoLine();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e)\n\t{\n\t\tSystem.out.println(e.getX()+\",\"+e.getY());\n\t\t\n\t\t//On envoie au controller les coordonnées selectionnées:\n\t\tcontroller.clicOnMap(e.getX(), e.getY());\n\t}", "protected void execute() {\n \tif (setPoint != 0)\n \t\tshooterWheel.shooterWheelSpeedControllerAft.setSetPoint(setPoint);\n \tshooterWheel.driveAftWheel(shooterWheel.shooterWheelSpeedControllerAft.getControlOutput());\n \t\n }", "private void moveToNewMap(GameWorldNode node) {\n\t\tresetValues();\n\t\tvisit(node);\n\t\tif (node.getNodeCode() == 29999) {\n\t\t\tcurrentImage.addAction(moveBy(0, 500, 3));\n\t\t\tcurrentImageGhost.addAction(moveBy(0, 500, 3));\n\t\t\tthis.addAction(sequence(delay(2), new Action() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean act(float delta) {\n\t\t\t\t\tsaveService.saveDataValue(SaveEnum.MAP_CODE, 1);\n\t\t\t\t\tsaveService.saveDataValue(SaveEnum.NODE_CODE, 30000);\n\t\t\t\t\tshowScreen(ScreenEnum.LOAD_GAME);\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}));\t\n\t\t}\n\t\telse {\n\t\t\tcurrentImage.addAction(moveBy(0, -500, 3));\n\t\t\tcurrentImageGhost.addAction(moveBy(0, -500, 3));\n\t\t\tthis.addAction(sequence(delay(2), new Action() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean act(float delta) {\n\t\t\t\t\tsaveService.saveDataValue(SaveEnum.MAP_CODE, 0);\n\t\t\t\t\tsaveService.saveDataValue(SaveEnum.NODE_CODE, 3000);\n\t\t\t\t\tshowScreen(ScreenEnum.LOAD_GAME);\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}));\t\n\t\t}\n\t}", "@Override\r\n public void EditMap() throws Exception {\r\n printInvalidCommandMessage();\r\n }", "@Override\n\tpublic void performAction(SherlockFragment fragment, FormAction action,\tMission m, Page p) {\n\n\t\tif(fragment instanceof FormPageFragment){\n\n\t\t\tfinal LinearLayout formView = ((FormPageFragment) fragment).getFormView();\n\t\t\t//find mapview\n\t\t\tfinal AdvancedMapView mapView = findMapView(formView);\n\n\t\t\tif(mapView == null){\n\t\t\t\tLog.e(LocalizeAction.class.getSimpleName(), \"no mapView found, cannot continue\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tDescribedMarker setMarker = null;\n\t\t\t//find the marker\n\t\t\tif(mapView.getOverlayManger().getMarkerOverlay().getMarkers() != null && mapView.getOverlayManger().getMarkerOverlay().getMarkers().size() > 0){\n\n\t\t\t\tsetMarker = mapView.getOverlayManger().getMarkerOverlay().getMarkers().get(0);\n\t\t\t\t\n\t\t\t\tGeoPoint geoPoint = setMarker.getGeoPoint();\n\t\t\t\t//center map on markers position\n\t\t\t\tmapView.getMapViewPosition().setCenter(geoPoint);\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\t\tfor(int Index=0;Index<pac.getPath().size();Index++) { //run on the path arraylist of every pacman\n\t\t\tfullGamePath(pac, pac.getPath().get(Index).getFruit(),Index); //call the function\n\t\t\tpac.getPath().get(Index).setTime();\n\t\t}\n\t\t\n\t}", "public void act() \n {\n if(getY()>=30 && !cambia)\n {\n direccion = -1;\n }\n else\n {\n cambia = true;\n }\n if(getY() <= getWorld().getHeight()-30 && cambia)\n {\n direccion = 1;\n }\n else\n {\n cambia = false;\n }\n \n setLocation(getX(),getY()+(velocidad*direccion));\n reglas();\n ataque();\n \n \n \n }", "public void executeAction( String actionInfo );", "@Override\n public void run() {\n setPointActions(host.getUnlockedStages());\n }", "public void move(){\n super.move();\n load.updateCoordinates(this.x,this.y);\n }", "private void doPoint()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\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\t\tubisenseData.setPosition(new Point3D(\tx1/100,\n\t\t\t\t\t\t\t\t\t\t\t\ty1/100,\n\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\n\t\twhile (elapsedTime < toolDuration && !this.terminate)\n\t\t{\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tthis.notifyListeners(event);\n\t\t\telapsedTime++;\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\n\t}", "@Override\n public ActionResult execute() {\n // trovare l'id del cantiere\n player = MStoneAgeGame.getInstance().getActivePlayer();\n MGrid grid = MStoneAgeGame.getInstance().getM_grid();\n MTokenForest tokenForest = grid.searchTFbyValue(squareName);\n MSquare newSquare = player.moveMarker(tokenForest);\n System.out.println(player.getMarkerName() + \" è ora in Building Site Square\");\n return newSquare.doAction(player);\n }", "public void performUnitActionAt(Position p);", "@Override\n public void startExecuting()\n {\n this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed);\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\t\t\t\t\t\t\tpublic void onTap(GeoPoint pt, MapView mapView) {\n\t\t\t\t\t\t\t\tint lastTouchedIndex = poiOverlay\n\t\t\t\t\t\t\t\t\t\t.getLastFocusedIndex();\n\t\t\t\t\t\t\t\tif (lastTouchedIndex > -1) {\n\t\t\t\t\t\t\t\t\tOverlayItem tapped = poiOverlay\n\t\t\t\t\t\t\t\t\t\t\t.getItem(lastTouchedIndex);\n\t\t\t\t\t\t\t\t\tannotation.showAnnotationView(tapped);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\t\t\tintent.setClass(MapActivity.this,\n\t\t\t\t\t\t\t\t\t\tPatientActivity.class);\n\t\t\t\t\t\t\t\tintent.putExtra(\"Id\", poiOverlay\n\t\t\t\t\t\t\t\t\t\t.getItem(lastTouchedIndex).getSnippet());\n\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t}", "@Override\n public void onLocationChanged(Location location) {\n if(location != null){\n originLocation = location;\n setCameraPosition(location);\n\n LatLng point = new LatLng();\n point.setLongitude(finalLon);\n point.setLatitude(finalLat);\n onMapClick(point);\n\n startButton.setVisibility(View.VISIBLE);\n\n\n }\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n//\t\tPoint2D.Double view = new Point2D.Double(e.getX(), e.getY());\n//\t\tPoint2D.Double worldPoint = new Point2D.Double();\n//\t\tAffineTransform viewToWorld = new AffineTransform(1.0 / scale, 0, 0, 1.0 / scale, worldUpperLeft.getX(), worldUpperLeft.getY());\n//\t\tviewToWorld.transform(view, worldPoint);\n//\t\n//\t\t// check here if clicking a waypoint\n//\t\tint index = data.hitWaypointTest(worldPoint.getX(), worldPoint.getY());\n//\t\tif(index != -1) {\n////\t\t\tWaypoint w = data.getWaypoint(index);\n//\t\t\tGUIFunctions.updateWaypointDataFields(w);\n//\t\t} else \n//\t\t\tGUIFunctions.updateWaypointDataFields(null);\n\t}", "public boolean onMapPoiClick(MapPoi arg0) {\n\t\t\t\t \n\t\t\t\t poi=arg0.getName();\n\t\t\t\t isPoi=true;\n\t\t\t\t currentPt = arg0.getPosition();\n\t\t\t\t\t//Toast.makeText(getApplicationContext(), \"单击\"+currentPt.latitude+\",\"+currentPt.longitude+currentPt, Toast.LENGTH_SHORT).show();\n\t\t\t\t\tLatLng ptCenter = new LatLng(currentPt.latitude, currentPt.longitude);\n\t\t\t\t\t// 反Geo搜索\n\t\t\t\t\tmSearch.reverseGeoCode(new ReverseGeoCodeOption()\n\t\t\t\t\t\t\t.location(ptCenter));\n\t\t\t\t //名称\n\t\t\t\t\t/*Toast.makeText(getApplicationContext(), arg0.getName()+\":\"+adress, Toast.LENGTH_LONG)\n\t\t\t\t\t.show();*/\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t return false;\n\t\t\t\t }", "public void goToEntry() {\n this.step(GameMap.instance().getEntryTile());\n }", "public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}", "public void setPoints_action(int points_action)\r\n/* */ {\r\n/* 80 */ this.points_action = points_action;\r\n/* */ }", "public void start(Point p);", "@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 boolean animateTo(final ILatLng point, final boolean userAction) {\n// mMapView.invalidate();\n return setZoomAnimated(mMapView.getZoomLevel(), point, true, userAction);\n }", "@Override\n\t\tpublic void run() {\n\t\t\tint mapIndex = getFloorIndexByName(mMyLocationFloor);\n\t\t\tif (mapIndex > -1) {\n\t\t\t\tsetCheckAt(mapIndex);\n\t\t\t}\n\t\t}", "public void moveAndZoomAction(PointActor pointActor) {\n pointActor.remove();\n // coordinates where map should move\n float movePointX = screenWidth / 2 - pointActor.getX() - pointActor.getWidth();\n float movePointY = screenHeight / 2 - pointActor.getY() - pointActor.getHeight();\n // sets origin where the zoom effect is centralized\n mapBorderActor.setOrigin(pointActor.getX() + pointActor.getWidth(), pointActor.getY() + pointActor.getHeight());\n // adds actions\n mapBorderActor.addAction(\n // sequence allows actors do actions in order\n Actions.sequence(\n Actions.moveTo(movePointX,\n movePointY,\n 1f), // duaration(seconds) of move\n Actions.scaleTo(1.5f, 1.5f, 1f),\n Actions.run(new Runnable() {\n @Override\n public void run() {\n host.setScreen(new TalkScreen(host));\n }\n })));\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 }", "protected void execute() {\n \t\n \tcurrent_time = System.currentTimeMillis();\n \t\n \tlift.liftDown(LIFT_SPEED);\n }", "public void action() {\n action.action();\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 }", "private void pointWalkBehavior() {\n\t\tif (moving) {\n\t\t\tif (remainingSteps > 0) {\n\t\t\t\tupdatePixels(action);\n\t\t\t\tremainingSteps -= speed;\n\t\t\t} else {\n\t\t\t\tupdateCoordinate(action, false);\n\t\t\t\tif (coordX != endPoint.x || coordY != endPoint.y) {\n\t\t\t\t\tif (validMoveEh(action)) {\n\t\t\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmoving = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\t\tpointWalking = false;\n\t\t\t\t\tmoving = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (validMoveEh(action)) {\n\t\t\t\tmoving = true;\n\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t}\n\t\t}\n\t}", "public void updateMap(HashMap<Coordinate, MapTile> currentView) {\n\t\t\tfor (Coordinate key : currentView.keySet()) {\n\t\t\t\tif (!map.containsKey(key)) {\n\t\t\t\t\tMapTile value = currentView.get(key);\n\t\t\t\t\tmap.put(key, value);\n\t\t\t\t\tif (value.getType() == MapTile.Type.TRAP) {\n\t\t\t\t\t\tTrapTile value2 = (TrapTile) value; // downcast to find type\n\t\t\t\t\t\tif (value2.getTrap().equals(\"parcel\") && possibleTiles.contains(key)) {\n\t\t\t\t\t\t\tparcelsFound++;\n\t\t\t\t\t\t\tparcels.add(key);\n\t\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\t\tphase = \"search\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"lava\")) {\n\t\t\t\t\t\t\tlava.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"health\")) {\n\t\t\t\t\t\t\thealth.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"water\")) {\n\t\t\t\t\t\t\twater.add(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.getType() == MapTile.Type.FINISH) {\n\t\t\t\t\t\texitFound = true;\n\t\t\t\t\t\texit.add(key);\n\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\tphase = \"search\";\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}", "@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 }", "@Override\n\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\tfinal LatLng location = arg0;\n \tAlertDialog builder = new AlertDialog.Builder(MainActivity.this)\n\t .setMessage(\"Do you want to add your location here?\")\n\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t setFlag = true;\n\t \t myLocation = location;\n\t \t //use this flag to indicate that we want to see the path from current location or a set point\n\t \t Log.d(\"my location:\", \"\"+myLocation.latitude + myLocation.longitude);\n\t \t if(setFlag == true){\n\t \t\t if(myMarker != null){\n\t\t \t\t myMarker.remove();\n\t\t \t }\n\t\t \t myMarker = mMap.addMarker(new MarkerOptions().position(myLocation).title(\"myLocation\").draggable(true)\n\t\t \t\t\t\t\t\t.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n\t\t \t\t\t\t landmarks.addMarker(\"myLocation\", myMarker);\n\t \t } \n\t }\n\t })\n\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t }).create();\n \tbuilder.show();\n\t\t\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}", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "@Override\r\n\t\t\tpublic void onMapLoadFinish() {\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstart = new GeoPoint((int) (locData.latitude * 1e6),\n\t\t\t\t\t\t(int) (locData.longitude * 1e6));\n\t\t\t\tstartNavi(start, end);\n\t\t\t}", "private void trySupplyCurrentActivity(){\n // Provides the current activity to the mMapView when a callback is requested.\n mMapView.setOnSupplyCurrentActivityListener(new MapView.OnSupplyCurrentActivityListener() {\n @Override\n public Activity onSupplyCurrentActivity() {\n return MapActivity.this;\n }\n });\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.navigation:\n\t\t\tgotoBaiduMap();\n\t\t\tbreak;\n\t\tcase R.id.location:\n\t\t\tlocationIv.setEnabled(false);\n\t\t\tMapStatusUpdate msu = MapStatusUpdateFactory.zoomTo(15.0f);\n\t\t\tbaiduMap.setMapStatus(msu);\n\t\t\t// 设置定位监听器,其实是启动了定位\n\t\t\tLocationUtil.getInstance(_activity).startOneLocation(\n\t\t\t\t\tOneLocationListener);\n\n\t\t\tbreak;\n\t\tcase R.id.refresh:\n\n\t\t\tbreak;\n\t\tcase R.id.list:\n\t\t\tBundle playground = new Bundle();\n\t\t\tplayground.putInt(\"type\", type);\n\t\t\tif (isTest) {// 测试机构\n\t\t\t\tfinish();\n\t\t\t} else {\n\t\t\t\tif (isSwitch) {\n\t\t\t\t\tsetResult(RESULT_OK, playground);\n\t\t\t\t\tfinish();\n\t\t\t\t} else {\n\t\t\t\t\tplayground.putBoolean(\"isSwitch\", true);\n\t\t\t\t\tUIHelper.jumpForResult(_activity,\n\t\t\t\t\t\t\tNearbyElevatorPlaygroundListActivity.class,\n\t\t\t\t\t\t\tplayground, 1006);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase R.id.search:\n\t\t\tif (!TextUtils.isEmpty(input.getText().toString()))\n\t\t\t\tsearch(input.getText().toString());\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "public void clickOnMainMap(MouseEvent e) {\n //button 1\n //on stack\n //on planet\n Point p = SU.getSpaceMapClickPoint(e);\n\n if (e.getButton() == MouseEvent.BUTTON3) {\n SU.clickOnSpaceMapButton3(p);\n } else if (e.getButton() == MouseEvent.BUTTON1) {\n clickOnSpaceMapButton1(p);\n }\n }", "public void draw(Point location) {\n\t}", "private void inputLocation() {\n// boolean googleMapExist= (ConnectionResult.SUCCESS==GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext));\n//\n// if(googleMapExist) {\n// org.wowtalk.Log.w(\"google map exist\");\n// Intent mapIntent = new Intent(mContext, PickLocActivity.class);\n// mapIntent.putExtra(\"auto_loc\", true);\n// mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n// } else {\n //org.wowtalk.Log.w(\"google map not exist\");\n Intent mapIntent = new Intent(mContext, PickLocActivityWithAMap.class);\n mapIntent.putExtra(\"auto_loc\", true);\n mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n //}\n }", "@Override\n public void execute() {\n node.toggleBoundaryMarker();\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 }", "public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }" ]
[ "0.6541844", "0.6274297", "0.6185406", "0.61656", "0.5877519", "0.58515227", "0.5832594", "0.58019716", "0.57768655", "0.575372", "0.5750313", "0.5743932", "0.5726429", "0.57171535", "0.57084596", "0.56459206", "0.5643537", "0.5621432", "0.5616869", "0.5612973", "0.5608591", "0.5608111", "0.55808246", "0.5575512", "0.5569223", "0.555972", "0.5532119", "0.5521403", "0.5521045", "0.5515904", "0.55146486", "0.5514018", "0.55134076", "0.5512808", "0.5507581", "0.5505938", "0.55036664", "0.5497029", "0.54816014", "0.54745007", "0.5466213", "0.5455493", "0.5449222", "0.54446936", "0.5440742", "0.54288185", "0.54225993", "0.5420734", "0.5408818", "0.5407805", "0.5405048", "0.53928983", "0.53890216", "0.5387315", "0.5362983", "0.53603214", "0.5336123", "0.5334267", "0.53302246", "0.53300995", "0.5329024", "0.53244877", "0.531045", "0.530372", "0.5301707", "0.52975124", "0.5294641", "0.529439", "0.52918345", "0.52901304", "0.5287964", "0.5284631", "0.52779174", "0.5273824", "0.527361", "0.52724034", "0.5271049", "0.52676404", "0.5258197", "0.5257254", "0.5256801", "0.5251651", "0.5250339", "0.52443767", "0.52418697", "0.52397877", "0.523201", "0.5224301", "0.5214837", "0.5210383", "0.52091527", "0.5208493", "0.52080554", "0.52040166", "0.52030283", "0.51918113", "0.51907086", "0.51869637", "0.51847035", "0.518065" ]
0.5194045
95
Gets the x,y values for a point, applying transformation for each floor
private static final int[] getPoint(int point) { int[] ret = new int[2]; if (point >= firstPoint && point <= endPoint) { ret = getPoint(ruteData[point + 2]);//ruteData[point + 2]); } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<Point2D> getInterpolatedPoints();", "public Point transform(double x, double y, double z) {\n\t\t\n\t\n\t\tdouble uIso = (x * xToU) + (y * yToU) + (z * zToU);\n\t\tdouble vIso = (x * xToV) + (y * yToV) + (z * zToV);\n\t\t\n\t\tint uDraw = xOffset + (int)(scale * uIso);\n\t\tint vDraw = yOffset + (int)(scale * vIso);\n\t\t\n\t\treturn new Point(uDraw, vDraw);\n\t}", "public double[] getHitGeoCoord();", "protected IPoint scalePointIntoCoordinates(IPoint point) {\n\t\t\n\t\tdouble newX = point.getX() / getPixelsPerX();\n\t\tdouble newY = point.getY() / getPixelsPerY();\n\t\treturn new Point(newX, newY, point.getTime());\n\t}", "@Override\n public byte[] pack() {\n // If data not set\n if (m_ptLoc == null)\n return (null);\n \n byte[] bData = new byte[16];\n double dValue; \n int iValue;\n \n // X-coordinate\n iValue = (int)(Math.floor(dValue = m_ptLoc.getX()));\n bData[0] = (byte)((0xFF000000 & iValue) >> 24);\n bData[1] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[2] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[3] = (byte)((0x000000FF & iValue));\n iValue = (int)(Math.floor((dValue - (double)iValue) * 10e8));\n bData[4] = (byte)((0xFF000000 & iValue) >> 24);\n bData[5] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[6] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[7] = (byte)((0x000000FF & iValue));\n \n // Y-coordinate\n iValue = (int)(Math.floor(dValue = m_ptLoc.getY()));\n bData[8] = (byte)((0xFF000000 & iValue) >> 24);\n bData[9] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[10] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[11] = (byte)((0x000000FF & iValue));\n iValue = (int)(Math.floor((dValue - (double)iValue) * 10e8));\n bData[12] = (byte)((0xFF000000 & iValue) >> 24);\n bData[13] = (byte)((0x00FF0000 & iValue) >> 16);\n bData[14] = (byte)((0x0000FF00 & iValue) >> 8);\n bData[15] = (byte)((0x000000FF & iValue));\n \n return (bData);\n }", "public float getX() { return xCoordinate;}", "public static int transformCoordenate(int floor, byte axis) {\n switch (floor) {\n case 0:\n switch (axis) {\n case X_COORD:\n return 0;\n case Y_COORD:\n return -103;\n }\n break;\n case 1:\n return 0;\n case 2:\n switch (axis) {\n case X_COORD:\n return -321;\n case Y_COORD:\n return -23;\n }\n break;\n case 3:\n switch (axis) {\n case X_COORD:\n return -137;\n case Y_COORD:\n return -241;\n }\n break;\n case 4:\n switch (axis) {\n case X_COORD:\n return 0;\n case Y_COORD:\n return -13;\n }\n break;\n case 5:\n switch (axis) {\n case X_COORD:\n return 0;\n case Y_COORD:\n return -90;\n }\n break;\n case 6:\n switch (axis) {\n case X_COORD:\n return -116;\n case Y_COORD:\n return -223;\n }\n break;\n }\n return 0;\n }", "private Point getTileCoordinates(int x, int y)\n {\n int tileWidth = this.tileset.getTileWidth() + 1;\n int tileHeight = this.tileset.getTileHeight() + 1;\n int tileCount = this.tileset.getTileCount();\n int rows = tileCount / TILES_PER_ROW + \n (tileCount % TILES_PER_ROW > 0 ? 1 : 0);\n \n int tileX = Math.max(0, Math.min(x / tileWidth, TILES_PER_ROW - 1));\n int tileY = Math.max(0, Math.min(y / tileHeight, rows - 1));\n \n return new Point(tileX, tileY);\n }", "public java.awt.geom.Point2D.Double transformedPoint(double x, double y)\n {\n double[] position = {x,y}; \n getGraphicsState().getCurrentTransformationMatrix().createAffineTransform().transform(position, 0, position, 0, 1);\n position[1] = fixY(position[1]);\n\n\t_pageAffineTransform.transform(position,0, position, 0, 1);\n return new Point2D.Double(position[0],position[1]);\n }", "public double[] getCoordinates() {\n \tdouble []coords = this.position.getCoordinates();\n \tthis.currentX = coords[0];\n \tthis.currentY = coords[1];\n \treturn coords;\n }", "public int getXY(int x, int y);", "public double[] getWorldCoordinateWGS84(int screenX, int screenY);", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "public double[] getCoordinates(){\n\t\tdouble[] coord = new double[2];\n\t\tdouble xcoord = (double)position[0]/9;\n\t\tdouble zcoord = (double)position[1]/9;\n\t\tcoord[0] = xcoord;\n\t\tcoord[1] = zcoord;\t\t\n\t\treturn coord;\n\t}", "public Point getXY()\n\t{\n\t\tPoint newPoint = new Point(x,y);\t\t\t\t\t\t// Create new Point object \n\t\treturn newPoint; \t\t\t\t\t\t\t\t\t\t// Return point's x and y coordinates\n\t}", "double getX() { return pos[0]; }", "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 getPoint() {\r\n return point;\r\n }", "public double getPoint() {\r\n return point;\r\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 }", "Collection<Point> getAllCoordinates();", "public abstract Vector3D getPointForSurfaceCoordinates(double u, double v);", "public double getXCoordinates() { return xCoordinates; }", "protected double xPixelToPosition(double pixel) {\r\n// double axisV = xPositionToPixel(originX);\r\n// return (pixel - axisV) * (maxX - minX) / (double) getWidth();\r\n return minX + pixel * (maxX - minX) / getWidth();\r\n }", "public RMPoint getXY() { return new RMPoint(getX(), getY()); }", "protected Point PTtoXY(double pressure, double temperature) {\n Coordinate xy = world.map(WxMath.getSkewTXY(pressure, temperature));\n\n return new Point((int) Math.round(xy.x), (int) Math.round(xy.y));\n }", "public abstract int[] getCoords();", "public abstract Point2D getPosition();", "public int getPointX() {\n return pointX;\n }", "public Point2D getLocation();", "@Override\n public Point2D.Double point(int i, double t, double[] xpoints, double[] ypoints) {\n double px = 0;\n double py = 0;\n for (int j = 0; j <= 3; j++) {\n px += b(j, t) * xpoints[i + j];\n py += b(j, t) * ypoints[i + j];\n }\n return new Point2D.Double(px, py);\n }", "public Position getPositionFromPixelCoords(int y, int x){\n if (disp.rotated){\n return new Position(y / 64 + 1, (x - 640) / -64);\n } else {\n return new Position((y - 576) / -64, x / 64);\n }\n }", "public double getX() {\n\t\treturn point[0];\n\t}", "@Override\n\tpublic double[] getCoordinates() {\n\t\tdouble[] coordinates = { x1, y2, x2, y1 };\n\t\treturn coordinates;\n\t}", "double getXPosition();", "public Point transform(int x, int y) {\n\t\tdouble pixelWidth = this.plainWidth / this.resolutionX;\n\n\t\tdouble rightFactor = pixelWidth * (x - (this.resolutionX / 2.0));\n\t\tdouble upFactor = pixelWidth * ((this.resolutionY / 2.0) - y);\n\n\t\treturn plainCenterPoint\n\t\t\t\t.add(upVec.mult(upFactor))\n\t\t\t\t.add(rightVec.mult(rightFactor));\n\t}", "@Override\r\n\tpublic Point2D.Double transform(Point2D.Double p) {\r\n\t\tRealVector s = new ArrayRealVector(new double[] { p.x, p.y, 1 }, false);\r\n\t\tRealVector t = H.operate(s);\r\n\t\tp.x = t.getEntry(0) / t.getEntry(2);\r\n\t\tp.y = t.getEntry(1) / t.getEntry(2);\r\n\t\treturn p;\r\n\t}", "public double get(int y, int x);", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "long getCoordinates();", "long getCoordinates();", "void getPosRelPoint(double px, double py, double pz, DVector3 result);", "public final double getX() { return location.getX(); }", "public synchronized void transform() {\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n double wx = entity_to_wxy.get(entity).getX(),\n wy = entity_to_wxy.get(entity).getY();\n int sx, sy;\n entity_to_sxy.put(entity, (sx = wxToSx(wx)) + BundlesDT.DELIM + (sy = wyToSy(wy)));\n entity_to_sx.put(entity, sx); entity_to_sy.put(entity, sy);\n }\n transform_id++;\n }", "private Point getIso(int x, int y) {\n\t\treturn new Point(getIsoX(x, y), getIsoY(x, y)); //Could be more efficient...\n\t}", "double[] getOrigin();", "public double getValue(double x, double y){\n\n\tint i,j;\n\tdouble fracX,fracY;\n\tdouble Wxm, Wx0, Wxp, Wym, Wy0, Wyp;\n\tdouble Vm, V0, Vp;\n\n\n\tif(x < x_min || y < y_min || x > x_max || y > y_max){\n\t return z_min;\n\t}\n\n i = (int) ((x-x_min)/x_step + 0.5);\n j = (int) ((y-y_min)/y_step + 0.5);\n\n if( i < 1) i = 1;\n if( i > (nX-2)) i = nX-2;\n if( j < 1) j = 1;\n if( j > (nY-2)) j = nY-2;\t \n\n fracX = (x - x_min - i*x_step)/x_step;\n fracY = (y - y_min - j*y_step)/y_step;\n\n\tWxm = 0.5*(0.5 - fracX)*(0.5 - fracX);\n\tWxp = 0.5*(0.5 + fracX)*(0.5 + fracX);\n\tWx0 = 0.75 - fracX*fracX;\n\n\tWym = 0.5*(0.5 - fracY)*(0.5 - fracY);\n\tWyp = 0.5*(0.5 + fracY)*(0.5 + fracY);\n\tWy0 = 0.75 - fracY*fracY;\n\n\tVm = Wxm*gridData[i-1][j-1]+Wx0*gridData[i][j-1]+Wxp*gridData[i+1][j-1];\n\tV0 = Wxm*gridData[i-1][j] +Wx0*gridData[i][j] +Wxp*gridData[i+1][j];\n\tVp = Wxm*gridData[i-1][j+1]+Wx0*gridData[i][j+1]+Wxp*gridData[i+1][j+1];\n\n return Wym*Vm + Wy0*V0 + Wyp*Vp;\n }", "public Coordinate pixelToWorld(int x, int y, Envelope map) {\n if (graphics == null) {\n LOGGER.info(\"no graphics yet deffined\");\n \n return null;\n }\n \n //set up the affine transform and calculate scale values\n AffineTransform at = setUpTransform(map, screenSize);\n \n /* If we are rendering to a component which has already set up some form\n * of transformation then we can concatenate our transformation to it.\n * An example of this is the ZoomPane component of the swinggui module.*/\n if (concatTransforms) {\n graphics.getTransform().concatenate(at);\n } else {\n graphics.setTransform(at);\n }\n \n try {\n Point2D result = at.inverseTransform(new java.awt.geom.Point2D.Double(x, y),\n new java.awt.geom.Point2D.Double());\n Coordinate c = new Coordinate(result.getX(), result.getY());\n \n return c;\n } catch (Exception e) {\n LOGGER.warning(e.toString());\n }\n \n return null;\n }", "private Point toInnerPoint(Point punto){\r\n \treturn punto.add(-coord.X(), -coord.Y());\r\n// return new Point(punto.getRow() - coord.getRow(), punto.getCol() - coord.getCol());\r\n }", "private double[] getPositionOfSpaceObject(CTS_SpaceObject obj) {\n\t\tif (obj == null) {\n\t\t\t//System.out.println(\"null obj passed to getPositionOfSpaceObject!\");\n\t\t\treturn null;\n\t\t}\n\t\tdouble azimuth = obj.getAzimuth();\n\t\tdouble altitude = obj.getAltitude();\n\t\tif (altitude < 0 || altitude > 90) {\n\t\t\treturn null;\n\t\t}\n\t\tdouble radAlt = toRadians(altitude);\n\t\tdouble r = VIEWING_AREA_WIDTH / 2;\n\t\tdouble x_val, y_val, distanceFromCenter;\n\t\tdistanceFromCenter = abs(r*cos(radAlt));\n\t\t// x_val, y_val are coords relative to the center of the viewing area\n\t\t// being considered 0,0 on the Cartesian plane\n\t\tx_val = distanceFromCenter*(sin(toRadians(azimuth)));\n\t\ty_val = distanceFromCenter*(cos(toRadians(azimuth)));\n\t\t// view_x, view_y are the actual JavaFX coordinates to draw at\n\t\tdouble view_x = 0, view_y = 0;\n\t\tif (azimuth < 90) {\n\t\t\tview_x = x_val + 299;\n\t\t\tview_y = max(0,(299-y_val));\n\t\t} else if (azimuth < 180) {\n\t\t\tview_x = x_val + 299;\n\t\t\tview_y = min(599,(299-y_val));\n\t\t} else if (azimuth < 270) {\n\t\t\tview_x = max(0,(299+x_val));\n\t\t\tview_y = min(599,(299-y_val));\n\t\t} else {\n\t\t\tview_x = max(0,(299+x_val));\n\t\t\tview_y = max(0,(299-y_val));\n\t\t}\n\t\tdouble[] retval = { view_x, view_y};\n\t\treturn retval;\n\t}", "public void getSeriesForPoints(){\n\n int lenght = cluster_polygon_coordinates.length;\n\n x_latitude = new Number[lenght];\n y_longitude = new Number[lenght];\n\n //x_latitude[lenght-1] = cluster_polygon_coordinates[0].x;\n //y_longitude[lenght-1] = cluster_polygon_coordinates[0].y;\n for (int i=0;i<lenght;i++) {\n\n x_latitude[i] = cluster_polygon_coordinates[i].x;\n y_longitude[i] = cluster_polygon_coordinates[i].y;\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].x));\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].y));\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].z));\n }\n\n }", "public double getX();", "public double[] getCoordinates() {\n\t\treturn coordinateTools.localToCoordinates(this);\n\t}", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "public Point getTileCoordinates(int x, int y) {\n int tileWidth = this.board.getTileSet().getTileWidth() + 1;\n int tileHeight = this.board.getTileSet().getTileHeight() + 1;\n\n int tileX = Math.max(0, Math.min(x / tileWidth, this.board.getWidth() - 1));\n int tileY = Math.max(0, Math.min(y / tileHeight, this.board.getHeight() - 1));\n\n return new Point(tileX, tileY);\n }", "public Coordinates getCoordinates()\r\n {\r\n return new Coordinates(r.getX(), r.getY());\r\n }", "private Point getPixel(Point source) {\n float stepWidth = /*canvasWidth*/ canvasHeight / mapWidth;\n float stepHeight = canvasHeight / mapHeight;\n\n float centerX = canvasWidth / 2;\n float centerY = canvasHeight / 2;\n\n return new Point((int) (centerX + source.X * stepWidth), (int) (centerY + source.Y * stepHeight));\n }", "public float[] unProjectCoordinates(float x, float y) {\n\t\t// construct the input vector\n\t\tfloat[] inVec = new float[] {\n\t\t\t\t/* x: */ x, /* y: */ y, \n\t\t\t\t/* z: */ 0, /* w: */ 1\n\t\t};\n\t\t// map from window coordinates to NDC coordinates\n\t\tinVec[0] = (inVec[0] / viewportDims[0]) * 2.0f - 1.0f;\n\t\tinVec[1] = (inVec[1] / viewportDims[1]) * 2.0f - 1.0f;\n\t\tinVec[1] = -inVec[1];\n\t\t\n\t\t// get the output coordinates\n\t\tfloat[] outVec = new float[4];\n\t\tMatrix.multiplyMV(outVec, 0, reverseMatrix, 0, inVec, 0);\n\t\tif (outVec[3] == 0) \n\t\t\treturn null;\n\t\t\n\t\t// divide by the homogenous coordinates\n\t\toutVec[0] /= outVec[3];\n\t\toutVec[1] /= outVec[3];\n\t\toutVec[2] /= outVec[3];\n\t\t\n\t\treturn outVec;\n\t}", "public Point2D[] getGivenPoints(){ \n return this.points; \n }", "public double[][] getPixelCoordinates(){\n return m_pdX;\n }", "public Integer getPoint() {\n return point;\n }", "protected float[] getTransformedPositions() {\n\n if (mGetTransformedPositionsBuffer.length != mYAxis.mEntryCount * 2) {\n mGetTransformedPositionsBuffer = new float[mYAxis.mEntryCount * 2];\n }\n float[] positions = mGetTransformedPositionsBuffer;\n\n for (int i = 0; i < positions.length; i += 2) {\n // only fill y values, x values are not needed for y-labels\n positions[i + 1] = mYAxis.mEntries[i / 2];\n }\n\n mTrans.pointValuesToPixel(positions);\n return positions;\n }", "public int[] computeXY() \n\t\t//POST: FCTVAL == coordinates of the node in form [x, y]\n\t\t{\n\t\t\tint myPosition = getPositionInList(this);\t//get the position of the node\n\n\t\t\t//calculate angle in the circle based on position\n\t\t\tdouble angle = (((double) myPosition) * ((2*Math.PI) / (double) length)); \n\n\t\t\t//convert from polar to cartesian coordinates with radius 0.7; x = rcos(theta)\n\t\t\tdouble x = Math.cos(angle) * 0.7;\t\t//x = rcos(theta)\n\t\t\tdouble y = Math.sin(angle) * 0.7;\t\t//y = rsin(theta)\n\t\t\t\n\t\t\treturn ScaledPoint.getRealCoordinance(x, y);\n\t\t}", "public Point getPoint() {\n return point;\n }", "public float[] getHitPoint();", "public Point3 getPoint(int pointNr);", "private Point2D.Float toGridPoint(int x, int y) {\n return new Point2D.Float((float)((x - centreX)*scale), (float)((centreY - y)*scale));\n }", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "public RMPoint getXYP() { return convertPointToShape(new RMPoint(), _parent); }", "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 int getX() { return loc.x; }", "private DPoint m2833m() {\r\n IPoint iPoint = new IPoint();\r\n this.f1769m.mo353a(this.f1761e.latitude, this.f1761e.longitude, iPoint);\r\n IPoint iPoint2 = new IPoint();\r\n this.f1769m.mo353a(this.f1762f.latitude, this.f1762f.longitude, iPoint2);\r\n IPoint iPoint3 = new IPoint();\r\n this.f1769m.mo353a(this.f1763g.latitude, this.f1763g.longitude, iPoint3);\r\n double d = (double) iPoint.f3639x;\r\n double d2 = (double) iPoint.f3640y;\r\n double d3 = (double) iPoint2.f3639x;\r\n double d4 = (double) iPoint2.f3640y;\r\n double d5 = (double) iPoint3.f3639x;\r\n double d6 = (double) iPoint3.f3640y;\r\n double d7 = (((d6 - d2) * ((((d4 * d4) - (d2 * d2)) + (d3 * d3)) - (d * d))) + ((d4 - d2) * ((((d2 * d2) - (d6 * d6)) + (d * d)) - (d5 * d5)))) / (((2.0d * (d3 - d)) * (d6 - d2)) - ((2.0d * (d5 - d)) * (d4 - d2)));\r\n double d8 = (((d5 - d) * ((((d3 * d3) - (d * d)) + (d4 * d4)) - (d2 * d2))) + ((d3 - d) * ((((d * d) - (d5 * d5)) + (d2 * d2)) - (d6 * d6)))) / (((2.0d * (d4 - d2)) * (d5 - d)) - ((2.0d * (d6 - d2)) * (d3 - d)));\r\n this.f1773q = Math.sqrt(((d - d7) * (d - d7)) + ((d2 - d8) * (d2 - d8)));\r\n this.f1774r = m2830a(d7, d8, d, d2);\r\n d = m2830a(d7, d8, d3, d4);\r\n this.f1775s = m2830a(d7, d8, d5, d6);\r\n if (this.f1774r < this.f1775s) {\r\n if (d <= this.f1774r || d >= this.f1775s) {\r\n this.f1775s -= 6.283185307179586d;\r\n }\r\n } else if (d <= this.f1775s || d >= this.f1774r) {\r\n this.f1775s += 6.283185307179586d;\r\n }\r\n return new DPoint(d7, d8);\r\n }", "private int getIsoX(int x, int y) {\n\t\tint rshift = (DEFAULT_VIEW_SIZE/2) - (TILE_WIDTH/2) + (x - y); //Pan camera to the right\n\t\treturn (x - y) * (TILE_WIDTH/2) + rshift;\n\t}", "public static Point mapPoint(Point point) {\n\t\treturn point;\n\t}", "Point2D getDrawCoordinates(int counter) {\n int x = counter % drawWidth;\n int y = (counter / drawWidth) % drawHeight;\n\n x += drawOffsetX;\n y += drawOffsetY;\n\n return new Point2D.Double(x, y);\n }", "public void worldToImageCoords(Point2D.Double p, boolean isDistance);", "private Point transform(Point pt1) {\n Point pt2 = new Point(0,0) ;\n pt2.x = pos.x + new Double(pt1.x*Math.cos(heading)+pt1.y*Math.sin(heading)).intValue() ;\n pt2.y = pos.y + new Double(-pt1.x*Math.sin(heading)+pt1.y*Math.cos(heading)).intValue() ;\n return pt2 ;\n }", "Point getPosition();", "Point getPosition();", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "public ArrayList<T> getElements(Point2D point);", "public double getX() { return x; }", "@NonNull\n @Override\n public PointF transformMeteringPoint(@NonNull PointF point) {\n PointF scaled = new PointF();\n scaled.x = -1000F + (point.x / previewSize.getWidth()) * 2000F;\n scaled.y = -1000F + (point.y / previewSize.getHeight()) * 2000F;\n\n // Apply rotation to this point.\n // https://academo.org/demos/rotation-about-point/\n PointF rotated = new PointF();\n double theta = ((double) displayToSensor) * Math.PI / 180;\n rotated.x = (float) (scaled.x * Math.cos(theta) - scaled.y * Math.sin(theta));\n rotated.y = (float) (scaled.x * Math.sin(theta) + scaled.y * Math.cos(theta));\n LOG.i(\"scaled:\", scaled, \"rotated:\", rotated);\n return rotated;\n }", "public Point getPoint(){\n\t\treturn _point;\n\t}", "public int getPoint(){\n return point;\n }", "public int x (int index) { return coords[index][0]; }" ]
[ "0.6228836", "0.6119544", "0.6033387", "0.59543866", "0.58941513", "0.58733135", "0.58713543", "0.58433783", "0.5832582", "0.58314484", "0.5826921", "0.5791038", "0.57896674", "0.5789047", "0.5781657", "0.5775954", "0.5770434", "0.57491773", "0.57491773", "0.57378685", "0.5731514", "0.57251835", "0.57187283", "0.5679089", "0.566361", "0.5659314", "0.5627448", "0.56269467", "0.56109107", "0.5606818", "0.56006175", "0.5582825", "0.5574253", "0.5562141", "0.55555665", "0.5553956", "0.55504334", "0.5544329", "0.5540981", "0.5534496", "0.5534496", "0.55294484", "0.55258626", "0.5514076", "0.5508324", "0.5505179", "0.54929066", "0.54879797", "0.54829174", "0.54790217", "0.54772586", "0.5462846", "0.54594755", "0.545568", "0.545568", "0.545568", "0.545568", "0.545568", "0.545568", "0.545568", "0.545568", "0.545568", "0.545568", "0.545318", "0.544962", "0.5442499", "0.5433546", "0.5428442", "0.5426007", "0.54212075", "0.5409498", "0.54023224", "0.5400317", "0.5395201", "0.5376931", "0.5376226", "0.5370211", "0.5370211", "0.5370211", "0.5370211", "0.5370211", "0.5370211", "0.53690106", "0.53689706", "0.53630877", "0.536057", "0.5356713", "0.5355628", "0.53497493", "0.53463215", "0.5345622", "0.5345477", "0.5345477", "0.53380615", "0.5336606", "0.53363025", "0.532589", "0.53127795", "0.53084767", "0.5306702" ]
0.5684559
23
Paints a information sign centered on the screen
private void paintSign(Graphics g) { point = getPoint(endPoint); int[] maxWH = new int[2]; int x = (FCanvas.canvasWidth - maxWH[0]) >> 1; int y = (FCanvas.canvasHeight - maxWH[1]) >> 1; if (ruteData[RUTE_SOURCE].equals(ruteData[RUTE_DESTINATION])) { auxsb = new StringBuffer("Encontrada baliza de '"); auxsb.append(FInteractionUtils.destinationHotspotName); auxsb.append("'. Llegó a su destino"); //auxsb.append(FInteractionUtils.sourceHotspotName); } else { auxsb = new StringBuffer("Ha llegado a '"); auxsb.append(ruteData[RUTE_DESTINATION]); auxsb.append("' desde '"); //TODO i don't like FMap to FRutePlanner communication if (FRutePlanner.rutes.length - 1 == FRutePlanner.currentRute) { auxsb.append(FInteractionUtils.sourceHotspotName); } else { auxsb.append(ruteData[RUTE_SOURCE]); } auxsb.append("'"); } maxWH = Utils.getWrappedTextWidthHeigh(auxsb.toString(), FCanvas.bigFont, 0, FCanvas.canvasWidth, false, null, y); x = (FCanvas.canvasWidth - maxWH[0]) >> 1; //y = (FCanvas.canvasHeight - maxWH[1]) >> 1; y = 5; g.setColor(Utils.COLOR_TANGO_BUTTER1); g.fillRoundRect(x - 3, y - 3, maxWH[0] + 6, maxWH[1] + 6, 6, 6); g.setColor(Utils.COLOR_TANGO_SKYBLUE1); g.fillRoundRect(x, y, maxWH[0], maxWH[1], 6, 6); g.setColor(Utils.COLOR_TANGO_ALUMINIUM1); Utils.getWrappedTextWidthHeigh(auxsb.toString(), FCanvas.bigFont, x, FCanvas.canvasWidth, true, g, y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawInfoWindow(){\n\n p.pushMatrix();\n p.translate(0,0); // translate whole window if necessary\n\n // display name and show\n p.stroke(0);\n p.strokeWeight(2);\n p.textSize(30);\n p.fill(0);\n p.text(\"Info\",735,35);\n p.rectMode(CORNER);\n p.fill(219, 216, 206);\n p.rect(730,40,550,700);\n p.rectMode(CENTER);\n\n p.fill(0);\n p.pushMatrix();{\n p.translate(740,80);\n p.textSize(15);\n p.text(\"General\",0,-20);\n p.line(-3,-15,150,-15);\n p.text(\"Speed: \" + manipulator.maxSpeed,0,0);\n p.text(\"Angle of rotation for segment_1: \" + p.degrees(manipulator.segment_1_rot),0,20);\n p.text(\"Angle of rotation for segment_2: \" + p.degrees(manipulator.segment_2_rot),0,40);\n\n\n }p.popMatrix();\n\n p.popMatrix();\n\n }", "public void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void info() {\n\t\tSystem.out.println(\"중심 좌표 [ \" + getX() + \", \" + getY() + \" ]\");\n\t\txyInfo(); // Coord클래스의 메서드 호출\n\t\tSystem.out.println(\"반지름 : \" + radius);\n\t}", "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}", "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 void displayCenter(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font of the text\n\t\tgc.setFill(Color.WHITE); //set the color of the text \n\t\tgc.setTextAlign(TextAlignment.CENTER); //set text alignment to center \n\t\tgc.fillText(text, x, y); //draw the text \n\t}", "@Override\n\tprotected void display(Coordination c) {\n\t\tSystem.out.println(\"白棋,颜色是:\" + color + \"位置是:\" + c.getX() + \"--\" + c.getY());\n\t}", "protected void paintLabel(Graphics g, int vNum){\r\n\r\n\t// Label Centering Information\r\n\tint xOffSet, yOffSet;\r\n\tif(vNum > 9) {\r\n\t xOffSet = -6;\r\n\t}\r\n\telse {\r\n\t xOffSet = -3;\r\n\t}\r\n\tyOffSet = 5;\r\n\r\n\tint rise = YCENTER - getYCoor(vNum);\r\n int run = XCENTER - getXCoor(vNum);\r\n\tg.drawString(Integer.toString(vNum), getXCoor(vNum)-(run/4) + xOffSet,\r\n\t\t getYCoor(vNum)-(rise/4) + yOffSet);\r\n }", "public void display() {\n shadow.display();\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }", "public void drawNoticeText(int h){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,15); \r\n g.setColor(Color.red);\r\n g.setFont(font);\r\n String t=\"NOTE: All players cannot be on the same team.\";\r\n g.drawString(t,50,265);\r\n t=\"Use WASD to move.\";\r\n g.drawString(t,50,48); \r\n t=\"Press SPACE on the Start Button to Begin!\";\r\n g.drawString(t,120,h-5); \r\n \r\n font=new Font(\"SanSerif\",Font.BOLD,40); \r\n g.setColor(Color.black);\r\n g.setFont(font); \r\n t=\"Settings\";\r\n g.drawString(t,330,40); \r\n }", "public void displayIcon(Graphics g, int xPos, int yPos){\n\t\t\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}", "public void drawAngleInfo(){\n\t\tfont2.draw(batch, (\"The angle of Projection is \" + angle),(float)(screenWidth * .45), 20);\n\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 }", "protected void paintClock(){\n\t\tdouble clockRadius = Math.min(width, height) * 0.8 * 0.5;\n\t\tdouble centerX = width / 2;\n\t\tdouble centerY = height / 2;\n\t\t//Draw circle \n\t\tCircle circle = new Circle(centerX, centerY, clockRadius);\n\t\tcircle.setFill(Color.WHITE);\n\t\tcircle.setStroke(Color.BLACK);\n\t\t\n\t\tText t1 = new Text(centerX - 5, centerY - clockRadius + 12, \"12\");\n\t\t\n\t}", "void display(DisplayInfo info, Coordinates position, Graphics2D g, ImageObserver io);", "public Info() {\n initComponents();\n setSize(540, 575);\n setLocationRelativeTo(null);\n \n }", "public InfoPanel() {\n setPreferredSize(new Dimension(500, 860));\n }", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\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}", "public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }", "private void draw(){\n\t\t\t Point level = new Point(txtBoard_top_left.x, txtBoard_top_left.y);\n\t\t\t level_info = new TextInfo(g, level, txt_width, size*4, LEVEL, this.level);\n\t\t\t level_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 2nd text info\n\t\t\t Point lines = new Point(level.x, level.y+size*2);\n\t\t\t lines_info = new TextInfo(g, lines, txt_width, size*4, LINES, this.lines);\n\t\t\t lines_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 3rd text info\n\t\t\t Point score = new Point(lines.x, lines.y+size*2);\n\t\t\t score_info = new TextInfo(g, score, txt_width, size*4, SCORE, this.score);\n\t\t\t score_info.drawTextInfo();\t\t\n\t\t}", "public void display()\n {\n if(corner == 1)\n {\n moveTo(new Location(0,0));\n setDirection(135);\n }\n else if(corner == 2)\n {\n moveTo(new Location(0,9));\n setDirection(225);\n }\n else if(corner == 3)\n {\n moveTo(new Location(9,9));\n setDirection(315);\n }\n else if(corner == 4)\n {\n moveTo(new Location(9,0));\n setDirection(45);\n }\n }", "public void drawInfo(Graphics g) {\n if (db == null) return;\n int zVal = zSliceSel == null ? 1 : zSliceSel.getValue();\n int tVal = tSliceSel == null ? 1 : tSliceSel.getValue();\n \n int textGap = 0;\n \n int nSlices = imp.getStackSize();\n \n // ImageStack stack = imp.getStack();\n int currentSlice = imp.getCurrentSlice();\n \n StringBuffer sb = new StringBuffer();\n sb.append(currentSlice);\n sb.append(\"/\");\n sb.append(nSlices);\n sb.append(\"; \");\n if (db.hasZ) {\n sb.append(zString);\n sb.append(\": \");\n sb.append(zVal);\n sb.append(\"/\");\n sb.append(db.numZ);\n sb.append(\"; \");\n }\n if (db.hasT) {\n sb.append(tString);\n sb.append(\": \");\n sb.append(tVal);\n sb.append(\"/\");\n sb.append(db.numT);\n sb.append(\"; \");\n }\n if (db.names != null) {\n String name = db.names[currentSlice - 1];\n if (name != null) {\n sb.append(name);\n sb.append(\"; \");\n }\n }\n \n int width = imp.getWidth(), height = imp.getHeight();\n Calibration cal = imp.getCalibration();\n if (cal.pixelWidth != 1.0 || cal.pixelHeight != 1.0) {\n sb.append(IJ.d2s(width * cal.pixelWidth, 2));\n sb.append(\"x\");\n sb.append(IJ.d2s(height * cal.pixelHeight, 2));\n sb.append(\" \");\n sb.append(cal.getUnits());\n sb.append(\" (\");\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\"); \");\n }\n else {\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\" pixels; \");\n }\n int type = imp.getType();\n int stackSize = imp.getStackSize();\n int size = (width * height * stackSize) / 1048576;\n switch (type) {\n case ImagePlus.GRAY8:\n sb.append(\"8-bit grayscale\");\n break;\n case ImagePlus.GRAY16:\n sb.append(\"16-bit grayscale\");\n size *= 2;\n break;\n case ImagePlus.GRAY32:\n sb.append(\"32-bit grayscale\");\n size *= 4;\n break;\n case ImagePlus.COLOR_256:\n sb.append(\"8-bit color\");\n break;\n case ImagePlus.COLOR_RGB:\n sb.append(\"RGB\");\n size *= 4;\n break;\n }\n sb.append(\"; \");\n sb.append(size);\n sb.append(\"M\");\n \n Insets insets = super.getInsets();\n g.drawString(sb.toString(), 5, insets.top + textGap);\n }", "public void draw() {\n\t\tSystem.out.println(getMessageSource().getMessage(\"greeting2\", null, null));\r\n\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.circle\", null, null));\r\n\t\tSystem.out.println(\"Center's Coordinates: (\" + getCenter().getX() + \", \" + getCenter().getY() + \")\");\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.center\",\r\n\t\t\t\tnew Object[] { getCenter().getX(), getCenter().getY() }, \"Default point coordinates msg\", null));\r\n\t}", "public void mark_icon(Graphics g, int log_num, int x, int y, int h, float track);", "public void update(){\n infoBar = new GreenfootImage (960, 50);\n infoBar.setFont(textFont);\n infoBar.setColor(textColor);\n String output = (\"Trees: \" + numTrees + \" Bushes: \" + numBushes + \" Prey: \" + numPrey + \" Predators: \" + numPredators);\n\n //centres the output on the bar.\n int centre = (960/2) - ((output.length() * 14)/2);\n\n infoBar.drawString(output, centre, 22); //draw the bar.\n this.setImage(infoBar);\n }", "public void display (Graphics2D g, double x, double y);", "public void displayMilitaryIcon(Graphics g, int xPos, int yPos){\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "void drawLabel() {\n\t\tfloat gavityValue = (int) (radius * 100);\n\t\tgavityValue /= 100;\n\t\tString label = \"gravityField \" + id + \"\\n gravity: \" + gavityValue;\n\t\tfloat labelWidth = gg.textWidth(label);\n\t\tfloat textHeight = 8;\n\n\t\tgg.pushMatrix();\n\t\tgg.translate(x, y, radius + textHeight * 3);\n\t\t// rotateZ(-rotZ/2);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.fill(0);\n\t\tgg.rect(-labelWidth / 2 - 2, -textHeight - 1.5f, labelWidth + 4,\n\t\t\t\ttextHeight * 2 + 6);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\n\t\tgg.rotateZ(PI);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\t\tgg.popMatrix();\n\n\t}", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawString(\"(\" + p.x + \", \" + p.y + \")\", p.x, p.y);\n }", "private void paintLandmarkInfo (Graphics g, Landmark l) {\n int oldColor = g.getColor ();\n int width = getWidth ();\n g.setColor (0, 0, 0);\n g.drawRect (0, 0, width - 1, LANDMARK_INFO_HEIGHT - 1);\n g.setColor (0x40, 0x40, 0x80);\n g.fillRect (1, 1, width - 2, LANDMARK_INFO_HEIGHT - 2);\n g.setColor (0xff, 0xff, 0xff);\n g.drawString (l.getName (), 4, 4, Graphics.LEFT | Graphics.TOP);\n g.setColor (oldColor);\n }", "private void drawPin() {\n\t\tString speedShow = df.format(App.speed);\n\t\tint strWidth;\n\n\t\tAffineTransform restore = g2.getTransform();\n\t\tAffineTransform trans = new AffineTransform();\n\t\ttrans.translate(266, 90);\n\t\ttrans.rotate(Math.toRadians(getPinAngle(App.speed)), 40, 165);\n\t\tg2.setTransform(trans);\n\t\tg2.drawImage(speedoPinWhite, 0, 0, this);\n\t\tg2.setTransform(restore);\n\n\t\t// Draw actual speed\n\t\tg2.setFont(new Font(\"Loma\", Font.BOLD, 30));\n\t\tg2.setColor(Color.BLACK);\n\t\tFontMetrics metrics = g2.getFontMetrics();\n\t\tstrWidth = metrics.stringWidth(speedShow);\n\n\t\tg2.drawString(String.valueOf(speedShow), 306 - strWidth / 2, 265);\n\t}", "private void drawCenter(Graphics2D g2d) {\n\t\tint width = size * 3/4;\n\t\tint offset = size / 8 + 5;\n\t\t\n\t\tRectangle2D bounds = new Rectangle2D.Double(offset, offset, width, width);\n\t\tArc2D center = new Arc2D.Double(bounds, 100, 350, Arc2D.PIE);\n\n\t\t// stroke\n\t\tg2d.setPaint(darkGrey);\n\t\tg2d.setStroke(new BasicStroke(5.0f));\n\t\tg2d.draw(center);\n\t\t\n\t\t// fill \n\t\tg2d.setPaint(white);\n\t\tg2d.fill(center);\n\t\t\n\t\t// fix for arc stroke\n\t\tEllipse2D circle = new Ellipse2D.Double(offset, offset, width, width);\n\t\tg2d.setPaint(white);\n\t\tg2d.fill(circle);\n\t}", "public void centerText() {\r\n int theHeight = window.getGraphPanelHeight() / 2;\r\n int theWidth = window.getGraphPanelWidth() / 2;\r\n int writingHeight = textShape.getHeight() / 2;\r\n int writingWidth = textShape.getWidth() / 2;\r\n textShape.setY(theHeight - writingHeight);\r\n textShape.setX(theWidth - writingWidth);\r\n }", "public void recordLocation(){\n\t\tg2d.setColor(Color.blue);\n\t\n int x = (int)(sd.getLocationX() * scale) + width/2;\n int y = (int)(sd.getLocationY() * scale) + height/2;\n g2d.fillRect(x,y,8,8);\n\t\n\t}", "public void display2() { // for drag action -> color change\n stroke (255);\n fill(0,255,255);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void drawCenteredText(String text, int x, int y);", "public static void draw() {\n\t\tStdDraw.clear();\n\t\tStdDraw.text(.5, .90, hint);\n\t\tStdDraw.text(.5, .5, label);\n\t\tStdDraw.text(0.5, 0.3, textBeingEntered);\n\t\tStdDraw.show(0);\n\n\t}", "void display() {\n pushMatrix();\n pushStyle();\n \n translate(_x, _y);\n rotate(_rotVector.heading() - _front);\n if (_flipped) scale(-1, 1);\n imageMode(CENTER);\n image(_img, 0, 0, _w, _h);\n \n popStyle();\n popMatrix();\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}", "public void drawUI() {\n \n stroke(0);\n textSize(titleH/3);\n textAlign(CENTER, CENTER);\n rectMode(CORNER);\n \n noFill();\n rect(titleX, titleY, titleW, titleH);\n image(logo, 0, 0);\n fill(0);\n text(\"EPBox: Ordinering\", titleX, titleY, titleW, titleH-15);\n \n if (!informationSeen) {\n uielement.informationDialog(\"EPBox: Ordinering\", \"Velkommen til EPBox: Ordinering.\\n\\nHvis det er første gang du kører programmet, bedes du gå igennem opsætning af programmet.\\nMangler du hjælp til dette, kan du gå ind på de relevante menuer, eller konsultere brugsanvisningen.\", \"information\");\n informationSeen = true;\n }\n\n uielement.infoHelpBttnSTART(\"Hvis det er første gang du kører programmet, bedes du gå igennem opsætning af programmet.\\nMangler du hjælp til dette, kan du gå ind på de relevante menuer, eller konsultere brugsanvisningen.\");\n\n }", "@Override\n public void drawMarker(PGraphics pg, float x, float y)\n {\n pg.noFill();\n pg.rectMode(CENTER);\n pg.rect(x,y,this.radius*2,this.radius*2,10);\n }", "private void drawBackground() {\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(BACKGROUND_RESOURCE);\r\n\t\tString text = \"Nitro Teleport Waypoints\";\r\n\t\tint posX = (width - SIZE_X) / 2;\r\n\t\tint posY = (height - SIZE_Y) / 2;\r\n\t\tint strWidth = this.fontRendererObj.getStringWidth(text);\r\n\r\n\t\tthis.drawTexturedModalRect(posX, posY, 0, 0, SIZE_X, SIZE_Y);\r\n\t\tthis.drawCenteredString(this.fontRendererObj, text, width / 2, posY - 17, 0xFFFFFF);\r\n\t}", "@Override\n public void display() {\n EasyViewer.beginOverlay();\n \n glColor4d( 0,1,0,alpha.getValue() );\n glLineWidth(2); \n glBegin( GL_LINE_STRIP );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100 +i*i );\n }\n glEnd();\n \n glColor4d( 1,0,0,alpha.getValue() );\n glPointSize(5);\n glBegin( GL_POINTS );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100+i*i );\n } \n glEnd();\n \n \n // lets draw some 2D text\n// glColor4d( 1,1,1,1 ); \n// EasyViewer.printTextLines( \"(100,100)\", 100, 100, 12, GLUT.BITMAP_HELVETICA_10 );\n// glRasterPos2d( 200, 200 );\n// EasyViewer.printTextLines( \"(200,200)\\ncan have a second line of text\", 200, 200, 12, GLUT.BITMAP_HELVETICA_10 );\n \n EasyViewer.endOverlay();\n \n }", "public void drawInstructions(Graphics art)\n\t{\n\t\tart.setColor(Color.green);\n\t\tart.setFont(newFont3);\n\t\tart.drawString(\"The goal of this game is to pop 20 balloons as fast as you can.\", 100, 100);\n\t\tart.drawString(\"A timer will be counting to see how fast you are.\", 150, 200);\n\t\tart.drawString(\"Click on the balloon that matches the color of the ballon in the upper right corner.\",5,300);\n\t\tart.drawString(\"If you click on the right one, your score will go up.\", 100, 400);\n\t\tart.drawString(\"If you click on the wrong one, your score will go down.\", 100, 500);\n\t\tart.drawString(\"Press B to go back\", 300, 600);\n\t\t\n\t}", "public void renderAboutManager()\n {\n background(background);\n t = millis();\n t /= 200.0f;\n shift = -150;\n //imageMode(CENTER);\n image(createdBy,width/2-createdBy.width/2+40,20);\n //image(info,width/2-info.width/2+40,450);\n for(int i = 0; i < img.length; i++)\n {\n image(img[i],width/2+shift,height/5+sin(t-i*0.4f-1)*4);\n shift += img[i].width;\n }\n imageMode(CORNERS);\n }", "public void display() {\n\t\tapplet.image(applet.loadImage(\"/keypad.png\"), 22,410);\n\t\t// TODO Auto-generated method stub\n\n\t}", "public About() {\n \n Toolkit tk = Toolkit.getDefaultToolkit();\n Dimension screen = tk.getScreenSize();\n int x = Math.max(0, (screen.width - this.getWidth()) / 2);\n int y = Math.max(0, (screen.height -this.getHeight()) / 2);\n this.setLocation(x-230, y-230);\n \n initComponents();\n }", "public void homeScreen(Graphics art)\n\t{\n\t\t\n\t\tart.setColor(Color.pink);\n\t\tart.setFont(newFont);\n\t\tart.drawString(\"Balloon Pop\", 200, 200);\n\t\tart.setFont(newFont2);\n\t\tart.drawString(\"Press Z for instructions\", 100, 325);\n\t\tart.drawString(\"Hit the spacebar to start\", 100, 450);\n\t\t\n\t}", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "public void paintComponent(Graphics page) {\r\n super.paintComponent(page);\r\n IMAGE.paintIcon(this, page, x, y);\r\n }", "public void act() \n {\n setImage(new GreenfootImage(\"== Total Pembayaran ==\",50,Color.yellow,Color.black));\n }", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tint width = getWidth();\n\t\t\tint height = getHeight();\n\t\t\tint x = (width - icon.getIconWidth()) / 2;\n\t\t\tint y = icon.getIconHeight() / 2;\n\t\t\tg.setColor(Color.darkGray);\n\t\t\tg.fillRect(0, 0, width, height);\n\t\t\ticon.paintIcon(this, g, x, y);\n\t\t}", "public void show(int c) {\n noFill();\n stroke(255, c, 0);\n strokeWeight(5);\n ellipse(x, y, size, size);\n \n }", "public void help()\r\n {\r\n \tJFrame insScr=new JFrame(\"Instructions\");\r\n \tJLabel instructions=new JLabel(new ImageIcon(getClass().getResource(\"Instructions.png\")));\r\n \t\r\n insScr.add(instructions);\r\n insScr.setSize(900,600);\r\n insScr.setVisible(true);\r\n \r\n Dimension screenLoc=Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tinsScr.setLocation(screenLoc.width/2-insScr.getSize().width/2, screenLoc.height/2-insScr.getSize().height/2);\r\n \r\n }", "public void displayInfo(String info){\n infoWindow.getContentTable().clearChildren();\n Label infoLabel = new Label(info, infoWindow.getSkin(), \"dialog\");\n infoLabel.setWrap(true);\n infoLabel.setAlignment(Align.center);\n infoWindow.getContentTable().add(infoLabel).width(500);\n infoWindow.show(guiStage);\n }", "public void display() {\t\t\n\t\tparent.pushStyle();\n\t\t\n\t\t//parent.noStroke();\n\t\t//parent.fill(255);\n\t\tparent.noFill();\n\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\tnodeSpin.drawNode(pos.x, pos.y, diam);\n\t\t\n\t\t//This should match what happens in the hover animation\n\t\tif (focused && userId >= 0) {\n\t\t\tparent.fill(Sequencer.colors[userId]);\n\t\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\t}\n\t\t\n\t\trunAnimations();\n\t\t\n\t\tparent.popStyle();\n\t}", "public static void drawCardInfo(Graphics g, Card c, int y) {\n\t\tg.drawImage(cardHelp, 4, y + 35);\n\t\tif (c != null) {\n\t\t\tint x = 150;\n\t\t\tc.drawCard(g, 10, y + 25, 1);\n\t\t\tString[] info = c.getInfo();\n\t\t\tString name = info[0];\n\t\t\ty += 75;\n\t\t\tg.setFontSize(26);\n\t\t\tg.drawString(\"Name: \" + name, x, (y));\n\t\t\t\n\t\t\tg.setFontSize(MenuValues.MENU_FONT_SIZE);\n\t\t\ty += 32;\n\t\t\tg.drawString(info[1], x + 20, y);\n\t\t\ty += 27;\n\t\t\tg.drawString(info[2], x + 20, y);\n\t\t\ty += 27;\n\t\t\tg.drawString(info[3], x + 20, y);\n\t\t\ty += 32;\n\t\t\t\n\t\t\tinfo = c.getVeryShortInfo();\n\t\t\tg.setFontSize(20);\n\t\t\tg.drawString(\"Effect: \" + info[0] + info[1], x, y);\n\t\t}\n\t}", "public void showInfo(){\n DisplayMetrics displaymetrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);\n int height = displaymetrics.heightPixels;\n int width = displaymetrics.widthPixels;\n int colorDep = getWindowManager().getDefaultDisplay().getPixelFormat();\n //String android_id = Secure.getString(this.getContentResolver(), Secure.ANDROID_ID);\n TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);\n\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String now = df.format(c.getTime());\n\n String text = \"手机分辨率是:\"+width+\"*\"+height+\" 手机色深是:\"+colorDep+\" IMEI是:\"+telephonyManager.getDeviceId()+\" Time: \"+now;\n Toast.makeText(getApplicationContext(),text,Toast.LENGTH_SHORT).show();\n }", "private void displayMessage(String info) {\n \tif (message == null) {\n \t\tsetupMessage();\n \t}\n \tmessage.setLabel(info);\n\t\tadd(message, 6, 15);\n }", "public void displayseat() {\n\t\tString occ;\n\t\tif (this.isOccupied()) {\n\t\t\tocc = ANSI_RED+\"XX\"+ANSI_RESET+\"..\"+ANSI_RED+\"XX\"+ANSI_RESET;\n\t\t}\n\t\telse if (this.isReserved()){\n\t\t\tocc = ANSI_GREEN+\"ME\"+ANSI_RESET+\"..\"+ANSI_GREEN+\"ME\"+ANSI_RESET;\n\t\t}\n\t\telse {\n\t\t\tocc = ANSI_BLUE+\"__\"+ANSI_RESET+\"..\"+ANSI_BLUE+\"__\"+ANSI_RESET;\n\t\t}\n\t\tSystem.out.print(\"[\" + occ + \"]\");\n\t}", "public void display() {\n System.out.println(\"显示浅蓝色文本框\");\n }", "private void drawCore(Graphics2D g2d) {\r\n icon.paintIcon(g2d, layout.location.x - icon.getIconWidth() / 2, layout.location.y - icon.getIconHeight() / 2,\r\n g2d.getColor());\r\n labelBox.draw(g2d);\r\n }", "private void showDraw() {\n StdDraw.show(0);\n // reset the pen radius\n StdDraw.setPenRadius();\n }", "@Override\r\n public void paint(Graphics g) {\r\n super.paint(g);\r\n Letter letter = new Letter(\"C\", getPosition());\r\n letter.paint(g);\r\n }", "private void drawCenteredString(String text, float x, float y, int color)\n {\n this.getFontRenderer().drawStringWithShadow(text, (x - this.getFontRenderer().getStringWidth(text) / 2), y, color);\n }", "public void paint(Graphics g) {\n\t\tg.drawLine(0,((int)getWidth() / 3), Center, 20);\n\t\tg.drawLine(Center, 20, getWidth(), (int)(getWidth()/3));\n\t\t\n\t\t//Draw empty lights\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillOval(Center-40, 80, 75, 75);\n\t\tg.fillOval(Center-40, 170, 75, 75);\n\t\tg.fillOval(Center-40, 260, 75, 75);\n\t\t\n\t\tif(NSig == true)\n\t\t\tNormalSig(g);\n\t\telse if(SSig == true)\n\t\t\tStopSig(g);\n\t\telse if(CSig == true)\n\t\t\tCautionSig(g);\n\t\telse if(RSig == true)\n\t\t\tRightSig(g);\n\t\telse if(reset == true)\n\t\t\tReset(g);\n }", "@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}", "private void diplay() {\n\t\tSystem.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp\n\t\t\t\t+ PRESSURE_CONSTANT + pressure));\n\n\t}", "@Override\n\tpublic String drawForConsole() {\n\t\tString[][] output = new String[this.getWidth()][this.getHeight()];\n\t\tString image = \"\";\n\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\t\tif (x == 0 || x == this.getWidth() - 1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (y == 0 || y == this.getHeight() -1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (this.isFilledIn()) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else {\n\t\t\t\t\toutput[x][y] = \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\t\timage += output[x][y];\n\t\t\t\tif (x == this.getWidth() - 1) {\n\t\t\t\t\timage += \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn image;\n\t}", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "private void drawSegmentMarker(GL2 gl, GLU glu, float fXPosition, float fYPosition) {\n\t\tgl.glColor4fv(RadialHierarchyRenderStyle.LABEL_TEXT_COLOR, 0);\n\t\tgl.glPushMatrix();\n\t\tgl.glTranslatef(fXPosition, fYPosition, 0);\n\t\tGLPrimitives.renderCircle(glu, MARKER_RADIUS, 10);\n\t\tGLPrimitives.renderCircleBorder(gl, glu, MARKER_RADIUS, 10, 2);\n\t\tgl.glPopMatrix();\n\t}", "public void drawInfo(Node current, Graphics g) {\r\n\t\tg.setFont(Style.nums);\r\n\t\tg.setColor(Color.black);\r\n\t\tg.drawString(Integer.toString(current.getFCost()), current.getX() + 3, current.getY() + 11);\r\n\t\tg.setFont(Style.smallNums);\r\n\t\tg.drawString(Integer.toString(current.getGCost()), current.getX() + 3, current.getY() + 22);\r\n\t}", "@Override\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\n\t\t\tif (this.getPassword().length == 0) {\n\t\t\t\tint h = getHeight();\n\t\t\t\t((Graphics2D) g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n\t\t\t\t\t\tRenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\t\t\t\tInsets ins = getInsets();\n\t\t\t\tFontMetrics fm = g.getFontMetrics();\n\t\t\t\tint c0 = getBackground().getRGB();\n\t\t\t\tint c1 = getForeground().getRGB();\n\t\t\t\tint m = 0xfefefefe;\n\t\t\t\tint c2 = ((c0 & m) >>> 1) + ((c1 & m) >>> 1);\n\t\t\t\tg.setColor(new Color(c2, true));\n\t\t\t\tg.drawString(hint_, ins.left, h / 2 + fm.getAscent() / 2 - 2);\n\t\t\t}\n\t\t}", "public void displayNavyIcon(Graphics g, int xPos, int yPos){\n\t\t\n\t}", "public abstract void displayInfo();", "private void showInfoLabel(Skin skin, String info) {\r\n Label infoLabel = new Label(I18n.t(info), skin);\r\n messageTable.add(infoLabel).colspan(3);\r\n messageTable.row();\r\n }", "void drawMancalaShape(Graphics g, int x, int y, int width, int height, int stoneNum, String pitLabel);", "public void print() {\n System.out.print(\"\\033[H\\033[2J\");\n for(int y = 0; y < this.height; y++) {\n for (int x = 0; x < this.width; x++) {\n ColoredCharacter character = characterLocations.get(new Coordinate(x , y));\n if (character == null) {\n System.out.print(\" \");\n } else {\n System.out.print(character);\n }\n }\n System.out.print(\"\\n\");\n }\n }", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tint size, x, y;\n\t\tif (this.getHeight() < this.getWidth()) {\n\t\t\tsize = (int) (this.getHeight() / 1.5);\n\t\t} else {\n\t\t\tsize = (int) (this.getWidth() / 1.5);\n\t\t}\n\t\tx = (int) ((this.getWidth() / 2.0) - size / 2.0);\n\t\ty = (int) ((this.getHeight() / 2.0) - size / 2.0);\n\t\tint eyesize = (int) (size / 8.0);\n\t\tint eyex = (int) (x + size * 0.3 - eyesize / 2.0);\n\t\tint eyey = (int) (y + size * 0.4 - eyesize / 2.0);\n\t\tint eyex2 = (int) (x + size * 0.7 - eyesize / 2.0);\n\t\tint[] xpoints = {x, x + size, (int) (x + size / 2.0)};\n\t\tint[] ypoints = {(int) (y + size / 5.0), (int) (y + size / 5.0),\n\t\t\t\t(int) (y - size / 10.0)};\n\t\tPolygon hat = new Polygon(xpoints, ypoints, 3);\n\t\t\n\t\tif (zustand >0) {\n\t\t\tg.setColor(Color.GREEN);\n\t\t\tg.fillOval(x, y, size, size);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.fillOval(eyex, eyey, eyesize, eyesize);\n\t\t\tg.fillOval(eyex2, eyey, eyesize, eyesize);\n\t\t\tg.fillPolygon(hat);\n\t\t\tg.fillArc((int) (x + size / 5.0), (int) (y + size * 0.5),\n\t\t\t\t\t(int) (size * 0.6), (int) (size * 0.4), 0, -180);\n\t\t} else if (zustand == 0) {\n\t\t\tg.setColor(Color.YELLOW);\n\t\t\tg.fillOval(x, y, size, size);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.fillOval(eyex, eyey, eyesize, eyesize);\n\t\t\tg.fillOval(eyex2, eyey, eyesize, eyesize);\n\t\t\tg.fillPolygon(hat);\n\t\t\tg.fillRect(eyex, (int) (y + size * 0.75), eyex2 + eyesize - eyex,\n\t\t\t\t\t(int) (eyesize / 2.0));\n\t\t} else {\n\t\t\tg.setColor(Color.RED);\n\t\t\tg.fillOval(x, y, size, size);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.fillOval(eyex, eyey, eyesize, eyesize);\n\t\t\tg.fillOval(eyex2, eyey, eyesize, eyesize);\n\t\t\tg.fillPolygon(hat);\n\t\t\tg.fillArc((int) (x + size / 5.0), (int) (y + size * 0.6),\n\t\t\t\t\t(int) (size * 0.6), (int) (size * 0.4), 0, 180);\n\t\t}\n\t}", "public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\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\n\tpublic void render() {\n\t\tif (this.hidden) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper.render();\n\n\t\tthis.font.draw(Graphics.batch, this.label, this.getX(),\n\t\t\tthis.getY() + (this.getHeight() - this.font.getLineHeight()) / 2);\n\t}", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.red);\n\t\t\tg.fillRoundRect(30, 30, 240, 140, 30, 30);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.setFont(new Font(\"Monospaced\", Font.BOLD, 48));\n\t\t\tg.drawString(\"Hallo! Was wenn ich mehr Text habe?\", 65, 110);\n\t\t}", "@Override\n public void paint(Graphics g, ImageObserver observer) {\n if (font != null)\n g.setFont(font);\n g.setColor(color);\n g.drawString(lName + \": \" + value, x, y);\n }", "public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }", "@Override\n public void draw(WinPlotterFX plotter) {\n super.draw(plotter);\n plotter.printAt(x + (base / 3.2), y + (height / 3), name);\n }", "public void paintComponent( Graphics g )\n\t\t{\n\t\t\tsuper.paintComponent( g );\n\t\t\t\n\t\t\tg.drawRect(0, 0, 29, 29); // draw square\n\t\t\tg.drawString( mark, 11, 20); // draw mark\n\t\t}", "private void drawAgentInfo(Graphics2D graphics, int x, int y,\n int width, int height, Insets borders)\n {\n final int verticalSpaceBeforeText = 20;\n // Find the size of string in the font being used by the current\n // Graphics2D context.\n FontMetrics font = graphics.getFontMetrics();\n String agentInfo = null;\n int textWidth = 0;\n int textHeight = 0;\n int totalTextHeight = 0;\n int maxTextWidth = 0;\n\n if (GRID_LEGEND_HORIZONTAL) {\n agentInfo = \"Infected: \" + simulation.getNumInfectedHumans() +\n \" \" +\n \"Uninfected: \" + simulation.getNumUninfectedAgents() +\n \" \" +\n \"Infested: \" + simulation.getNumInfestedHosts() +\n \" \" +\n \"Uninfested: \" + simulation.getNumUninfestedHosts() +\n \" \" +\n \"Treated: \" + simulation.getNumTreatedAgents();\n \n Rectangle2D rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight = textHeight;\n maxTextWidth = textWidth;\n int startStringAt = (width - textWidth) / 2;\n\n // center text horizontally (max sure left side at least draws w/in\n // the viewport window -- i.e., x at least 0)\n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + verticalSpaceBeforeText);\n\n } else {\n agentInfo = \"Infected: \" + simulation.getNumInfectedHumans();\n Rectangle2D rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight = textHeight;\n maxTextWidth = textWidth;\n \n int startStringAt = (width - textWidth) / 2;\n\n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n \n agentInfo = \"Uninfected: \" + simulation.getNumUninfectedAgents();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n\n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n \n agentInfo = \"Infested: \" + simulation.getNumInfestedHosts();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n \n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n \n agentInfo = \"Uninfested: \" + simulation.getNumUninfestedHosts();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n \n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n agentInfo = \"Treated: \" + simulation.getNumTreatedAgents();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n \n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n }\n\n // Make sure the image plus text (which may be a new one loaded in) is\n // visible in the scroll pane. If this isn't somewhere, scrollbars \n // won't work in the main screen's encompassing JScrollPane.\n setPreferredSize(\n new Dimension(\n Math.max(width + borders.left + borders.right, maxTextWidth + 10),\n height + borders.top + borders.bottom \n + verticalSpaceBeforeText + totalTextHeight + 10));\n\n }", "@Override\n public void draw( Graphics g )\n {\n g.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\n g.setColor( Color.BLUE );\n g.fillOval( baseX, baseY, myWidth, myHeight );\n g.setColor( Color.BLACK );\n g.drawString( card, baseX + 7, baseY + 20 ); }", "public static void showGameInformation(InformationStorage informationStorage) {\r\n\t\tshowTime(OFFSET_LEFT, LINE_HEIGHT);\r\n\t\tshowAPM(OFFSET_LEFT, LINE_HEIGHT * 2);\r\n\t\tshowFPS(OFFSET_LEFT, LINE_HEIGHT * 3);\r\n\r\n\t\tif (informationStorage.getiDisplayConfig().enableDisplayMapContendedTilePositions()) {\r\n\t\t\tshowContendedTilePositions(informationStorage.getMapInfo().getTilePositionContenders());\r\n\t\t}\r\n\t\tif (informationStorage.getiDisplayConfig().enableDisplayMapBoundaries()) {\r\n\t\t\tshowBoundaries(informationStorage.getMapInfo().getMapBoundaries());\r\n\t\t}\r\n\t\tif (informationStorage.getiDisplayConfig().enableDisplayReservedSpacePolygons()) {\r\n\t\t\tshowReservedSpacePolygons(informationStorage.getMapInfo().getReservedSpace());\r\n\t\t}\r\n\t\tif (informationStorage.getiDisplayConfig().enableDisplayMineralBlockedChokePoints()) {\r\n\t\t\tshowMineralBlockedChokePoints(informationStorage.getMapInfo().getMineralBlockedChokePoints());\r\n\t\t}\r\n\t\tif (informationStorage.getiDisplayConfig().enableDisplayBreadthAccessOrder()) {\r\n\t\t\tshowBreadthAccessOrder(informationStorage.getMapInfo().getRegionAccessOrder());\r\n\t\t}\r\n\t}", "public void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\r\n\t\t// Get current date object\r\n\t\tDate now = new Date();\r\n\r\n\t\t// Format the time string.\r\n\t\tString date_out = fDateFormat.format(now);\r\n\r\n\t\t// Use our choice for the font.\r\n\t\tg.setFont(fFont);\r\n\r\n\t\t// Do the size and placement calculations only for the\r\n\t\t// first paint (assumes the applet window is never resized.)\r\n\t\tif (fFirstPass) {\r\n\r\n\t\t\t// Get measures needed to center the message\r\n\t\t\tFontMetrics fm = g.getFontMetrics();\r\n\r\n\t\t\t// How many pixels wide is the string\r\n\t\t\tint msg_width = fm.stringWidth(date_out);\r\n\r\n\t\t\t// Use the string width to find the starting point\r\n\t\t\tfMsgX = getSize().width / 2 - msg_width / 2;\r\n\r\n\t\t\t// How far above the baseline can the font go?\r\n\t\t\tint ascent = fm.getMaxAscent();\r\n\r\n\t\t\t// How far below the baseline?\r\n\t\t\tint descent = fm.getMaxDescent();\r\n\r\n\t\t\t// Use the vertical height of this font to find\r\n\t\t\t// the vertical starting coordinate\r\n\t\t\tfMsgY = getSize().height / 2 - descent / 2 + ascent / 2;\r\n\t\t}\r\n\t\tg.drawString(date_out, fMsgX, fMsgY);\r\n\t\tfFirstPass = false;\r\n\t}", "public void drawImageCentered(float x, float y, float width, float height);", "@Override\r\n public void paintComponent(Graphics g) {\r\n super.paintComponent(g); g.setColor(Color.ORANGE);\r\n if (drawCirc == 0) {\r\n \tg.fillOval(txtLft,txtTop,txtWidth,txtHeight);\r\n }\r\n }", "private void drawXYZText() {\n\t\t//Draw text X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"X\");\n\t\tgl.glEnd();\n\t\t//Draw text -X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(-1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-X\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Y\");\n\t\tgl.glEnd();\n\t\t//Draw text -Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,-1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Y\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Z\");\n\t\tgl.glEnd();\n\t\t//Draw text -Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,-1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Z\");\n\t\tgl.glEnd();\n\t}" ]
[ "0.7030646", "0.6878804", "0.6638403", "0.63318765", "0.62237734", "0.6213491", "0.62102765", "0.61943406", "0.61793494", "0.6127409", "0.61236733", "0.608834", "0.60737824", "0.6069579", "0.6055024", "0.60192657", "0.5980172", "0.59705883", "0.59553826", "0.5931985", "0.5919457", "0.59008396", "0.58975345", "0.589181", "0.5882525", "0.5850819", "0.58477", "0.5846452", "0.584189", "0.5841109", "0.58378655", "0.58267754", "0.5783445", "0.57821435", "0.578166", "0.57805073", "0.5768968", "0.5755067", "0.57489264", "0.57416123", "0.57358295", "0.5734833", "0.57258475", "0.57195157", "0.5716627", "0.5681289", "0.5674581", "0.56742823", "0.56505", "0.564104", "0.5640609", "0.562281", "0.56195474", "0.561807", "0.56062853", "0.56032145", "0.5602551", "0.5597048", "0.5587801", "0.55750304", "0.55684775", "0.55679727", "0.55660325", "0.55621934", "0.5561522", "0.5548533", "0.55449903", "0.55352867", "0.5530363", "0.55201346", "0.5519125", "0.551909", "0.5507765", "0.55073875", "0.5490077", "0.5487325", "0.5480348", "0.5480135", "0.5479924", "0.54719573", "0.54676545", "0.5460485", "0.5455405", "0.54552275", "0.54511136", "0.5449604", "0.5448651", "0.5443077", "0.54359806", "0.5431709", "0.5425162", "0.5423888", "0.542378", "0.54174006", "0.54155827", "0.54154813", "0.54103565", "0.54102516", "0.54054815", "0.5403342" ]
0.5654397
48
Paints the hotspot name
private void paintHotspotName(Graphics g, String name, int attPoint) { point = getPoint(attPoint); int[] maxWH = new int[2]; int x = point[0] + currMatrixX + transformCoordenate(mapPos, X_COORD); int y = point[1] + currMatrixY + transformCoordenate(mapPos, Y_COORD); maxWH = Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont, x, FCanvas.canvasWidth, false, null, y); //draw a point attached to name g.setColor(Utils.COLOR_TANGO_BUTTER1); g.fillRoundRect(x - 6, y - 6, 12, 12, 6, 6); g.setColor(Utils.COLOR_TANGO_SCARLETRED1); g.fillRoundRect(x - 3, y - 3, 6, 6, 3, 3); //check canvas limits and recalculate if needed if (FCanvas.canvasWidth < x + maxWH[0]) { x = x - maxWH[0]; maxWH = Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont, x, FCanvas.canvasWidth, false, null, y); } if (FCanvas.canvasHeight < y + maxWH[1]) { y = y - maxWH[1]; maxWH = Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont, x, FCanvas.canvasWidth, false, null, y); } g.setColor(Utils.COLOR_TANGO_SKYBLUE1); g.fillRoundRect(x - 3, y - 3, maxWH[0] + 3, maxWH[1] + 3, 3, 3); //Utils.fillRoundRect(g, x - 3, y - 3, maxWH[0] + 3, maxWH[1] + 3, Utils.COLOR_TANGO_SKYBLUE1, 0xAA); g.setColor(Utils.COLOR_TANGO_ALUMINIUM1); Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont, x, FCanvas.canvasWidth, true, g, y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tString name = d.getName(e.getX(),e.getY());\r\n\t\t\t\tGraphics g = w.getGraphics();\r\n\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\tg.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\t\t\tg.drawString(name, e.getX(), e.getY());\r\n\t\t\t}", "@Override\n\tpublic void paintLabel(Graphics g) {\n\t\tGraphics2D g2d = (Graphics2D) g;\n\t\tg2d.drawString(\"Oval\",x,y+65);\n\t}", "private void drawNameBox(Graphics g,int x,int y) {\n\t\tFontMetrics metrics = g.getFontMetrics(g.getFont());\n\t\t// get the height of a line of text in this\n\t\t// font and render context\n\t\tint hgt = metrics.getHeight();\n\t\t// get the advance of my text in this font\n\t\t// and render context\n\t\tint adv = metrics.stringWidth(name);\n\t\t// calculate the size of a box to hold the\n\t\t// text with some padding.\n\t\tColor c = g.getColor();\n\t\tg.setColor(new Color(1f, 1f, 1f, NAME_COVER_ALPHA));\n\t\tg.fillRect(x+NAME_OFFSET_X-1, y+NAME_OFFSET_Y-hgt-1, adv+2, hgt+2);\n\t\tg.setColor(c);\n\t}", "private void writePlacemarkerStyle(String name, String url, int x, int y) {\n printWriter.println(\"<Style id=\\\"\" + name + \"\\\"><IconStyle>\");\n printWriter.println(\"<scale>1.3</scale>\");\n printWriter.println(\"<Icon><href>\" + url + \"</href></Icon>\");\n printWriter.println(\n \"<hotSpot x=\\\"\" + x + \"\\\" y=\\\"\" + y + \"\\\" xunits=\\\"pixels\\\" yunits=\\\"pixels\\\"/>\");\n printWriter.println(\"</IconStyle></Style>\");\n }", "private void displayName(String name) {\n\t\tGLabel profileName = new GLabel(name);\n\t\tprofileName.setFont(PROFILE_NAME_FONT);\n\t\tprofileName.setColor(Color.BLUE);\n\t\tadd(profileName, LEFT_MARGIN, TOP_MARGIN + profileName.getHeight());\n\t\tnameY = profileName.getY();\n\t}", "public void titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}", "protected void drawTitle(){\n titleBox = new Rectangle(155,380, 490, 200);\n titleBorder = new Rectangle(150, 375, 500, 210);\n titleBorder.setFillColor(pink);\n titleBorder.setFilled(true);\n titleBox.setFillColor(Color.BLACK);\n titleBox.setFilled(true);\n title = new Image(206, 400, \"124-hw4/BreakoutText/breakoutText.png\");\n\n canvas.add(titleBorder);\n canvas.add(titleBox);\n canvas.add(title);\n }", "public void draw(Graphics g){\n g.setColor (colour);\n g.fillOval (x,y,DIAMETER, DIAMETER);\n g.setColor (Color.black);\n g.drawString(name, x+5, y+30);\n g.setFont (new Font (\"Times New Roman\", Font.PLAIN, 16) );\n g.setColor (Color.black);\n g.drawString (Integer.toString(seatNum), x+13 ,y+18) ;\n \n \n \n \n \n \n }", "@Override\n public void paint(Graphics g) {\n g.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 200));\n\n g.setColor(Color.cyan);\n String GameName = \"BALLAND BAR\";\n int x_pos = 150;\n int y_pos = 300;\n int alpha = 8;\n for (int i = 0; i < GameName.length(); i++) {\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n\n g.setColor(Color.orange);\n GameName = \"GAME\";\n x_pos = 700;\n y_pos = 550;\n for (int i = 0; i < GameName.length(); i++) {\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n /*\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"G\", 650, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"A\", 800, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"M\", 950, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"E\", 1150, 300);\n\n g.setColor(Color.cyan);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"N\", 650, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"A\", 800, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"M\", 950, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"E\", 1150, 500);\n */\n }", "private void drawOneNameOnCanvas(NameSurferEntry entry, Color color) {\r\n\t\tdouble width = this.getWidth();\r\n\t\tdouble height = this.getHeight();\r\n\t\t\r\n\t\tString name = entry.getName();\r\n\t\tfor(int i = 0; i< NDECADES-1; i++) {\r\n\t\t\tint leftRank = entry.getRank(i);\r\n\t\t\tdouble[] leftCoordinate = rankToCoordinate(i, leftRank, width, height);\r\n\t\t\t\r\n\t\t\tint rightRank = entry.getRank(i+1);\r\n\t\t\tdouble[] rightCoordinate = rankToCoordinate(i+1, rightRank, width, height);\r\n\t\t\t\r\n\t\t\tdrawNameLabel(leftRank, name, leftCoordinate, color, rightCoordinate);\r\n\t\t\tdrawNameCircle(leftCoordinate, color);\r\n\t\t\tdrawConnectLine(leftCoordinate, rightCoordinate, color);\r\n\t\t}\r\n\t\t\r\n\t\tint lastRank = entry.getRank(NDECADES-1);\r\n\t\tdouble[] lastCoordinate = rankToCoordinate(NDECADES-1, lastRank, width, height);\r\n\t\tdrawNameLabel(lastRank, name, lastCoordinate, color, null);\r\n\t}", "void drawLabel(){\n FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal(\"Rubik-Regular.ttf\"));\n FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();\n parameter.size = 25;\n parameter.color = Color.BLACK;\n BitmapFont font2 = generator.generateFont(parameter);\n\n font2.getData().setScale(FONT_SCALE);\n\n font2.draw(game.getBatch(), \"Please insert the IP Address\\n you see on you partner's screen\", 50, 600);\n }", "public void title(){\n textFont(select,30);\n fill(150);\n text(\"PLANE SELECT\",482,72);\n fill(0);\n text(\"PLANE SELECT\",480,70);\n}", "public void drawPlayerNames(Graphics g) {\n\t}", "@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)\n {\n this.fontRenderer.drawString(this.toolboxInv.getDisplayName().getUnformattedText(), 8, 6, 4210752);\n this.fontRenderer.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752);\n }", "private void drawLabel(int entryNum, GPoint point, int rank) {\n\t\tString typed = (entries.get(entryNum)).toString();\n\t\tString name = (entries.get(entryNum)).getName(typed) + \" \";\n\t\t\n\t\tif (point.getY() == getHeight() - GRAPH_MARGIN_SIZE) {\n\t\t\tname += \"*\";\n\t\t} else name += Integer.toString(rank);\n\t\t\n\t\tGLabel label = new GLabel(name);\n\t\tlabel.setColor(getColor(entryNum));\n\t\tadd(label, point.getX(), point.getY());\n\t}", "@Override\n\tpublic void draw(FontRenderer fontRenderer, int x, int y, int backgroundColor, int foregroundColor) {\n\t\tfontRenderer.drawString(this.displayName, x, y, foregroundColor);\n\t}", "private void drawFloorName(Graphics page){\r\n\t\tint iHeightOffSet = 3;\r\n\t\t\r\n\t\tint iSingleDigitOffSet = 15;\r\n\t\tint iDoubleDigitOffSet = 18;\r\n\t\t\r\n\t\tif(iFloorNumber + 1 < 10){\r\n\t\t\tpage.drawString(Integer.toString(iFloorNumber + 1), xStart - iSingleDigitOffSet, this.ypoints[0] - iHeightOffSet);\r\n\t\t}else{\r\n\t\t\tpage.drawString(Integer.toString(iFloorNumber + 1), xStart - iDoubleDigitOffSet, this.ypoints[0] - iHeightOffSet);\r\n\t\t}\r\n\t}", "@Override\n protected void paintForeground(Graphics2D g) {\n\n int fontSize = 40;\n\n g.setFont(new Font(\"TimesRoman\", Font.PLAIN, fontSize));\n g.setColor(Color.black);\n g.drawString(\"Points:\" + rat.getFoodCount(), 0, 40);\n\n }", "abstract public char drawGadget(Vect position);", "@Override\n protected void drawGuiContainerForegroundLayer(int par1, int par2) {\n super.drawGuiContainerForegroundLayer(par1, par2);\n this.fontRendererObj.drawString(StatCollector.translateToLocal(\"gui.Extracter.name\"), 65, 6, 4210752);\n this.fontRendererObj.drawString(StatCollector.translateToLocal(\"container.inventory\"), 8, this.ySize - 96 + 2, 4210752);\n }", "protected void drawGuiContainerForegroundLayer(int par1, int par2)\n {\n super.fontRenderer.drawString(this.name, (super.xSize - super.fontRenderer.getStringWidth(this.name)) / 2, 6, 4210752);\n super.fontRenderer.drawString(this.inv, 8, super.ySize - 96 + 2, 4210752);\n }", "@Override\n public void mouseMoved(final MouseEvent me)\n {\n \tif(!om.equals(\"hotspot_interaction\") && !om.equals(\"figure_placement_interaction\"))\n \t{\n\t \tfor(int i=hotspots.size()-1; i > -1; --i)\n\t \t\tif(hotspots.elementAt(i).inside(me.getPoint()))\n\t \t\t\thotspots.elementAt(i).setHighlighted(true);\n\t \t\telse\n\t \t\t\thotspots.elementAt(i).setHighlighted(false);\n \t}\n\n \tdrawHSLabel = null;\n \tif (!om.equals(\"figure_placement_interaction\")) {\n \tfor(int i=hotspots.size()-1; i > -1; --i)\n \t\tif(hotspots.elementAt(i).inside(me.getPoint()))\n \t\t\tthis.drawHSLabel = hotspots.elementAt(i);\n \t}\n \tmpos = me.getPoint();\n \trepaint();\n }", "public void displayseat() {\n\t\tString occ;\n\t\tif (this.isOccupied()) {\n\t\t\tocc = ANSI_RED+\"XX\"+ANSI_RESET+\"..\"+ANSI_RED+\"XX\"+ANSI_RESET;\n\t\t}\n\t\telse if (this.isReserved()){\n\t\t\tocc = ANSI_GREEN+\"ME\"+ANSI_RESET+\"..\"+ANSI_GREEN+\"ME\"+ANSI_RESET;\n\t\t}\n\t\telse {\n\t\t\tocc = ANSI_BLUE+\"__\"+ANSI_RESET+\"..\"+ANSI_BLUE+\"__\"+ANSI_RESET;\n\t\t}\n\t\tSystem.out.print(\"[\" + occ + \"]\");\n\t}", "private void drawFavouritesAndLegend(){\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.CYAN);\n for(int i = 0; i<favouriteX.size(); i++){\n renderer.circle(favouriteX.get(i), favouriteY.get(i), 3);\n }\n renderer.setColor(Color.WHITE);\n renderer.circle(50, 900, 5);\n renderer.setColor(Color.GREEN);\n renderer.circle(50, 870, 5);\n renderer.setColor(Color.RED);\n renderer.circle(50, 840, 5);\n renderer.setColor(Color.CYAN);\n renderer.circle(50, 810, 5);\n renderer.end();\n batch.begin();\n font.draw(batch, Const.PLANET_NAME, 60, 905);\n font.draw(batch, \"Flight Origin\", 60, 875);\n font.draw(batch, \"Flight Destination\", 60, 845);\n font.draw(batch, \"Habitable Planet\", 60, 815);\n batch.end();\n }", "private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}", "private void plotName(NameSurferEntry entry, int entryNumber) {\r\n\t\t\r\n\t\tfor(int i = 0; i<NDECADES; i++) {\r\n\t\t\tString name = entry.getName();\r\n\t\t\tint rank = entry.getRank(i);\r\n\t\t\tString rankString = Integer.toString(rank);\r\n\t\t\tString label = name + \" \" + rankString;\r\n\t\t\t\r\n\t\t\tdouble x = i * (getWidth()/NDECADES) + SPACE;\r\n\t\t\tdouble y = 0;\r\n\t\t\t\r\n\t\t\tif(rank != 0) {\r\n\t\t\t\ty = GRAPH_MARGIN_SIZE + (getHeight() - GRAPH_MARGIN_SIZE*2) * rank/MAX_RANK - SPACE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tlabel = name + \" *\";\r\n\t\t\t\ty = getHeight() - GRAPH_MARGIN_SIZE - SPACE;\r\n\t\t\t}\r\n\t\t\tGLabel nameLabel = new GLabel(label, x, y);\r\n\t\t\tint numb = entryNumber % NCOLORS;\r\n\t\t\tColor color = NewColor (numb);\r\n\t\t\tnameLabel.setColor(color);\r\n\t\t\tadd(nameLabel);\r\n\t\t}\r\n\t}", "public void dragonSayHello(Graphics g) {\n g.setColor(Color.BLACK);\n g.drawString(\"Hello, I am \" + name, x +25, y);\n \n }", "public void drawPokemon() {\n setAttackText();\n drawImage();\n }", "@Override\n protected void paintForeground(Graphics2D g) {\n g.setColor(Color.MAGENTA);\n g.setFont(new Font(\"Calibri\", Font.BOLD,20));\n g.drawString(\"Villain Carnage\",5,30);\n g.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n g.drawString((\"Level 1\"),20,60);\n \n \n \n //g.drawImage(ballIcon, 2,2, this);\n \n g.drawString(\"Ball Count :\" + villain.getBallCount(), 20,120 );\n \n //g.drawImage(heartIcon, 20,40, this);\n g.drawString(\"Lives left : \" + villain.getLives(),20,150);\n \n // Sets all the appropriate GUI components for this level, including ball count and \n // lives count which will be incremented/decremented as the player collides with it's\n // respective object\n \n }", "protected void drawTitle(Graphics2D g2) {\n //int xloc = leftDisplay + (rightDisplay - leftDisplay)*xCenter/getWidth();\n FontRenderContext frc = g2.getFontRenderContext();\n Font font = new Font(\"Arial\", Font.BOLD, 9);\n String str = dataSet.getGeneRange().getName() + \" Chr\" + dataSet.getChromosome();\n g2.setColor(Singleton.getUserPreferences().getThumbnailTextColor());\n TextLayout tl = new TextLayout(str, font, frc);\n int x = 2;\n int y = 10;\n tl.draw(g2, x, y);\n \n /*for (Model model : viewData.getModels()) {\n System.out.println(\"Rendering with model \" + model.toString() + \"\\thaving #snps: \" + snps.size());*/\n String modelStr = viewData.getModels().get(0).toString();\n //String modelStr = dataSet.getModels().get(0).toString();\n TextLayout modelTl = new TextLayout(modelStr, font, frc);\n int INTER_TITLE_BREAK = 20;\n int modelX = x;\n int modelY = 20;\n if(tl.getBounds().getWidth() + modelTl.getBounds().getWidth() + INTER_TITLE_BREAK < getWidth()) {\n modelY = y;\n modelX = x + (int) Math.round(tl.getBounds().getWidth()) + INTER_TITLE_BREAK;\n }\n modelTl.draw(g2, modelX, modelY);\n }", "private void renderTypeString() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Typed the seed and end with letter S\");\n StdDraw.show();\n }", "private void setupSpellHereLabel(){\n\t\tJLabel spell_here_text = new JLabel(\"SPELL HERE\");\n\t\tspell_here_text.setFont(new Font(\"Arial\", Font.BOLD, 45));\n\t\tspell_here_text.setForeground(new Color(254, 157, 79));\n\t\tadd(spell_here_text);\n\t\tspell_here_text.setBounds(32, 484, 332, 74);\n\t\tspell_here_text.setOpaque(false);\n\t}", "void drawLabel() {\n\t\tfloat gavityValue = (int) (radius * 100);\n\t\tgavityValue /= 100;\n\t\tString label = \"gravityField \" + id + \"\\n gravity: \" + gavityValue;\n\t\tfloat labelWidth = gg.textWidth(label);\n\t\tfloat textHeight = 8;\n\n\t\tgg.pushMatrix();\n\t\tgg.translate(x, y, radius + textHeight * 3);\n\t\t// rotateZ(-rotZ/2);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.fill(0);\n\t\tgg.rect(-labelWidth / 2 - 2, -textHeight - 1.5f, labelWidth + 4,\n\t\t\t\ttextHeight * 2 + 6);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\n\t\tgg.rotateZ(PI);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\t\tgg.popMatrix();\n\n\t}", "public void print() {\n System.out.print(\"\\033[H\\033[2J\");\n for(int y = 0; y < this.height; y++) {\n for (int x = 0; x < this.width; x++) {\n ColoredCharacter character = characterLocations.get(new Coordinate(x , y));\n if (character == null) {\n System.out.print(\" \");\n } else {\n System.out.print(character);\n }\n }\n System.out.print(\"\\n\");\n }\n }", "@Override\r\n\tpublic String hatches() {\n\t\treturn \"Hatches eggs\";\r\n\t}", "@Override\r\n\tprotected void drawGuiContainerForegroundLayer(int param1, int param2) {\n\t\tfontRendererObj.drawString(StatCollector.translateToLocal(\"container.wooden_hopper\"), 8, 6, 4210752);\r\n\t\t//draws \"Inventory\" or your regional equivalent\r\n\t\tfontRendererObj.drawString(StatCollector.translateToLocal(\"container.inventory\"), 8, ySize - 96 + 2, 4210752);\r\n\t}", "@Override\n\tpublic void paint(Graphics e) {\n\t\tsuper.paint(e);\n\t\te.drawString(text, 20, 20);\n\t}", "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}", "public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }", "@Override\n public void draw(WinPlotterFX plotter) {\n super.draw(plotter);\n plotter.printAt(x + (base / 3.2), y + (height / 3), name);\n }", "String getShapeLabel();", "private void drawXYZText() {\n\t\t//Draw text X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"X\");\n\t\tgl.glEnd();\n\t\t//Draw text -X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(-1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-X\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Y\");\n\t\tgl.glEnd();\n\t\t//Draw text -Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,-1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Y\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Z\");\n\t\tgl.glEnd();\n\t\t//Draw text -Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,-1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Z\");\n\t\tgl.glEnd();\n\t}", "void drawPitShape(Graphics g, int x, int y, int width, int height, int stoneNum, String pitLabel);", "@Override\n public void paint(Graphics g, ImageObserver observer) {\n if (font != null)\n g.setFont(font);\n g.setColor(color);\n g.drawString(lName + \": \" + value, x, y);\n }", "protected void paintLabel(Graphics g, int vNum){\r\n\r\n\t// Label Centering Information\r\n\tint xOffSet, yOffSet;\r\n\tif(vNum > 9) {\r\n\t xOffSet = -6;\r\n\t}\r\n\telse {\r\n\t xOffSet = -3;\r\n\t}\r\n\tyOffSet = 5;\r\n\r\n\tint rise = YCENTER - getYCoor(vNum);\r\n int run = XCENTER - getXCoor(vNum);\r\n\tg.drawString(Integer.toString(vNum), getXCoor(vNum)-(run/4) + xOffSet,\r\n\t\t getYCoor(vNum)-(rise/4) + yOffSet);\r\n }", "@Override\n\tprotected void drawGuiContainerForegroundLayer(int par1, int par2)\n\t{\n\t\tfontRendererObj.drawString(invTitle, xSize / 2 - fontRendererObj.getStringWidth(invTitle) / 2, 6, 4210752);\n\t}", "@Override\n public void draw( Graphics g )\n {\n g.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\n g.setColor( Color.BLUE );\n g.fillOval( baseX, baseY, myWidth, myHeight );\n g.setColor( Color.BLACK );\n g.drawString( card, baseX + 7, baseY + 20 ); }", "protected void drawRainbowTitle(Graphics2D g2d, Font font, List<Color> colors, int offsetX, String text)\n {\n g2d.setFont(new Font(font.getName(), Font.PLAIN, 140));\n Color curr = colors.get(0);\n g2d.setColor(curr);\n\n for (int i = 0; i < text.length(); i++)\n {\n g2d.drawString(String.valueOf(text.charAt(i)), 80 * i + offsetX, 200);\n\n if (text.charAt(i) == ' ') continue;\n curr = colors.get((colors.indexOf(curr) + 1) % colors.size());\n g2d.setColor(curr);\n\n }\n }", "private void createLabels() {\n addLabels(\"Dog Name:\", 160);\n addLabels(\"Weight:\", 180);\n addLabels(\"Food:\", 200);\n }", "public void feature(float x, float y){\n fill(150);\n textFont(feature,12);\n text(\"LETHAL\",x,y);\n text(\"DEFENSE\",x,y+18);\n text(\"BOMB\",x,y+36);\n text(\"AGILITY\",x,y+54);\n}", "String getLayerShapeName();", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawString(\"(\" + p.x + \", \" + p.y + \")\", p.x, p.y);\n }", "@Override\n public void paint(Graphics g) {\n if (flagged) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n int fl = fm.stringWidth(\"F\");\n g.setColor(new Color(170, 171, 167));\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n g.setColor(Color.WHITE);\n g.drawString(\"F\", size / 2 - fl / 2, size / 2 + a - h / 2);\n } else if (clicked) {\n //make the mines spots solid red squares\n if (mine) {\n g.setColor(Color.RED);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n } else {\n //if the spot has mines around it print the number in a specific color\n if (!numMines.equals(\"0\")) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n int w = fm.stringWidth(numMines);\n switch (numMines) {\n case \"1\":\n g.setColor(Color.BLACK);\n break;\n case \"2\":\n g.setColor(Color.BLUE);\n break;\n case \"3\":\n g.setColor(Color.RED);\n break;\n case \"4\":\n g.setColor(Color.GREEN);\n break;\n case \"5\":\n g.setColor(Color.ORANGE);\n break;\n case \"6\":\n g.setColor(Color.YELLOW);\n break;\n case \"7\":\n g.setColor(Color.CYAN);\n break;\n case \"8\":\n g.setColor(Color.PINK);\n break;\n default:\n break;\n }\n g.drawString(numMines, size / 2 - w / 2, size / 2 + a - h / 2);\n //if the spot has no mines around it leave it blank\n } else {\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }\n //if the spot was not clicked or flagged print the normal color\n } else {\n g.setColor(new Color(170, 171, 167));\n g.fillRect(1, 1, size - 2, size - 2);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }", "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 void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "public void showNameMenu(Graphics2D g2d) {\n \t\tg2d.drawString(\"Name \", menuX, menuY + 50);\n \t\tg2d.drawString(playerName, menuX, menuY + 100);\n \t}", "@Override\n\tprotected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {\n\t\tString s = this.tile.hasCustomInventoryName() ? this.tile.getInventoryName() : I18n.format(this.tile.getInventoryName(), new Object[0]);\n\t\tthis.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752);\n\t\tthis.fontRendererObj.drawString(I18n.format(\"container.inventory\", new Object[0]), 8, this.ySize - 96 + 2, 4210752);\n\t}", "public void createLabels()\n {\n title = new JLabel(\"Game Over\");\n title.setForeground(Color.RED);\n title.setFont(new Font(title.getFont().getName(), Font.PLAIN, 42));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n roundLabel = new JLabel(\"CPU was infected on round \"+roundLost);\n roundLabel.setForeground(Color.RED);\n roundLabel.setFont(new Font(title.getFont().getName(), Font.PLAIN, 18));\n roundLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "@Override\r\n public void paint(Graphics g) {\r\n super.paint(g);\r\n Letter letter = new Letter(\"C\", getPosition());\r\n letter.paint(g);\r\n }", "void setShapeLabel(String Label);", "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 }", "public void cbDisplayPointText()\n {\n \tif (!m_white.wasSuccess()) \n \t return;\n \n \tString str = m_white.getResponse();\n Vector<Pair<String, String> > pairs = \n StringUtils.parseStringPairList(str);\n \n m_guiboard.clearMarks();\n \n for (int i=0; i<pairs.size(); i++) {\n \t HexPoint point = HexPoint.get(pairs.get(i).first);\n String value = pairs.get(i).second;\n m_guiboard.setText(point, value);\n \t}\n \tm_guiboard.repaint();\n }", "private void drawToolTip(List list, int posX, int posY, FontRenderer fr)\r\n {\r\n if (!list.isEmpty())\r\n {\r\n GL11.glDisable(GL12.GL_RESCALE_NORMAL);\r\n RenderHelper.disableStandardItemLighting();\r\n GL11.glDisable(GL11.GL_LIGHTING);\r\n GL11.glDisable(GL11.GL_DEPTH_TEST);\r\n int k = 0;\r\n Iterator iterator = list.iterator();\r\n\r\n while (iterator.hasNext())\r\n {\r\n String s = (String)iterator.next();\r\n int l = fr.getStringWidth(s);\r\n\r\n if (l > k)\r\n {\r\n k = l;\r\n }\r\n }\r\n\r\n int j2 = posX + 12;\r\n int k2 = posY - 12;\r\n int i1 = 8;\r\n\r\n if (list.size() > 1)\r\n {\r\n i1 += 2 + (list.size() - 1) * 10;\r\n }\r\n\r\n if (j2 + k > this.width)\r\n {\r\n j2 -= 28 + k;\r\n }\r\n\r\n if (k2 + i1 + 6 > this.height)\r\n {\r\n k2 = this.height - i1 - 6;\r\n }\r\n\r\n this.zLevel = 300.0F;\r\n _itemRender.zLevel = 300.0F;\r\n int j1 = -267386864;\r\n this.drawGradientRect(j2 - 3, k2 - 4, j2 + k + 3, k2 - 3, j1, j1);\r\n this.drawGradientRect(j2 - 3, k2 + i1 + 3, j2 + k + 3, k2 + i1 + 4, j1, j1);\r\n this.drawGradientRect(j2 - 3, k2 - 3, j2 + k + 3, k2 + i1 + 3, j1, j1);\r\n this.drawGradientRect(j2 - 4, k2 - 3, j2 - 3, k2 + i1 + 3, j1, j1);\r\n this.drawGradientRect(j2 + k + 3, k2 - 3, j2 + k + 4, k2 + i1 + 3, j1, j1);\r\n int k1 = 1347420415;\r\n int l1 = (k1 & 16711422) >> 1 | k1 & -16777216;\r\n this.drawGradientRect(j2 - 3, k2 - 3 + 1, j2 - 3 + 1, k2 + i1 + 3 - 1, k1, l1);\r\n this.drawGradientRect(j2 + k + 2, k2 - 3 + 1, j2 + k + 3, k2 + i1 + 3 - 1, k1, l1);\r\n this.drawGradientRect(j2 - 3, k2 - 3, j2 + k + 3, k2 - 3 + 1, k1, k1);\r\n this.drawGradientRect(j2 - 3, k2 + i1 + 2, j2 + k + 3, k2 + i1 + 3, l1, l1);\r\n\r\n for (int i2 = 0; i2 < list.size(); ++i2)\r\n {\r\n String s1 = (String)list.get(i2);\r\n fr.drawStringWithShadow(s1, j2, k2, -1);\r\n\r\n if (i2 == 0)\r\n {\r\n k2 += 2;\r\n }\r\n\r\n k2 += 10;\r\n }\r\n\r\n this.zLevel = 0.0F;\r\n _itemRender.zLevel = 0.0F;\r\n GL11.glEnable(GL11.GL_LIGHTING);\r\n GL11.glEnable(GL11.GL_DEPTH_TEST);\r\n RenderHelper.enableStandardItemLighting();\r\n GL11.glEnable(GL12.GL_RESCALE_NORMAL);\r\n }\r\n\t}", "private void setHoverDisplay(String text, Vector3 coords) {\n\t\tfloat scaleFactor = 1920 / (Gdx.graphics.getWidth() * 1.0f);\n\t\tfloat x = coords.x * scaleFactor + 50;\n\t\tfloat y = coords.y * scaleFactor - 125;\n\t\tx = Math.min(Math.max(x, 0), 1920 - hoverImage.getWidth());\n\t\ty = Math.min(Math.max(y, 200), 1080 - hoverImage.getHeight());\n\t\thoverLabel.setText(text);\n\t\thoverLabel.setPosition(x + 75, y + 155);\n\t\tif (!text.equals(\"\")) {\n\t\t\thoverImage.setVisible(true);\n\t\t\thoverImage.setPosition(x, y);\n\t\t}\n\t}", "@Override\n protected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tFont f = new Font(\"sansserif\", Font.BOLD, 12);\n\t\tg.setFont(f);\n\t\tif(type == 1){\n\t\t\t //draw the map\n\t g.drawImage(image, 0, 0, getWidth(), getHeight(), this);\n\t //draw the names on the map\n\t for (City city : cities) {\n\t \n\t \tif (city.hasLocation()) {\n\t \t\tPoint location = getLocationFromCoordinate(city.getLatitude(), city.getLongitude());\n\t \t\tg.drawString(city.getName(), (int)(location.getx())*multiplier, (int)(location.gety())*multiplier);\n\t \t\tg.fillRect((int)location.getx()*multiplier, (int)location.gety()*multiplier, 3, 3);\n\t \t}\n\t }\n\t\t}\n\t\tif(type == 2) {\n\t\t\t//draw the map\n\t g.drawImage(image, 0, 0, getWidth(), getHeight(), this);\n\t //draw the names on the map\n\t for (PointOfInterest point : points) {\n\t \tif (point.hasLocation()) {\n\t \t\tPoint location = getLocationFromCoordinate(point.getLatitude(), point.getLongitude());\n\t \t\tg.drawString(point.getName(), (int)(location.getx())*multiplier, (int)(location.gety())*multiplier);\n\t \t}\n\t }\n\t\t}\n\t\tif (type == 3) {\n\t\t\tg.drawImage(image, 0,0,getWidth(),getHeight(), this);\n\t\t\tfor(Region region : regions) {\n\t\t\t\tif (region.hasLocation()) {\n\t\t\t\t\tPoint location = getLocationFromCoordinate(region.getLatitude(), region.getLongitude());\n\t\t\t\t\tg.drawString(region.getName(), (int)location.getx()*multiplier, (int)(location.gety())*multiplier);\n\t\t\t\t\tg.drawRect((int)location.getx()*multiplier - (length/2)*3, (int)(location.gety())*multiplier - (breadth/2)*3, \n\t\t\t\t\t\t\tlength*multiplier, breadth*multiplier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "public HBox answerLocationLine(String shadowName)\n {\n HBox answerLocationLine = new HBox(5);\n answerLocationLine.getChildren().addAll(new Label(\"Sombra: \"), new Text(shadowName));\n answerLocationLine.setAlignment(Pos.BASELINE_LEFT);\n\n return answerLocationLine; \n }", "private Label createGameOverLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"GAME OVER\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(4f*scale,4f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.80f);\n return text;\n }", "@Override\r\n public void drawOn(DrawSurface d) {\r\n d.setColor(Color.black);\r\n d.drawText(100, 10, \"Lives: \" + lives, 10);\r\n }", "String nameLabel();", "private void redrawTitles(int i, int k, double y) {\n\t\tdouble x = getWidth() / NDECADES * k;\r\n\t\tGLabel titles;\r\n\t\tif (entries.get(i).getRank(k) > 0) {\r\n\t\t\ttitles = new GLabel(entries.get(i).getName() + \" \" + entries.get(i).getRank(k), x, y);\r\n\t\t} else {\r\n\t\t\ttitles = new GLabel(entries.get(i).getName() + \" \" + \"*\", x, y);\r\n\t\t}\r\n\t\tchangeTheColor(titles, i);\r\n\t\tadd(titles);\r\n\t}", "@Override\r\n\tpublic void onCustomDraw(Graphics2D g) {\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(x, y, width, height);\r\n\t\tg.setColor(Color.green);\r\n\t\tfor(int i = 0; i < 50; i++){\r\n\t\t\tif(text[i] != null){\r\n\t\t\t\tg.drawString(text[i], 11, (i*10)+20);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String getName() {\n Boolean color = this.getColor();\n if (!color) {\n return \"bQ\";\n }\n return \"wQ\";\n }", "private void paintLandmarkInfo (Graphics g, Landmark l) {\n int oldColor = g.getColor ();\n int width = getWidth ();\n g.setColor (0, 0, 0);\n g.drawRect (0, 0, width - 1, LANDMARK_INFO_HEIGHT - 1);\n g.setColor (0x40, 0x40, 0x80);\n g.fillRect (1, 1, width - 2, LANDMARK_INFO_HEIGHT - 2);\n g.setColor (0xff, 0xff, 0xff);\n g.drawString (l.getName (), 4, 4, Graphics.LEFT | Graphics.TOP);\n g.setColor (oldColor);\n }", "private void drawTitleScreen(Graphics g) {\n \t\tg.setColor(new Color(0, 0x66, 0xcc, 150));\n \t\tg.fillRect(0, 60, getWidth(), getHeight() - 120);\n \t\tg.setColor(Color.WHITE);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 30));\n \t\tg.drawString(\"POP UP QUIZ!\", 50, 100);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 18));\n \t\tg.drawString(\"Where you answer questions whilst cleaning your desktop!\",\n \t\t\t\t50, 120);\n \t\tg.drawString(\"Q LAM, V TONG, A VIJAYARAGAVAN\", 50, 140);\n \n \t\tg.drawString(\"Use the arrow keys to move the recycle bin.\", 50, 180);\n \t\tg.drawString(\"<Space> pauses, and <Esc> quits.\", 50, 200);\n \n \t\tg.drawImage(sprites.get(\"junk\"), 4, 200, null);\n \t\tg.drawString(\"Polish your computer by trashing junk falling \"\n \t\t\t\t+ \"from the sky!\", 50, 220);\n \n \t\tg.drawImage(sprites.get(\"sysfileLarge\"), 4, 330, null);\n \t\tg.drawImage(sprites.get(\"sysfileMedium\"), 8, 390, null);\n \t\tg.drawImage(sprites.get(\"sysfileSmall\"), 16, 440, null);\n \t\tg.drawString(\"You'll mess up your computer if you collect system files.\",\n \t\t\t\t50, 360);\n \t\tg.drawString(\"Note that they fall from the sky at different speeds.\",\n \t\t\t\t50, 390);\n \n \t\tg.drawString(\"The CPU gauge will tell you how well you're doing!\",\n \t\t\t\t50, 420);\n \t\tg.drawString(\"If your CPU usage goes over 100%, your computer goes kaput\"\n \t\t\t\t+ \" and you lose! How long can you clean?\", 50, 450);\n \n \t\tg.drawString(\"By the way, you'll have to answer questions from a barrage\"\n \t\t\t\t+ \" of pop-up as you do this.\", 50, 500);\n \t\tg.drawString(\"Serves you right for not being clean!!!\", 50, 530);\n \n \t\tg.drawString(\"PUSH START TO BEGIN_\", 50, 600);\n \t}", "public void displayTitle() {\n\t\tthis.theScreen.setFont(Preferences.TITLE_FONT);\n\t\tthis.theScreen.setColor(Preferences.TITLE_COLOR);\n\t\tthis.theScreen.drawString(Preferences.TITLE,\n\t\t\t\tPreferences.TITLE_X, Preferences.TITLE_Y);\n\t}", "private void createYourListsTitle() {\n\t\tjlYourLists = new JLabel(\"PLAYLISTS\");\t\t\n\t\tjlYourLists.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourLists.setForeground(new Color(250,250,250));\n\t}", "void renderHotspots() {\n boolean afterCurrent = false;\n boolean hasLastPos = false;\n float lastX = 0.0f;\n float lastY = 0.0f;\n float lastZ = 0.0f;\n \n final float halfWidth = 0.1f / 2;\n final float halfLength = 0.1f / 2;\n final float halfHeight = 0.1f / 2;\n final float eyeHeight = 0.91712f;//1.1f;\n \n // Find pan position offset vector\n if (selectedTimeInterval.getLocationMetadataEntry() == null) {\n return;\n }\n \n if (!dstLocationVectorExists)\n return;\n \n GL11.glLoadIdentity();\n // set up for tracking hotspot screen x,y\n\t\tfloat projectedXYZ[] = new float[3]; \t\t\n\t\tprojectionMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projectionMatrix);\n\t\tgetMatrixAsArray(projectionMatrix, projectionArray);\n\t\tviewportMatrix.clear();\n\t\tGL11.glGetInteger(GL11.GL_VIEWPORT, viewportMatrix);\n\t\tviewportArray[0] = viewportMatrix.get(0);\n\t\tviewportArray[1] = viewportMatrix.get(1);\n\t\tviewportArray[2] = viewportMatrix.get(2);\n\t\tviewportArray[3] = viewportMatrix.get(3);\n //System.out.println(\"\"+viewportArray[0] + \" \"+ viewportArray[1]+\" \"+viewportArray[2]+\" \"+viewportArray[3] ); \n\t\tmodelMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelMatrix);\n\t\tgetMatrixAsArray(modelMatrix, modelArray);\n \n GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); // no texture\n \n for (int i=0; i<roverTrackingList.size()-1; i++) {\n \tRoverTrackingListEntry listEntry = (RoverTrackingListEntry) roverTrackingList.get(i);\n\t\t\tlistEntry.screenX = 0.0f;\n\t\t\tlistEntry.screenY = 0.0f;\n \t\n double da = listEntry.locationMetadataEntry.rover_origin_offset_vector_a + listEntry.siteMetadataEntry.offset_vector_a - currentLocationVectorA;\n double db = listEntry.locationMetadataEntry.rover_origin_offset_vector_b + listEntry.siteMetadataEntry.offset_vector_b - currentLocationVectorB;\n double dc = listEntry.locationMetadataEntry.rover_origin_offset_vector_c + listEntry.siteMetadataEntry.offset_vector_c - currentLocationVectorC;\n \n float x = (float) db;\n float y = (-(float)dc) - eyeHeight;\n float z = - (float) da;\n\n // calculate brightness of point based on number of images visible for location\n float brightness = 0.0f;\n \n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getNumEnabledImages() > 2) {\n \t// track screen x, y of hotspot\n \t\t\tGLU.gluProject(x, y, z, modelArray, projectionArray, viewportArray, projectedXYZ);\n \t\t\tif (projectedXYZ[2] < 1.0f) {\n\t \t\t\tlistEntry.screenX = projectedXYZ[0];\n\t \t\t\t// transform y from opengl screen coords to regular screen coords\n\t \t\t\tlistEntry.screenY = viewportArray[3] - projectedXYZ[1];\n \t\t\t}\n \t\n \t// render hotspot\n GL11.glLoadIdentity();\n GL11.glTranslatef(x, y, z);\n //System.out.println(\"\"+listEntry.screenX+\" \"+listEntry.screenY);\n \n brightness = 0.5f + 0.1f * listEntry.locationListEntry.getNumEnabledImages();\n if (brightness > 1.0f) {\n brightness = 1.0f;\n }\n \n GL11.glBegin(GL11.GL_QUADS); // D draw A Quad\n \n if (listEntry.locationListEntry.getStartLocation().equals(selectedTimeInterval.getStartLocation())) {\n GL11.glColor3f(brightness, 0.0f, brightness); \n }\n else if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n }\n \n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Bottom Left Of The Quad (Top)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Bottom Right Of The Quad (Top)\n\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Top Right Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Top Left Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Bottom)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Bottom)\n\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Front)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Front)\n\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Back)\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Back)\n\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Left)\n\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Right)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Right)\n \n GL11.glEnd(); // Done Drawing The Quads\n\t }\n \n if (hasLastPos && !listEntry.segmentStart) {\n brightness = 0.5f;\n if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n } \n GL11.glLoadIdentity();\n GL11.glBegin(GL11.GL_LINES); \n// GL11.glColor3f(1.0f, 0.0f, 0.0f); \n GL11.glVertex3f(lastX, lastY, lastZ);\n GL11.glVertex3f(x, y, z);\n GL11.glEnd();\n }\n \n lastX = x;\n lastY = y;\n lastZ = z;\n hasLastPos = true;\n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getStartLocation().equals(this.selectedTimeInterval.getStartLocation())) {\n afterCurrent = true;\n }\n }\n }", "public void showHue(String title)\r\n {\r\n\tIntensityImage image = new IntensityImage(hue);\r\n\t//image.setColormap(IntensityImage.HSI);\r\n\timage.show(title);\r\n }", "@Override\n protected void drawGuiContainerForegroundLayer(int par1, int par2) {\n super.drawGuiContainerForegroundLayer(par1, par2);\n drawCenteredString(fontRendererObj, StatCollector.translateToLocal(\"tile.SpawnEggCopyingMachine.name\"), this.xSize / 2, 6, 4210752);\n this.fontRendererObj.drawString(StatCollector.translateToLocal(\"container.inventory\"), 8, this.ySize - 96 + 2, 4210752);\n /*drawCenteredString(fontRendererObj, String.valueOf(tile.hadCopyedTime), 15, 0, 4210752);\n drawCenteredString(fontRendererObj, String.valueOf(tile.maxCopyTime), 15, 25, 4210752);\n drawCenteredString(fontRendererObj, String.valueOf(tile.tableBurnTime), 15, 50, 4210752);\n drawCenteredString(fontRendererObj, String.valueOf(tile.maxBurnTime), 15, 75, 4210752);*/\n\t }", "private void addNameLabel() {\n\t\tadd (new JLabel(\"Name \"), SOUTH);\n\t}", "public String Name() {\t\t\r\n\t\treturn BrickFinder.getDefault().getName();\r\n\t}", "@Override\n public void paint(Graphics g) {\n \t Graphics2D g2 = (Graphics2D) g;\n Dimension size = getSize();\n Font font = new Font(\"Arial\", Font.PLAIN, 14);\n \n g.setFont(font);\n \n String tempString = histTitle;\n FontRenderContext frc = ((Graphics2D)g).getFontRenderContext();\n Rectangle2D boundsTemp = font.getStringBounds(tempString, frc);\n Rectangle2D boundsCond = font.getStringBounds(\"\", frc);\n int wText = Math.max((int)boundsTemp.getWidth(), (int)boundsCond.getWidth());\n int hText = (int)boundsTemp.getHeight() + (int)boundsCond.getHeight();\n int rX = (size.width-wText)/2;\n int rY = (size.height-hText)/2;\n \n g.setColor(Color.WHITE);\n g2.fillRect(0, 0, size.width, size.height);\n \n g.setColor(Color.BLACK);\n int xTextTemp = rX-(int)boundsTemp.getX(); // centres the text\n int yTextTemp = rY-(int)boundsTemp.getY();\n g.drawString(tempString, xTextTemp, 20);\n \n int maxX = size.width;\n int maxY = size.height;\n int yAxis_startX = 20; int yAxis_startY=maxY-20; int yAxis_endX=20; int yAxis_endY=20;\n int xAxis_startX = 20; int xAxis_startY=maxY-20; int xAxis_endX=maxX-20; int xAxis_endY=maxY-20;\n \n drawArrow(g, yAxis_startX, yAxis_startY, yAxis_endX, yAxis_endY, ArrowDirection.UPWARD);\n drawArrow(g, xAxis_startX, xAxis_startY, xAxis_startX+513, xAxis_endY, ArrowDirection.LEFTWARD); // what the hell. Let's fix hist width to 512 + 1 pixels (two pixels for each grayscale value)\n \n if (pierwszy==null) { // Clear the histogram view\n \t g.setColor(Color.WHITE);\n \t g.fillRect(yAxis_endX+1, yAxis_endY-1, 512, yAxis_startY-yAxis_endY-1);\n \t System.out.println(\"Cleared hist\");\n }\n else\n {\n \t BufferedImage grayScaled = new BufferedImage(pierwszy.getWidth(), pierwszy.getHeight(), BufferedImage.TYPE_BYTE_GRAY);\n \t Graphics gg = grayScaled.getGraphics();\n \t System.out.println(\"W=\"+grayScaled.getWidth()+\", H=\"+grayScaled.getHeight());\n \t gg.drawImage(pierwszy, 0, 0, null);\n \t lut = getGrayscaleHist(grayScaled);\n \t int maxBarHeight = yAxis_endY-yAxis_startY-1;\n \t paintBars(g, lut, xAxis_startX+1, xAxis_startY-1, maxBarHeight);\n }\n }", "abstract void nameHighlight(Spannable name, String matchStr, int color,\r\n int text_color);", "@Override\r\n public void paint (Graphics g)\r\n {\r\n super.repaint();\r\n g.setFont(new java.awt.Font(\"Brush Script MT\", Font.BOLD, 80));\r\n g.drawImage (hauntedHouse.getImage(), 0, 0, 1024, 590, null);\r\n g.setColor(Color.white);\r\n g.drawString(\"EduGames\", 360, 550 - count*2);\r\n g.drawString(\"Created and designed by\", 130, 640 - count*2);\r\n g.drawString(\"Jessica and Hannah\", 220, 730- count*2);\r\n g.drawString(\"Instructions - Hannah\", -1140+count*2, 150);\r\n g.drawString(\"Levels Menu - Jessica\", -1140+count*2, 250);\r\n g.drawString(\"High Scores - Hannah\", -1140+count*2, 350);\r\n g.drawString(\"Goodbye Screen - Hannah\", -1190+count*2, 450);\r\n g.drawString(\"Level 1 - Jessica\", 250, -1980 + count*2);\r\n g.drawString(\"Level 2 - Jessica\", 250, -1890 + count*2);\r\n g.drawString(\"Level 3 - Hannah\", 230, -1800 + count*2);\r\n g.drawString(\"Splashscreen - Jessica\", 3300 - count*2,90 );\r\n g.drawString(\"Character Graphics - Jessica and Hannah\", 3300 - count*2, 190);\r\n g.drawString(\"Background Graphics - Hannah and Jessica\", 3300- count*2, 290 );\r\n g.drawString(\"Introduction Animation - Jessica\", 3300- count *2, 390);\r\n g.drawString(\"Ending Animation - Hannah\", 3300 - count*2, 490);\r\n }", "void drawMancalaShape(Graphics g, int x, int y, int width, int height, int stoneNum, String pitLabel);", "public void empSlotText(SpriteBatch batch){\n batch.setProjectionMatrix(textCam.combined);\n String text = \"\"+manager.getEmployees()+\"/\"+manager.getEmployeeSlots();\n batch.begin();\n font2.draw(batch,text, 730, 370);\n batch.end();\n }", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "public void drawChipsLeftNumber(int chipsNum){\n Graphics2D g2d = (Graphics2D) infoCanvas.getGraphics();\n g2d.setColor(Color.BLACK);\n g2d.fillRect(infoCanvas.getWidth() / 3 + 4, 11 * infoCanvas.getHeight() / 20 + 11 , infoCanvas.getWidth() / 3 - 8, infoCanvas.getHeight() / 10 - 8);\n Font f = new Font(\"Font.PLAIN\", Font.BOLD, infoCanvas.getHeight() / 12);\n g2d.setFont(f);\n g2d.setColor(Color.GREEN);\n int startX = infoCanvas.getWidth() / 3 + 4;\n int startY = 11 * infoCanvas.getHeight() / 20 + 15;\n int stringX = startX + (infoCanvas.getWidth() / 3 - 8)/3;\n g2d.drawString(String.valueOf(chipsNum), stringX, startY + infoCanvas.getHeight() / 10 - 18);\n }", "public void showTitle(PGraphics pg, float x, float y){\r\n\t\tString title = getTitle();\r\n\t\tpg.pushStyle();\r\n\t\t\r\n\t\tpg.rectMode(PConstants.CORNER);\r\n\t\t\r\n\t\tpg.stroke(110);\r\n\t\tpg.fill(255,255,255);\r\n\t\tpg.rect(x, y + 15, pg.textWidth(title) +6, 18, 5);\r\n\t\t\r\n\t\tpg.textAlign(PConstants.LEFT, PConstants.TOP);\r\n\t\tpg.fill(0);\r\n\t\tpg.text(title, x + 3 , y +18);\r\n\t\t\r\n\t\t\r\n\t\tpg.popStyle();\r\n\t}", "private void drawPosition(Position pos, TextColor color, char c, boolean wide) {\n TextGraphics text = screen.newTextGraphics();\n text.setForegroundColor(color);\n text.putString(pos.getX() * 2, pos.getY() + 1, String.valueOf(c));\n\n if (wide) {\n text.putString(pos.getX() * 2 + 1, pos.getY() + 1, String.valueOf(c));\n }\n }", "public void hp(Graphics g) {\n\t\tw = g.getFontMetrics().stringWidth(\"HP: \" + player.hp); //Get the width of the rendered text\n\t\tg.setColor(Color.white); //Set the colour for the text\n\t\tg.setFont(f); //Set the font for the text\n\t\tg.drawString(\"HP: \" + player.hp, WIDTH-w-25, 25); //Draw \"HP: #\" in the top right corner of the screen\n\t}", "@Override\n public String toString() {\n return String.format(\"%-4s %-35s %-20s %-20s\\n\", this.pokeNumber, this.pokeName,\n this.pokeType_1, this.hitPoints);\n }", "public void strokeString(float x, float y, String text);", "public void showHue()\r\n {\r\n\tshowHue(\"Hue\");\r\n }", "public void paintSmallTag(Graphics g, TGPanel tgPanel, int tagX, int tagY, \r\n \t\t\t\t\t\t Color backCol, Color textCol, char character) {\r\n \tg.setColor(backCol);\r\n \tg.fillRect(tagX, tagY, 8, 8);\r\n g.setColor(textCol);\r\n g.setFont(SMALL_TAG_FONT);\r\n g.drawString(\"\"+character, tagX+2, tagY+7);\r\n\t}", "@Override\n public Graphics2D createObjectView() {\n\n Graphics2D objectView = super.createObjectView();\n\n /* Setting graphics */\n objectView.setColor(Color.RED);\n objectView.setFont(new Font(\"Lucida\", Font.ITALIC, 10));\n\n RedBird player = ((RedBird) getFieldObject());\n String playerName = player.getPlayerName();\n int playerSize = player.getSize();\n int ovalSize = getOvalSize();\n\n /* Painting player name */\n if (ovalSize > START_OVAL_SIZE) {\n objectView.drawString(\n playerName,\n (playerSize / 2) - X_OFFSET,\n (playerSize / 2) + Y_OFFSET\n );\n }\n\n return objectView;\n }", "public String toString() {\n\t\treturn \"oval\" + \" \" + \"(\" + rb + \",\" + cb + \") \" + \"(\" + height + \",\" + width + \") \" + \"(\" + character + \")\";\n\t}", "public void printName()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar);//sort by names\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(i+\". \"+it.next().getName());\n\t\t\ti++;\n\t\t}\n\t}", "public Seagull(String name){\n this.name = name;\n this.color = SWT.COLOR_DARK_BLUE;\n }", "protected void createSimpleLabel(String name, String content, AlignmentLocation horz, AlignmentLocation vert, \n\t\t\tString parentZoneName) {\n\t\tnew Label(name, content, Color.WHITE, 30f, horz, vert, parentZoneName, this);\n\t}" ]
[ "0.6178541", "0.6150889", "0.59528923", "0.5898555", "0.5837415", "0.5785435", "0.5768438", "0.5694756", "0.5686575", "0.56830007", "0.5679274", "0.5660964", "0.56546897", "0.56272954", "0.56186956", "0.5608737", "0.553899", "0.5529839", "0.552905", "0.55083615", "0.5502495", "0.54599464", "0.54560906", "0.5425357", "0.5398187", "0.5382897", "0.5365957", "0.5361751", "0.5361008", "0.5356395", "0.53447753", "0.53408295", "0.53242093", "0.53156406", "0.5313784", "0.5308101", "0.53005046", "0.5294162", "0.5266", "0.52601695", "0.5258755", "0.52462363", "0.5237263", "0.5236189", "0.5232507", "0.5230278", "0.52279925", "0.52156115", "0.5212679", "0.52112544", "0.52096134", "0.5207299", "0.520601", "0.51984245", "0.51979035", "0.519187", "0.5188159", "0.5174007", "0.51735765", "0.51711345", "0.5163631", "0.51628256", "0.51625365", "0.5154678", "0.51454103", "0.5142628", "0.5142241", "0.5136718", "0.5123398", "0.5119321", "0.51191", "0.51166946", "0.51147836", "0.51116157", "0.5110805", "0.51099104", "0.5107301", "0.5106181", "0.51029766", "0.50948155", "0.50943786", "0.5093419", "0.50895786", "0.50885594", "0.50883764", "0.50851756", "0.5082796", "0.5076735", "0.5068384", "0.5062214", "0.50570446", "0.505107", "0.50396997", "0.503919", "0.50376534", "0.50270075", "0.5024915", "0.50245064", "0.50222975", "0.50161135" ]
0.7784091
0
Paints a bound of lines corresponding the rute of current map
public void paintRoute(Graphics g, String[] ruteData, int begin, int end, int color) { //System.out.println("painting rute"); end += RUTE_FLOOR + 1; begin += RUTE_FLOOR + 1; if (begin > end || end > ruteData.length || begin < 0 || g == null || ruteData == null) { return; } g.setColor(color); //paint the rute int x = 0, y = 0, lastx = 0, lasty = 0, i = begin; int floor = Integer.parseInt(ruteData[RUTE_FLOOR]); for (; i < end; i++) { //System.out.println(ruteData[i]); point = getPoint(ruteData[i]); x = point[0] + currMatrixX + transformCoordenate(floor, X_COORD); y = point[1] + currMatrixY + transformCoordenate(floor, Y_COORD); //dot g.fillRoundRect(x - 5, y - 5, 10, 10, 5, 5); //line if (!(lastx == 0 && lasty == 0)) { g.drawLine(x - 1, y - 1, lastx - 1, lasty - 1); g.drawLine(x, y - 1, lastx, lasty - 1); g.drawLine(x - 1, y, lastx - 1, lasty); g.drawLine(x, y, lastx, lasty); g.drawLine(x, y + 1, lastx, lasty + 1); g.drawLine(x + 1, y, lastx + 1, lasty); g.drawLine(x + 1, y + 1, lastx + 1, lasty + 1); } lastx = x; lasty = y; //System.out.println("point " + (i-begin) + ": " + x + "," + y + " floor " + floor); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawMap(HashMap<String, TrailObj> trailCollection,\n\t\t\tGoogleMap mMap2) {\n\n\t\tfor (TrailObj trail : trailCollection.values()) {\n\t\t\tfor (PlacemarkObj p : trail.getPlacemarks()) {\n\t\t\t\tPolylineOptions rectOptions = new PolylineOptions();\n\t\t\t\tfor (LatLng g : p.getCoordinates()) {\n\t\t\t\t\trectOptions.add(g);\n\t\t\t\t}\n\t\t\t\tPolyline polyline = mMap2.addPolyline(rectOptions);\n\t\t\t\tpolyline.setColor(Color.RED);\n\t\t\t\tpolyline.setWidth(5);\n\t\t\t\tpolyline.setVisible(true);\n\t\t\t}\n\t\t}\n\t}", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void paintMap(Graphics2D g2d) {\r\n\t\tLineMap map = model.getMap();\r\n\t\tif (map == null) return;\r\n\t\tLine[] lines = map.getLines();\r\n\t\tg2d.setColor(colors[MAP_COLOR_INDEX]);\r\n\t\tg2d.setStroke(new BasicStroke(2));\r\n\t\tfor (int i = 0; i < lines.length; i++) {\r\n\t\t\tLine2D line = new Line2D.Float(\r\n \t\t getX(lines[i].x1), \r\n \t\t getY(lines[i].y1), \r\n \t\t getX(lines[i].x2), \r\n \t\t getY(lines[i].y2));\r\n\t\t\tg2d.draw(line);\r\n\t\t}\r\n\t\tg2d.setStroke(new BasicStroke(1));\r\n\t}", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void showBoundaries(HashSet<Pair<Region, Polygon>> mapBoundaries) {\r\n\t\tint boundaryCount = mapBoundaries.size();\r\n\t\tint stepSize = 0xFFFFFF / boundaryCount;\r\n\t\tint currentCount = 1;\r\n\r\n\t\t// Linear interpolate the color based on the number of Regions.\r\n\t\tfor (Pair<Region, Polygon> pair : mapBoundaries) {\r\n\t\t\tint currentR = 0b111111110000000000000000 & (stepSize * currentCount);\r\n\t\t\tint currentG = 0b000000001111111100000000 & (stepSize * currentCount);\r\n\t\t\tint currentB = 0b000000000000000011111111 & (stepSize * currentCount);\r\n\t\t\tcurrentR = currentR >> 16;\r\n\t\t\tcurrentG = currentG >> 8;\r\n\r\n\t\t\tpair.second.display(new Color(currentR, currentG, currentB), true, POLYGON_VERTEX_RADIUS, false);\r\n\t\t\tcurrentCount++;\r\n\t\t}\r\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 void paintComponent(Graphics g) {\r\n \tsuper.paintComponent(g);\r\n \t/*print the boat*/\r\n \tReadFile file = new ReadFile();\r\n \t\tfile.openFile(); \r\n \t\t/* Map include all the points of the boat*/\r\n \t\tMap <String,ArrayList<Point>> map = new HashMap<String,ArrayList<Point>>();\r\n \t\tmap = file.parseFile(); \r\n \t\tfor (String key : map.keySet()) {\r\n \t \tif (key.startsWith(\"line\"))\r\n \t \t{\r\n \t \t System.out.println(key + \" \" + map.get(key));\r\n \t \t\tint x1 = (int) map.get(key).get(0).getX();\r\n \t \t\t int y1 = (int) map.get(key).get(0).getY();\r\n \t \t\t int x2 = (int)map.get(key).get(1).getX();\r\n \t \t\t int y2 = (int)map.get(key).get(1).getY();\r\n \t \t\t drawLine(x1,y1,x2,y2,g);\t \t\t\r\n \t \t}\r\n \t \tif (key.startsWith(\"circle\"))\r\n \t \t{\r\n \t \t System.out.println(key + \" \" + map.get(key));\r\n \t \t\tint x1 = (int) map.get(key).get(0).getX();\r\n \t \t\t int y1 = (int) map.get(key).get(0).getY();\r\n \t \t\t int x2 = (int)map.get(key).get(1).getX();\r\n \t \t\t int y2 = (int)map.get(key).get(1).getY();\r\n \t \t\t drawCircle(x1,y1,x2,y2,g);\t \t\t\r\n \t \t}\r\n \t \tif (key.startsWith(\"curve\"))\r\n \t \t{\r\n \t \t System.out.println(key + \" \" + map.get(key));\r\n \t \t\tint x1 = (int) map.get(key).get(0).getX();\r\n \t \t\tint y1 = (int) map.get(key).get(0).getY();\r\n \t \t\tint x2 = (int)map.get(key).get(1).getX();\r\n \t \t\tint y2 = (int)map.get(key).get(1).getY();\r\n \t \t\tint x3 = (int)map.get(key).get(2).getX();\r\n\t \t\tint y3 = (int)map.get(key).get(2).getY();\r\n\t \t\tint x4 = (int)map.get(key).get(3).getX();\r\n \t \t\tint y4 = (int)map.get(key).get(3).getY();\r\n \t \t\tdrawCurve(x1,y1,x2,y2,x3,y3,x4,y4,200,g); \t \t} \t\t\r\n \t\t}\r\n \t\t\r\n \t\t\r\n \t\t\r\n \tfor (int i = 0; i < clicksforLine.size(); i++ )\r\n\t\t{\r\n \t\tg.drawRect((int)Math.round(clicksforLine.get(i).getX()),(int) Math.round(clicksforLine.get(i).getY()),2,2);\r\n\r\n\t\t}\r\n \tfor (int j = 0; j < clicksforCircle.size(); j++ )\r\n\t\t{\r\n \t\tg.drawRect((int)Math.round(clicksforCircle.get(j).getX()),(int) Math.round(clicksforCircle.get(j).getY()),2,2);\r\n\r\n\t\t}\r\n \tfor (int j = 0; j < clicksforPoly.size(); j++ )\r\n\t\t{\r\n \t\tg.drawRect((int)Math.round(clicksforPoly.get(j).getX()),(int) Math.round(clicksforPoly.get(j).getY()),2,2);\r\n\r\n\t\t}\r\n \tfor (int j = 0; j < clicksforCurve.size(); j++ )\r\n\t\t{\r\n \t\tg.drawRect((int)Math.round(clicksforCurve.get(j).getX()),(int) Math.round(clicksforCurve.get(j).getY()),2,2);\r\n\r\n\t\t}\r\n \r\n \t\r\n \t//check is the list of the shape LINE has at least 2 points to draw line\r\n \tif (clicksforLine.size() >= 2)\r\n {\r\n \tfor (int i=0; i < clicksforLine.size(); i+=2 )\r\n \t \t\t{\r\n \t\t int x1=0, y1=0, x2=0, y2=0;\r\n \t\t \t\tSystem.out.println(\"Line case\");\r\n \t\t\t x1 = (int) clicksforLine.get(i).getX();\r\n \t\t\t y1 = (int) clicksforLine.get(i).getY();\r\n \t\t\t x2 = (int) clicksforLine.get(i+1).getX();\r\n \t\t\t y2 = (int) clicksforLine.get(i+1).getY();\r\n \t\t\t drawLine(x1,y1,x2,y2,g);\r\n \t \t \t\t\r\n \t \t}\r\n }\r\n //check is the list of the shape CIRCLE has at least 2 points to draw circle\r\n if (clicksforCircle.size() >= 2)\r\n {\t\r\n \tfor (int i=0; i < clicksforCircle.size(); i+=2 )\r\n \t\t \t{\r\n \t\t int x1=0, y1=0, x2=0, y2=0;\r\n \t\t \t\tSystem.out.println(\"Line case\");\r\n \t\t\t x1 = (int) clicksforCircle.get(i).getX();\r\n \t\t\t y1 = (int) clicksforCircle.get(i).getY();\r\n \t\t\t x2 = (int) clicksforCircle.get(i+1).getX();\r\n \t\t\t y2 = (int) clicksforCircle.get(i+1).getY();\r\n \t\t\t drawCircle(x1,y1,x2,y2,g);\r\n \t \t \t\t\r\n \t\t \t}\r\n \t }\r\n //check is the list of the shape LINE has at least 2 points to draw line\r\n if (clicksforPoly.size() >= 2)\r\n \t {\r\n \t\t \tfor (int i=0; i < clicksforPoly.size(); i+=2 )\r\n \t\t \t{\r\n \t\t int x1=0, y1=0, x2=0, y2=0;\r\n \t\t \t\tSystem.out.println(\"Line case\");\r\n \t\t\t x1 = (int) clicksforPoly.get(i).getX();\r\n \t\t\t y1 = (int) clicksforPoly.get(i).getY();\r\n \t\t\t x2 = (int) clicksforPoly.get(i+1).getX();\r\n \t\t\t y2 = (int) clicksforPoly.get(i+1).getY();\r\n \t\t\t String text = MyWindow.input.getText();\r\n \t\t\t drawPolygon(x1,y1,x2,y2,Integer.parseInt(text),g);\r\n \t \t \t\t\r\n \t\t \t}\r\n \t }\r\n //check is the list of the shape CURVE has at least 2 points to draw curve\r\n if (clicksforCurve.size() >= 4)\r\n \t {\r\n \t\t \tfor (int i=0; i < clicksforCurve.size(); i+=4 )\r\n \t\t \t{\r\n \t int x1=0, y1=0, x2=0, y2=0, x3=0,y3=0,x4=0,y4=0;\r\n \t \t\tSystem.out.println(\"Line case\");\r\n \t\t x1 = (int) clicksforCurve.get(i).getX();\r\n \t\t y1 = (int) clicksforCurve.get(i).getY();\r\n \t\t x2 = (int) clicksforCurve.get(i+1).getX();\r\n \t\t y2 = (int) clicksforCurve.get(i+1).getY();\r\n \t\t x3 = (int) clicksforCurve.get(i+2).getX();\r\n \t\t y3 = (int) clicksforCurve.get(i+2).getY();\r\n \t\t x4 = (int) clicksforCurve.get(i+3).getX();\r\n \t\t y4 = (int) clicksforCurve.get(i+3).getY();\r\n \t\t String text = MyWindow.input.getText();\r\n \t\t drawCurve(x1,y1,x2,y2,x3,y3,x4,y4,Integer.parseInt(text),g);\r\n \t \t}\r\n \t }\r\n\t\r\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 drawPolyLineOnMap(List<LatLng> list) {\n PolylineOptions polyOptions = new PolylineOptions();\n polyOptions.color(Color.RED);\n polyOptions.width(5);\n polyOptions.addAll(list);\n\n mMap.clear();\n mMap.addPolyline(polyOptions);\n\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (LatLng latLng : list) {\n builder.include(latLng);\n }\n\n //final LatLngBounds bounds = builder.build();\n\n //BOUND_PADDING is an int to specify padding of bound.. try 100.\n //CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, BOUND_PADDING);\n //mMap.animateCamera(cu);\n }", "public void paintRubberband(Point2D pt1, Point2D pt2) {\n if (theMap != null) {\n paintRubberband(pt1, pt2, theMap.getGraphics());\n }\n }", "@Override\n\tpublic void render(GameContainer gc, Graphics g) {\n\t\tfloat x = getX(), y = getY(), width = getWidth(), height = getHeight();\n\t\tg.setColor(new Color(0.5f, 0.5f, 0.5f, 0.8f));\n\t\tg.fillRoundRect(x, y, width, height, 5);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Map needs to be drawn below\", x + (width - g.getFont().getWidth(\"Map needs to be drawn below\")) * 0.5f , y + 20);\n\t\tg.drawString(\"Orange - current cell\", x + 20, y + 50);\n\t\tg.drawString(\"Green - explored cell\", x + 20, y + 70);\n\t\tg.drawString(\"White - unexplored cell\", x + 20, y + 90);\n\t\tg.drawString(\"Line - connection\", x + 20, y + 110);\n\t\tg.drawString(\"Dot - contains item\", x + 20, y + 130);\n\t\t\n\t\tg.setColor(Color.orange);\n\t\tg.fillRoundRect(x + width/2 - 3, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.green);\n\t\tg.fillRoundRect(x + width/2 - 3 + 50, y + height/2 - 3, 46, 46, 5);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3 + 50, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.darkGray);\n\t\tg.fillRoundRect(x + width/2, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 50, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2 + 50, 40, 40, 5);\n\t\t\n\t\tg.drawLine(x + width/2 + 40, y + height/2 + 20, x + width/2 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 40 + 50, y + height/2 + 20, x + width/2 + 50 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 120, y + height/2 + 40, x + width/2 +\t120, y + height/2 + 50);\n\t\t\n\n g.setColor(Color.cyan);\n g.fillOval(x + width/2 - 3 + 120, y + height/2 + 17, 6, 6);\n\t\t\n\t}", "@Override\n public void paintContent(MapPaintArgs args) {\n if (isDragging && end != null && start != null) {\n int xmin = Math.min(end.x, start.x);\n int xmax = Math.max(end.x, start.x);\n int ymin = Math.min(end.y, start.y);\n int ymax = Math.max(end.y, start.y);\n Rectangle rect = new Rectangle(xmin, ymin, xmax - xmin, ymax - ymin);\n args.getGraphics().setColor(Color.BLACK);\n Stroke original = args.getGraphics().getStroke();\n BasicStroke strk = new BasicStroke(2, BasicStroke.CAP_BUTT,\n BasicStroke.JOIN_BEVEL, 1, new float[]{2.0f, 1.0f}, 0);\n args.getGraphics().setStroke(strk);\n args.getGraphics().drawRect(rect.x, rect.y, rect.width, rect.height);\n args.getGraphics().setStroke(original);\n }\n super.paintContent(args);\n }", "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 }", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 35;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 36; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next Shape:\", d.width*13/20, d.width/8);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width*5/8);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*7/8);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*9/8);\n }", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 25;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 26; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next Shape:\", d.width*13/20, d.width*3/40);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width/2);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*3/5);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*7/10);\n }", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/30,(j/4 + y - 4)*d.width/30, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/30,(j/4 + y - 4)*d.width/30, d.width/30, d.width/30);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/30+d.width*23/30,(j/4)*d.width/30+d.width/15, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/30+d.width*23/30,(j/4)*d.width/30+d.width/15, d.width/30, d.width/30);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/30,(j-4)*d.width/30,(i+1)*d.width/30,(j-5)*d.width/30);\n }\n }\n //right boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 21;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/30,(j-4)*d.width/30,i*d.width/30,(j-5)*d.width/30);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 20; i++)\n {\n int j = 25;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/30,(j-4)*d.width/30,(i+2)*d.width/30,(j-4)*d.width/30);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 26; j++)\n {\n for (i = 0; i < 21; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/30,(j-4)*d.width/30, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/30,(j-4)*d.width/30, d.width/30, d.width/30);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/30));\n g.drawString(\"Next Shape:\", d.width*23/30, d.width*3/60);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Level: \" + level, d.width*23/30, d.width/3);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Line: \" + showline, d.width*23/30, d.width*2/5);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Score: \" + score, d.width*23/30, d.width*7/15);\n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "private void drawRoad(double xM, double yM, double xL, double yL, double xI, double yI,\n\t\t\tdouble xP, double yP, double lat1, double lon1, double lat2, double lon2, int highlight, Graphics2D g2d) {\n\t\t\t\t\t\t\n\t\tlat1 = 1-Math.abs(lat1-mapBounds[0])/yL;\n\t\tlon1 = Math.abs(lon1-mapBounds[1])/xL;\n\t\tlat2 = 1-Math.abs(lat2-mapBounds[0])/yL;\n\t\tlon2 = Math.abs(lon2-mapBounds[1])/xL;\n\t\t\n\t\tint x1 = (int) (lon1*(xM-xI*2) + xI-xP);\n\t\tint y1 = (int) (lat1*(yM-yI*2) + yI-yP);\n\t\tint x2 = (int) (lon2*(xM-xI*2) + xI-xP);\n\t\tint y2 = (int) (lat2*(yM-yI*2) + yI-yP);\n\t\t\n\t\tif(highlight == 1) {\n\t\t\tg2d.setColor(pathColor);\n\t\t\tg2d.setStroke(new BasicStroke(pathWidth));\n\t\t} else {\n\t\t\tg2d.setColor(roadColor);\n\t\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t}\n\t\t\n\t\tg2d.drawLine(x1, y1, x2, y2);\n\t}", "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 drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }", "@Override\r\n\tpublic void draw(Graphics2D g2) {\r\n\t\tCoord c,c2;\r\n\t\t\r\n\t\tif (simMap == null && gridMap == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tg2.setColor(PATH_COLOR);\r\n\t\tg2.setBackground(BG_COLOR);\r\n\t\t\n\t\tif (simMap != null){\r\n\t\t\t// draws all edges between map nodes (bidirectional edges twice)\r\n\t\t\tfor (MapNode n : simMap.getNodes()) {\r\n\t\t\t\tc = n.getLocation();\r\n\t\t\t\t\r\n\t\t\t\t// draw a line to adjacent nodes\r\n\t\t\t\tfor (MapNode n2 : n.getNeighbors()) {\r\n\t\t\t\t\tc2 = n2.getLocation();\r\n\t\t\t\t\tg2.drawLine(scale(c2.getX()), scale(c2.getY()),\r\n\t\t\t\t\t\t\tscale(c.getX()), scale(c.getY()));\r\n\t\t\t\t}\r\n\t\t\t}\n\t\t}\n\t\t\n\t\tg2.setColor(Color.RED);\n\t\tif (gridMap != null){\n\t\t\t// draws the polygon\n\t\t\tfor (GridCell cell : gridMap.getCells()) {\n\t\t\t\tList<Coord> listPoint = cell.getPoints();\n\t\t\t\tfor (int i = 0; i < listPoint.size(); i++) {\n\t\t\t\t\tCoord p1 = listPoint.get(i);\n\t\t\t\t\tCoord p2 = listPoint.get( (i+1) % (listPoint.size()));\n\t\t\t\t\t\n\t\t\t\t\tg2.drawLine(scale(p2.getX()), scale(p2.getY()),\n\t\t\t\t\t\t\tscale(p1.getX()), scale(p1.getY()));\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\r\n\t}", "private void redrawLines()\n {\n for(int i =0; i<currentRide;i++)\n {\n rides[i].moveTogether(650,60 + 40*i);//move all elemetnts of ride lines\n \n }\n }", "@Override\npublic void paint(Graphics g) {\n\tsuper.paint(g);\n\tg.drawImage(bak, 0, 0, null);\n\t\n\t//画线\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tg.setColor(new Color(137,92,44));\n\t\t\tg.drawRect(j*Config.CELL+Config.OFFSETX, i*Config.CELL+Config.OFFSETY, Config.CELL, Config.CELL);\n\t\t}\n\t}\n\t//画焦点\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tif(Config.MAP[i][j]==Config.FOCUS)\n\t\t\t{\n\t\t\t\tg.setColor(new Color(137,92,44));\n\t\t\t\tg.fillRect(j*Config.CELL+Config.OFFSETX-5, i*Config.CELL+Config.OFFSETY-5, 10, 10);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//画子\n\t\tfor(int i=0;i<Config.ROWS;i++)\n\t\t{\n\t\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t\t{\n\t\t\t\tif(Config.MAP[i][j]==Config.BLACK)\n\t\t\t\t{\n\t\t\t\t g.drawImage(black, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\tif(Config.MAP[i][j]==Config.WHITE)\n\t\t\t\t{\n\t\t\t\t g.drawImage(white, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n //画提拉\n\t\tg.setFont(new Font(\"微软雅黑\",Font.BOLD,24));\n\t\tg.setColor(step%2==0?Color.black:Color.white);\n\t\tg.drawString(step%2==0?\"黑子下\":\"白子下\", 640, 80);\n}", "public void paintLine(Point2D pt1, Point2D pt2) {\n if (theMap != null) {\n paintLine(pt1, pt2, theMap.getGraphics());\n }\n }", "private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}", "public void draw(ShapeRenderer renderer){\n\n\t\tfor (int x = 0; x < MAP_WIDTH; x++) {\n\t\t\tfor (int y = 0; y<MAP_HEIGTH;y++){\n\t\t\t\tif (currentLevel.getLevelMap().isFilled(x, y)) {\n\t\t\t\t\trenderer.setColor(Color.TEAL);\n\t\t\t\t\trenderer.begin(ShapeType.Line);\n\t\t\t\t\t\trenderer.rect(X_OFFSET*TILE_SIZE+x*TILE_SIZE,Y_OFFSET*TILE_SIZE+y*TILE_SIZE,TILE_SIZE,TILE_SIZE);\t\n\t\t\t\t\trenderer.end();\n\t\t\t\t}else{\n\t\t\t\t\trenderer.begin(ShapeType.Filled);\n\t\t\t\t\trenderer.rect(X_OFFSET*TILE_SIZE+x*TILE_SIZE,Y_OFFSET*TILE_SIZE+y*TILE_SIZE,TILE_SIZE,TILE_SIZE);\n\t\t\t\t\trenderer.end();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }", "public void drawMap(Graphics g) {\r\n\t\tfor (UIElement field : fields.values())\r\n\t\t\tfield.draw(g);\r\n\r\n\t\tfor (UIElement stargate : stargates.values())\r\n\t\t\tstargate.draw(g);\r\n\t}", "@Override\n\tprotected void onDraw(Canvas canvas)\n\t{\n\t\tdrawMap(canvas);\n\t\t\n\t\t screenwidth= context.getResources().getDisplayMetrics().widthPixels;\n\t\t screenheight= context.getResources().getDisplayMetrics().heightPixels;\n//\t\t\n//\t\tFMDBDatabaseAccess fdb = new FMDBDatabaseAccess(context);\n//\t\tsm = fdb.getSnagsXYvalue(this.getTag().toString());\n//\t\t//sm[0].setXValue(0.4);\n\t\t//sm[0].setYValue(0.5);\n\t\t if(sm==null)\n\t\t {\n\t\t\t sm=getSnag();\n\t\t }\n\t\tif(isFirst)\n\t\t{\n\t\t\tisFirst=false;\n\t\t\ttry{\n\t\t\tfor(int i=0;i<sm.length;i++)\n\t\t\t{\n\t\t\t paint.setStrokeWidth(30);\n\t\t\t //String str=\"\"+(sm[i].getXValue()*screenwidth);\n\t\t\t x = sm[i].getXValue()*screenwidth;\n\t\t\t //str=\"\"+(sm[i].getYValue()*screenheight);\n\t\t\t y = sm[i].getYValue()*screenheight;\n\t\t\t paint.setColor(Color.RED);\n\t\t\t if(x!=0.0f && y!=0.0f)\n\t\t\t {\n\t\t\t\t // canvas.drawRect(x+7.5f, y+7.5f, x-7.5f, y-7.5f,paint);\n\t\t\t\t // canvas.drawRect(x+7.5f, y+7.5f, x-7.5f, y-7.5f,paint);\n\t\t\t\t SnagImageMapping objmap=(SnagImageMapping) context;\n//\t\t\t\t \n\t\t\t\t mapLayout =(RelativeLayout)(objmap).findViewById(R.id.plot_image_layout);\n\t\t\t\t ImageView mapImage = new ImageView(context);\n//\t\t\t\t \n\t\t\t float value;\n\t\t\t\t if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)\n\t\t\t\t {\n\t\t\t\t\t value=screenheight*0.078125f;\n\t\t\t }\n\t\t\t\t else\n \t\t\t {\n\t\t\t\t\t value=screenheight*0.052083332f;\n \t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t float imght=value;\n\t\t\t\t float imgwdth=imght;\n\t\t\t\t RelativeLayout.LayoutParams par=new RelativeLayout.LayoutParams((int)imgwdth,(int)imght);\n\t\t\t\t par.leftMargin=(int)(x-(value/2));\n\t\t\t\t par.topMargin=(int)(y-(value/2));\n\t\t\t\t if(sm[i].getSnagStatus().equalsIgnoreCase(\"pending\"))\n\t\t\t\t {\n\t\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_yellow);\n\t\t\t\t }\n\t\t\t\t else if(sm[i].getSnagStatus().equalsIgnoreCase(\"reinspected & unresolved\"))\n\t\t\t\t {\n\t\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_red);\n\t\t\t\t }\n\t\t\t\t else if(sm[i].getSnagStatus().equalsIgnoreCase(\"resolved\"))\n\t\t\t\t {\n\t\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_green);\n\t\t\t\t }\n\t\t\t\t// R.drawable.pl\n\t\t\t\t mapImage.setId(i);\n\t\t\t\t // mapImage.setTag();\n\t\t\t\t mapImage.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t\tint id=v.getId();\n\t\t\t\t\t\tfloat setX,setY;\n\t\t\t\t\t\t String str2=\"\"+(sm[id].getXValue()*screenwidth);\n\t\t\t\t\t\t setX = Float.parseFloat(str2);\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t str2=\"\"+(sm[id].getYValue()*screenheight);\n\t\t\t\t\t\t setY = Float.parseFloat(str2);\n\t\t\t\t\t\t//Toast.makeText(getContext(), \"By image click\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t//Log.d(\"x y\",\"\"+setX+\" \"+setY);\n\t\t\t\t\t\t//Button img=new Button(context);\n\t\t\t\t\t\t//img.setBackgroundResource(R.drawable.back_blue_button);\n\t\t\t\t\t\t//img.setText(\"from\"+\"\"+sm[id].getID());\n//\t\t\t\t\t\t RelativeLayout.LayoutParams par2=new RelativeLayout.LayoutParams(android.widget.RelativeLayout.LayoutParams.WRAP_CONTENT,android.widget.RelativeLayout.LayoutParams.WRAP_CONTENT);\n//\t\t\t\t\t\t par2.leftMargin=(int)(setX);\n//\t\t\t\t\t\t par2.topMargin=(int)(setY);\n//\t\t\t\t\t\t popMsg.setLayoutParams(par2);\n//\t\t\t\t\t\t popMsg.setText(\"from\"+\"\"+sm[id].getID());\n//\t\t\t\t\t\t //popMsg.setText(\"from sfsf dfdfsfd dfdsf df dfdfdf d fdfedfd dfdfdf dfdf df dfdfd \");\n//\t\t\t\t\t\t popMsg.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t//RelativeLayout.LayoutParams par2=v.(RelativeLayout.LayoutParams)getTag();\n\t\t\t\t\t\t // img.setLayoutParams(par2);\n\t\t\t\t\t\t // mapLayout.addView(img);\n\t\t\t\t\t\t String text=\"Project - \"+sm[id].getProjectName()+\"\\n\"+\"Building - \"+sm[id].getBuildingName()+\"\\n\"+\"Floor - \"+sm[id].getFloor()+\"\\n\"+\"Apartment - \"+sm[id].getApartment()+\"\\n\"+\"Area - \"+sm[id].getAptAreaName()+\"\\n\"+\"SnagType - \"+sm[id].getSnagType()+\"\\n\"+\"FaultType - \"+sm[id].getFaultType()+\"\\n\"+\"Status - \"+sm[id].getSnagStatus()+\"\\n\"+\"ReportDate - \"+sm[id].getReportDate()+\"\\n\"+\"SnagDetails - \"+sm[id].getSnagDetails()+\"\\n\"+\"PriorityLevel - \"+sm[id].getSnagPriority()+\"\\n\"+\"Cost - \"+sm[id].getCost()+\"\\n\"+\"CostTO - \"+sm[id].getCostTo()+\"\\n\"+\"AllocatedToName - \"+sm[id].getAllocatedToName()+\"\\n\"+\"InspectorName - \"+sm[id].getInspectorName()+\"\\n\"+\"ContractorName - \"+sm[id].getContractorName()+\"\\n\"+\"SubContractorName - \"+sm[id].getSubContractorName()+\"\\n\"+\"ContractorStatus - \"+sm[id].getContractorStatus();\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n//\t\t\t\t\t\t \n\t\t\t\t\t\t final int loc=id;\n\t\t\t\t\t\t new AlertDialog.Builder(context)\n\t\t\t\t \t .setTitle(\"Snag Detail\")\n\t\t\t\t \t .setMessage(\"\"+text)\n\t\t\t\t \t .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t \t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t \t \t//Toast.makeText(context,\"\"+0.052083332*screenwidth+\" \"+0.078125*screenheight,Toast.LENGTH_LONG).show();\n\t\t\t\t \t // continue with delete\n\t\t\t\t \t }\n\t\t\t\t \t })\n\t\t\t\t \t .show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t \n\t\t\t\t mapImage.setLayoutParams(par);\n\t\t\t\t mapLayout.addView(mapImage);\n\t\t\t\t \n\t\t\t }\n\t\t\t if(touched)\n\t\t\t {\n\t\t\t// if((currentX>=(x-7.5f) && currentX<=(x+7.5f)) && ((currentY<=(y+7.5f)) && currentY>=( y-7.5f)))\n\t\t\t // {\n\t\t\t\t if((currentX>=(x-7.5f) && currentX<=(x+7.5f)) && ((currentY<=(y+7.5f)) && currentY>=( y-7.5f)))\n\t\t\t\t {\n\t\t\t\t\t \n\t\t\t\t\t // Toast.makeText(getContext(), \"Click\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t// Log.d(\"in the touch\",\"\");\n //\t\t\t String strID=sm[i].getID();\n //\t\t\t \t\tSnagImageMapping objmap=(SnagImageMapping) context;\n////\t\t\t\t \n//\t\t\t\t RelativeLayout mapLayout =(RelativeLayout)(objmap).findViewById(R.id.plot_image_layout);\n//\t\t\t\t ImageView mapImage = new ImageView(context);\n////\t\t\t\t \n//\t\t\t\t RelativeLayout.LayoutParams par=new RelativeLayout.LayoutParams(300,300);\n//\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_pink_gray);\n//\t\t\t\t par.setMargins((int)(x+7.5f), (int)(y+7.5f), (int)(x-7.5f), (int)(y-7.5f));\n//\t\t\t\t mapImage.setLayoutParams(par);\n//\t\t\t\t mapLayout.addView(mapImage);\n//\t\t\t\t Toast.makeText(getContext(), \"Green\",Toast.LENGTH_SHORT).show();\n\t\t\t\t \n\t\t\t }\n\t\t\t touched=false;\n\t\t\t }\n\t\t\t \n\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t}\t\n\t }\n\t\t\n\t}", "public void paintNormalized(){\n\t\t\n\t\tint min = 99999;\n\t\tint max = 0;\n\t\t\n\t\tfor (int i=0; i < ranges.size(); i++){\n\t\t\tif ((ranges.elementAt(i).getMin()) < min){\n\t\t\t\tmin = ranges.elementAt(i).getMin();\n\t\t\t}\n\t\t\tif ((ranges.elementAt(i).getMax()) > max){\n\t\t\t\tmax = ranges.elementAt(i).getMax();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Once I've got them, the paint is simple, because Positioner.getAssociatedPosition() returns\n\t\t// the exact pixel where the color has to be painted\n\t\t\n\t\tPositioner positions = new Positioner(drawingPanel.getHeight(), min, max);\n\t\t\n\t\tint i = 1;\n\t\tBufferedImage img = new BufferedImage(drawingPanel.getWidth(), drawingPanel.getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\t\t\t\n\t\twhile (i <= ranges.size()){\n\t\t\tpaintBufferedSolid(ranges.elementAt(ranges.size()-i).getColor(),positions.getAssociatedPosition(ranges.elementAt(ranges.size()-i).getMax()) , positions.getAssociatedPosition(ranges.elementAt(ranges.size()-i).getMin()), img);\n\t\t\ti++;\n\t\t}\n\n\t\t\t\n\t\t\n\t\tdrawingPanel.getGraphics().drawImage(img, 0, 0, img.getWidth(), img.getHeight(), null);\n\t\t\n\t\t// Painting the ranges\n\t\t\n\t\trangesPanel.removeAll();\t\t\t// Clears rangePanel\n\t\t\n\t\tJLabel currentRange;\n\t\t\n\t\tcurrentRange = new JLabel(Integer.toString(ranges.elementAt(0).getMin()));\n\t\tcurrentRange.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tcurrentRange.setBounds(35, rangesPanel.getHeight()-16, 60, 16);\n\t\t\n\t\t\n\t\trangesPanel.add(currentRange);\n\t\tint last = rangesPanel.getHeight()-16;\n\t\tint aux;\n\t\tfor (int j = 0; j < ranges.size(); j++){\n\t\t\taux = positions.getAssociatedPosition(ranges.elementAt(j).getMax());\n\t\t\tcurrentRange = new JLabel(Integer.toString(ranges.elementAt(j).getMax()));\n\t\t\tcurrentRange.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tif (aux+16 < last){\n\t\t\t\tcurrentRange.setBounds(35, aux, 60, 16);\n\t\t\t\tlast = aux;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurrentRange.setBounds(35, last-16, 60, 16);\n\t\t\t\tlast = last - 16;\n\t\t\t}\n\t\t\t\t\n\t\t\trangesPanel.add(currentRange);\n\t\t}\n\t\t\n\t\trangesPanel.repaint();\n\t}", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "private void paintGraph() {\n if(graph) {\n for (MapFeature street : mapFStreets) {\n if (!(street instanceof Highway)) continue;\n Highway streetedge = (Highway) street;\n Iterable<Edge> edges = streetedge.edges();\n if (edges == null) continue;\n Iterator<Edge> it = edges.iterator();\n g.setStroke(new BasicStroke(0.0001f));\n g.setPaint(Color.CYAN);\n while (it.hasNext()) {\n Edge e = it.next();\n if (e.isOneWay())\n g.setPaint(Color.orange);\n else if (e.isOneWayReverse())\n g.setPaint(Color.PINK);\n g.draw(e);\n }\n\n\n }\n for (MapFeature street : mapFStreets) {\n if (!(street instanceof Highway)) continue;\n Highway streetedge = (Highway) street;\n List<Point2D> points = streetedge.getPoints();\n for(Point2D p : points){\n g.setPaint(Color.yellow);\n g.draw(new Rectangle2D.Double(p.getX(), p.getY(), 0.000005, 0.000005));\n }\n\n }\n }\n }", "public void drawTextualMap(){\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tif(grid[i][j] instanceof Room){\n\t\t\t\t\tif(((Room)grid[i][j]).getItems().size()>0)\n\t\t\t\t\t\tSystem.out.print(\" I \");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\" R \");\n\t\t\t\t}else{\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\n\t\tSystem.out.println(\"rows = \"+grid.length+\" cols = \"+grid[0].length);\n\t\tSystem.out.println(\"I = Room has Item, R = Room has no Item, '=' = Is a Hallway\");\n\n\t}", "private void drawBoundary(Graphics2D g, Color c)\r\n\t{\t\t\r\n\t\t//This drawing code inspired by drawJoint() method in net.phys2d.raw.test.AbstractDemo\r\n\t\t//by Kevin Glass, 2006\r\n\t\t//Source: http://www.cokeandcode.com/phys2d/source/builds/src060408.zip\r\n\r\n\t\tVector2f[] points = getBoundary();\r\n\r\n\t\tg.setColor(c);\r\n\t\tfor(int i=0; i<4; i++)\r\n\t\t{\r\n\t\t\tg.drawLine((int)points[i].x, (int)points[i].y, (int)points[(i+1)%4].x, (int)points[(i+1)%4].y);\r\n\t\t}\t\t\r\n\t}", "public void drawGraph() {\n for (int x = 0; x < width; ++x) {\n for (int y = 0; y < height; ++y) {\n\n if (y == height / 2) {\n imageRaster.setPixel(x, y, lineColor);\n } else {\n imageRaster.setPixel(x, y, backgroundColor);\n }\n }\n }\n\n // lateral\n for (int x = 0; x < width; ++x) {\n float xUnit = x / (float) width;\n float slipAngle = map(xUnit, 0, 1, 0, maxSlipAngle);\n\n float lat = tireModel.calcLateralTireForce(slipAngle);\n lat = map(lat, -tireModel.getMaxLoad(), tireModel.getMaxLoad(), 0, height);\n int pixelY = (int) FastMath.clamp(lat, 0, height - 1);\n\n imageRaster.setPixel(x, pixelY, lateralColor);\n }\n\n // longitudinal\n for (int x = 0; x < width; ++x) {\n float xUnit = x / (float) width;\n float slipAngle = map(xUnit, 0, 1, 0, maxSlipAngle);\n\n float lng = tireModel.calcLongitudeTireForce(slipAngle);\n lng = map(lng, -tireModel.getMaxLoad(), tireModel.getMaxLoad(), 0, height);\n int pixelY = (int) FastMath.clamp(lng, 0, height - 1);\n\n imageRaster.setPixel(x, pixelY, longitudinalColor);\n }\n\n // align moment\n for (int x = 0; x < width; ++x) {\n float xUnit = x / (float) width;\n float slipAngle = map(xUnit, 0, 1, 0, maxSlipAngle);\n\n float mnt = tireModel.calcAlignMoment(slipAngle);\n mnt = map(mnt, -tireModel.getMaxLoad(), tireModel.getMaxLoad(), 0, height);\n int pixelY = (int) FastMath.clamp(mnt, 0, height - 1);\n\n imageRaster.setPixel(x, pixelY, momentColor);\n }\n }", "private void drawSegments(List<LatLng> listPoints) {\n\n PolylineOptions rectOptions = new PolylineOptions()\n .width(8)\n .color(context.getResources().getColor(R.color.colorPolylineComplete))\n .addAll(listPoints);\n\n googleMap.addPolyline(rectOptions);\n }", "private void plotLines(RoutePattern rp, LatLon src, Route r, int zoomLevel) {\n for (LatLon latLon : rp.getPath()) {\n if (src != null) {\n LatLon dst = new LatLon(latLon.getLatitude(), latLon.getLongitude());\n if (dst != null) {\n if (Geometry.rectangleIntersectsLine(northWest, southEast, src, dst)) {\n plotRoute(zoomLevel, src, dst, r);\n }\n src = dst;\n }\n } else {\n src = new LatLon(latLon.getLatitude(), latLon.getLongitude());\n }\n }\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 draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "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 }", "private void redrawLines(int k, double y, int i) {\n\t\tdouble y2 = 0;\r\n\t\tdouble x = getWidth() / NDECADES * k;\r\n\t\tdouble x2 = getWidth() / NDECADES * (k + 1);\r\n\t\tif (k != NDECADES - 1) {\r\n\t\t\tif (nse.getRank(k + 1) == 0) {\r\n\t\t\t\ty2 = getHeight() - GRAPH_MARGIN_SIZE;\r\n\t\t\t} else {\r\n\t\t\t\ty2 = (getHeight() - 2 * GRAPH_MARGIN_SIZE) * nse.getRank(k + 1) / (double) MAX_RANK + GRAPH_MARGIN_SIZE;\r\n\t\t\t}\r\n\t\tGLine line = new GLine(x, y, x2, y2);\r\n\t\tchangeTheColor(line, i);\r\n\t\tadd(line);\r\n\t\t}\r\n\t}", "public void lineDraw(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2) {\n Line l = new Line((int) l1.data.xCo, (int) l1.data.yCo, (int) l2.data.xCo, (int) l2.data.yCo);\n l.setTranslateX(mapImage.getLayoutX());\n l.setTranslateY(mapImage.getLayoutY());\n ((Pane) mapImage.getParent()).getChildren().add(l);\n }", "public void updateMap(boolean animate) {\n\t\tgetContentPane().add(mapContainer);\n\t\trevalidate();\n\t\t\n\t\t// Setting up map\n\t\tint width = mapContainer.getWidth();\n\t\tint height = mapContainer.getHeight();\n\t\tBufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2d = I.createGraphics();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t// Setting up map dimensions\n\t\tdouble xM = width*zoom, yM = height*zoom;\n\t\tdouble xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]);\n\t\tdouble xI = (xM-(yM-60)*(xL/yL))/2, yI = 30;\n\t\tif(xM/yM < xL/yL) {\n\t\t\txI = 30;\n\t\t\tyI += (yM-(xM-60)*(yL/xL))/2;\n\t\t}\n\t\tdouble yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2;\n\t\t\n\t\tg2d.setColor(Color.white);\n\t\tg2d.fillRect(20, 20, width-40, height-40);\n\t\tg2d.setColor(roadColor);\n\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t\n\t\t// Drawing each road\n\t\tint i, n = G.getSize();\n\t\tdouble[] v1, v2;\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tfor(Edge e : G.getEdges(i)) {\t\t\t\t\n\t\t\t\tv1 = V.get(i);\n\t\t\t\tv2 = V.get(e.next);\n\t\t\t\tif(animate)\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d);\n\t\t\t\telse {\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Drawing each path\n\t\tif(animate) {\n\t\t\tn = P.size()-1;\n\t\t\tfor(i = 0; i < n; i++) {\n\t\t\t\t\n\t\t\t\tv1 = V.get(P.get(i));\n\t\t\t\tv2 = V.get(P.get(i+1));\n\t\t\t\t\n\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d);\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\t\t\trevalidate();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Creating image base\n\t\tg2d.setStroke(new BasicStroke(1));\n\t\tg2d.setColor(Color.lightGray);\n\t\tg2d.fillRect(0, 0, width, 20);\n\t\tg2d.fillRect(0, 0, 20, height);\n\t\tg2d.fillRect(width-20, 0, 20, height);\n\t\tg2d.fillRect(0, height-20, width, 20);\n\t\tg2d.setColor(Color.black);\n\t\tg2d.drawRect(20, 20, width-40, height-40);\n\t\tg2d.setFont(titleFont);\n\t\tg2d.drawString(title, 40, 15);\n\t\tint tw = g2d.getFontMetrics().stringWidth(title);\n\t\tg2d.setFont(subtitleFont);\n\t\tg2d.drawString(subtitle, 50+tw, 15);\n\t\t\n\t\t\n\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\trevalidate();\n\t}", "public void listenerPaint(java.awt.Graphics g) {\n for (int i = 0; i < segments.size() - 1; i++) {\n paintLine((LatLonPoint) (segments.elementAt(i)),\n (LatLonPoint) (segments.elementAt(i + 1)),\n g);\n }\n paintRubberband(rPoint1, rPoint2, g);\n }", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n Graphics2D g2 = (Graphics2D)g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);\n if (icon != null) icon.paintIcon(this, g, 0, 0);\n\n // draw a grey grid over the bitmap background\n for(int y = 0; y < bitmapHeight; y++) {\n g2.setColor(Color.GRAY);\n // g2.draw(new Line2D.Float(0, (y+1)*pixelScale, canvasWidth, (y+1)*pixelScale));\n }\n for(int x = 0; x < bitmapWidth; x++) {\n g2.setColor(Color.GRAY);\n // g2.draw(new Line2D.Float((x+1)*pixelScale, 0, (x+1)*pixelScale, canvasHeight));\n }\n\n // draw the polygon\n g2.setColor(Color.BLUE);\n Point2D.Float prev = null;\n float r = 4;\n for (Point2D.Float gp : points) {\n Point2D.Float p = screenPosition(gp);\n g2.fill(new Ellipse2D.Float(p.x - r, p.y - r, 2*r, 2*r));\n if (prev != null) {\n g2.draw(new Line2D.Float(prev, p));\n }\n prev = p;\n }\n }", "void drawRegion (double b, double e) {\n begT = b; endT = e;\n drawStuff (img.getGraphics ());\n }", "public static void drawMap(Graphics g, int[][] data) {\r\n int c;\r\n int normalizer = 0;\r\n int minVal = findMinValue(data);\r\n \r\n if (minVal < 0) {\r\n normalizer = -minVal;\r\n }\r\n \r\n double divisor = (findMinValue(data) + findMaxValue(data) + 2 * normalizer);\r\n for (int i = 0; i < data.length; i++) {\r\n for (int j = 0; j < data[i].length; j++) {\r\n c = (int) (( (data[i][j] + normalizer) / divisor) * 255); \r\n g.setColor(new Color(c, c, c));\r\n g.fillRect(j, i, 1, 1);\r\n }\r\n }\r\n }", "public void paintComponent(Graphics g)\n {\n\t Graphics2D g2 = (Graphics2D) g;\n\t // draw start point and end point\n\t g2.setColor(START_COLOR);\n\t Rectangle myStart = new Rectangle(START_X + maze.getEntryLoc().getCol()*BOX_WIDTH+INSET, START_Y + maze.getEntryLoc().getRow()*BOX_HEIGHT+INSET, BOX_WIDTH-INSET*TWO_SIDE, BOX_HEIGHT-INSET*TWO_SIDE);\n\t g2.fill(myStart);\n\t g2.setColor(END_COLOR);\n\t Rectangle myEnd = new Rectangle(START_X + maze.getExitLoc().getCol()*BOX_WIDTH+INSET, START_Y + maze.getExitLoc().getRow()*BOX_HEIGHT+INSET, BOX_WIDTH-INSET*TWO_SIDE, BOX_HEIGHT-INSET*TWO_SIDE);\n\t g2.fill(myEnd);\n\t //draw walls and borders\n\t g2.setColor(WALL_COLOR);\n\t Rectangle myWall;\n\t for (int i = FOR_INIT; i < maze.numRows(); i++){\n\t\t for (int j = FOR_INIT; j < maze.numCols(); j++){\n\t\t\t if (maze.hasWallAt(new MazeCoord(i,j))){\n\t\t\t\t myWall= new Rectangle(START_X + j*BOX_WIDTH, START_Y + i*BOX_HEIGHT, BOX_WIDTH, BOX_HEIGHT);\n\t\t\t\t g2.fill(myWall);\n\t\t\t }\n\t\t }\n\t }\n\t myWall = new Rectangle(START_X,START_Y,maze.numCols()*BOX_WIDTH,maze.numRows()*BOX_HEIGHT);\n\t g2.draw(myWall);\n\t //draw path use linkedlist \n\t g2.setColor(PATH_COLOR);\n\t double x1,y1,x2,y2;\n\t ListIterator<MazeCoord> iter = maze.getPath().listIterator(); \n\t MazeCoord temp = null;\n\t if (iter.hasNext()){\n\t\t temp = iter.next();\n\t }\n\t //use iteration to get the value\n\t while (iter.hasNext()){\n\t\t x1 = START_X + temp.getCol() * BOX_WIDTH + BOX_WIDTH / TWO_SIDE;\n\t\t y1 = START_Y + temp.getRow() * BOX_HEIGHT + BOX_HEIGHT / TWO_SIDE;\n\t\t temp = iter.next();\n\t\t x2 = START_X + temp.getCol() * BOX_WIDTH + BOX_WIDTH / TWO_SIDE;\n\t\t y2 = START_Y + temp.getRow() * BOX_HEIGHT + BOX_HEIGHT / TWO_SIDE;\n\t\t Line2D.Double myPath = new Line2D.Double(x1, y1, x2, y2);\t \n\t\t g2.draw(myPath);\n\t }\t\t\t \n }", "public void highlightTransportLine(AnchorPane anchor_pane_map, ArrayList<Street> streets_list, ArrayList<Line> all_streets_lines)\r\n {\r\n Line line1 = null;\r\n for (Street s : streets_list) {\r\n if (this.getStreetsMap().get(0).equals(s)) // highlight first street of line\r\n {\r\n int begin_stop_x = this.getStopsMap().get(0).getCoordinate().getX();\r\n int begin_stop_y = this.getStopsMap().get(0).getCoordinate().getY();\r\n\r\n Coordinate begin_street_1 = s.getCoordinates().get(0);\r\n Coordinate begin_street_2 = s.getCoordinates().get(2);\r\n\r\n Coordinate second_street_1 = this.getStreetsMap().get(1).getCoordinates().get(0);\r\n Coordinate second_street_2 = this.getStreetsMap().get(1).getCoordinates().get(2);\r\n\r\n if ((begin_street_1.getX() == second_street_1.getX() && begin_street_1.getY() == second_street_1.getY()) || (begin_street_1.getX() == second_street_2.getX() && begin_street_1.getY() == second_street_2.getY())) {\r\n line1 = new Line(begin_stop_x, begin_stop_y, begin_street_1.getX(), begin_street_1.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n } else if ((begin_street_2.getX() == second_street_1.getX() && begin_street_2.getY() == second_street_1.getY()) || (begin_street_2.getX() == second_street_2.getX() && begin_street_2.getY() == second_street_2.getY())) {\r\n line1 = new Line(begin_stop_x, begin_stop_y, begin_street_2.getX(), begin_street_2.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n }\r\n } else if (this.getStreetsMap().get(this.getStreetsMap().size() - 1).equals(s)) // end street of line\r\n {\r\n int end_stop_x = this.getStopsMap().get(this.getStopsMap().size() - 1).getCoordinate().getX();\r\n int end_stop_y = this.getStopsMap().get(this.getStopsMap().size() - 1).getCoordinate().getY();\r\n\r\n Coordinate end_street_1 = s.getCoordinates().get(0);\r\n Coordinate end_street_2 = s.getCoordinates().get(2);\r\n\r\n Coordinate nexttolast_street_1 = this.getStreetsMap().get(this.getStreetsMap().size() - 2).getCoordinates().get(0);\r\n Coordinate nexttolast_street_2 = this.getStreetsMap().get(this.getStreetsMap().size() - 2).getCoordinates().get(2);\r\n\r\n if ((end_street_1.getX() == nexttolast_street_1.getX() && end_street_1.getY() == nexttolast_street_1.getY()) || (end_street_1.getX() == nexttolast_street_2.getX() && end_street_1.getY() == nexttolast_street_2.getY())) {\r\n line1 = new Line(end_stop_x, end_stop_y, end_street_1.getX(), end_street_1.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n } else if ((end_street_2.getX() == nexttolast_street_1.getX() && end_street_2.getY() == nexttolast_street_1.getY()) || (end_street_2.getX() == nexttolast_street_2.getX() && end_street_2.getY() == nexttolast_street_2.getY())) {\r\n line1 = new Line(end_stop_x, end_stop_y, end_street_2.getX(), end_street_2.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n }\r\n } else if (this.getStreetsMap().contains(s)) { // highlight whole street from line\r\n s.highlightStreet(anchor_pane_map, all_streets_lines, this.getTransportLineColor());\r\n }\r\n }\r\n }", "public static void drawMap(Graphics g, int[][] grid){\n for(int i = 0; i < 480; i++)\n {\n for(int j = 0; j < 840; j++)\n {\n Color gray = new Color(grid[i][j] / 17, grid[i][j] / 17, grid[i][j] / 17);\n g.setColor(gray);\n \n g.drawRect(j, i, 1, 1);\n }\n }\n }", "private void drawStreetLines(final Graphics2D theGraphics,\n final int theX, final int theY) {\n \n final Paint oldPaint = theGraphics.getPaint();\n theGraphics.setPaint(Color.YELLOW);\n\n final int leftx = theX * SQUARE_SIZE;\n final int topy = theY * SQUARE_SIZE;\n final int centerx = leftx + SQUARE_SIZE / 2;\n final int centery = topy + SQUARE_SIZE / 2;\n final int rightx = leftx + SQUARE_SIZE;\n final int bottomy = topy + SQUARE_SIZE;\n\n if (isValidIndex(theY - 1, theX) && myGrid[theY - 1][theX] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, centerx, topy); // above\n }\n if (isValidIndex(theY + 1, theX) && myGrid[theY + 1][theX] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, centerx, bottomy); // below\n }\n if (isValidIndex(theY, theX - 1) && myGrid[theY][theX - 1] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, leftx, centery); // left\n }\n if (isValidIndex(theY, theX + 1) && myGrid[theY][theX + 1] == Terrain.STREET) {\n theGraphics.drawLine(centerx, centery, rightx, centery); // right\n }\n\n theGraphics.setPaint(oldPaint);\n }", "public void drawOnMapFragment(){\n if(!ifFieldTooBig()){\n isFreeDraw = true;\n mFreeDrawView.setVisibility(View.INVISIBLE);\n mFreeDrawView.cleanCanvas();\n drawPolygonWithMarker(mMapInterface.getPathFrame(), Color.WHITE);\n\n dronePath.findDronePath(mMapInterface.getPathFrame(), RESOLUTION);\n dronePath.drawRout(getDronePath(), googleMap, Color.GREEN);\n isPathReady=true;\n mMapInterface.setFullDronePath(getDronePath());\n Toast.makeText(getContext(), getString(R.string.edit_explain), Toast.LENGTH_LONG).show();\n }\n else{\n deletePath();\n }\n }", "public void draw(Canvas canvas, MapView mapv, boolean shadow){\n\t super.draw(canvas, mapv, shadow);\n\n\t // paint object to define the prefrences of the line to be drawn\n\t Paint mPaint = new Paint();\n\t mPaint.setDither(true);\n\t mPaint.setColor(Color.RED);\n\t mPaint.setStyle(Paint.Style.FILL_AND_STROKE);\n\t mPaint.setStrokeJoin(Paint.Join.ROUND);\n\t mPaint.setStrokeCap(Paint.Cap.ROUND);\n\t mPaint.setStrokeWidth(20);\n\n\t GeoPoint gP1 = goeP1;\n\t GeoPoint gP2 = geoP2;\n\n\t \n\t // the points the will represent the start and finish of the line.\n\t Point p1 = new Point();\n\t Point p2 = new Point();\n\n\t // path object the draw a reference path.\n\t Path path = new Path();\n // A projection object which converts between coordinates and pixels on the screen.\n\t Projection projection = mapv.getProjection();\n\t // converting of coordinates to pixel\n\t projection.toPixels(gP1, p1);\n\t projection.toPixels(gP2, p2);\n// draw a reference path\n\t path.moveTo(p2.x, p2.y);\n\t path.lineTo(p1.x,p1.y);\n// draw the actual path.\n\t canvas.drawPath(path, mPaint);\t\n\t }", "@Override\n\tprotected void paint2d(Graphics2D g) {\n\t\tdouble x = 0;//getX();\n\t\tdouble y = 0;//getY();\n\t\tfor (int i = 0; i < size() - 1; i++) {\n\t\t\tGPoint p1 = points.get(i);\n\t\t\tGPoint p2 = points.get(i + 1);\n\t\t\tdouble x0 = p1.getX() - x;\n\t\t\tdouble y0 = p1.getY() - y;\n\t\t\tdouble x1 = p2.getX() - x;\n\t\t\tdouble y1 = p2.getY() - y;\n\t\t\tg.drawLine(GMath.round(x0), GMath.round(y0),\n\t\t\t\t\tGMath.round(x1), GMath.round(y1));\n\t\t}\n\t}", "public void drawOnMap (char[][] roadMap) {\n int deltaX = 0;\n int deltaY = 0;\n int startX = 0;\n int startY = 0;\n /*\n * If there's no turn, pick an end and calculate the delta. To\n * avoid overwriting the intersections, reduce the delta by 1 and,\n * at the equality end (the initial i value in the loop) shift the\n * start by one for the same reason.\n */\n if (xTurn == -1) {\n startX = xOne;\n startY = yOne;\n deltaX = xTwo - xOne;\n deltaY = yTwo - yOne;\n if (deltaY == 0) {\n if (deltaX < 0) {\n deltaX += 1;\n } else {\n startX++;\n deltaX -= 1;\n }\n } else {\n if (deltaY < 0) {\n deltaY += 1;\n } else {\n startY++;\n deltaY -= 1;\n }\n }\n }\n /*\n * There's a turn. Our starting point will be the turn\n * coordinates. Calculate deltaX and deltaY. Here, we want to\n * overwrite the turn (offset of zero in the loops) and reduce\n * delta to avoid overwriting the intersections at each end.\n */\n else {\n startX = xTurn;\n startY = yTurn;\n if (startX == xOne) {\n deltaX = xTwo - startX;\n deltaY = yOne - startY;\n } else {\n deltaX = xOne - startX;\n deltaY = yTwo - startY;\n }\n if (deltaX < 0) {\n deltaX++;\n }\n if (deltaY < 0) {\n deltaY++;\n }\n }\n /*\n * Now we can run two loops to fill in the necessary chars.\n */\n if (deltaX != 0) {\n for (int i = Math.min(deltaX,0) ; i < Math.max(deltaX,0) ; i++) {\n roadMap[startY][startX + i] = '*';\n }\n }\n if (deltaY != 0) {\n for (int i = Math.min(deltaY,0) ; i < Math.max(deltaY,0) ; i++) {\n roadMap[startY + i][startX] = '*';\n }\n }\n /*\n * Blind spot: in the case where both deltaX and deltaY are\n * counting back toward the turn, an offset of zero, and not quite\n * getting there.\n */\n if (deltaX < 0 && deltaY < 0) roadMap[startY][startX] = '*';\n }", "public void paintItem(Graphics2D g, \n int ulx, int uly, \n int lrx, int lry) {\n if (!canPaint()) {\n return;\n }\n boolean any = true;\n int i = 0,j = 0;\n Color repcolor = colors.getColor(getLabel());\n int startindex = data.baseToIndex(getRegion().getStart());\n int endindex = data.baseToIndex(getRegion().getEnd());\n\n g.setColor(Color.BLACK);\n while (any || (j == 0)) {\n g.setColor(repcolor);\n repcolor = repcolor.darker();\n any = false;\n int lastx = -1;\n int lasty = -1;\n int lasti = -1;\n for (i = startindex; i < endindex; i++) {\n if (j >= data.getReplicates(i)) {lasti = -1; continue;}\n any = true;\n double maxratio;\n if (getProperties().MaxRatio > 0) {\n maxratio = getProperties().MaxRatio;\n } else {\n maxratio = scale.getMaxVal();\n }\n int x = getXPos(data.getPos(i),\n getRegion().getStart(), getRegion().getEnd(),\n ulx,lrx);\n int y = getYPos(data.getValue(i,j),\n 0, maxratio,\n uly,lry,props.RatiosOnLogScale);\n paintDatapointAt(g,x,y,i,j);\n// System.err.println(\"Painting (\" + i + \"=\" + data.getPos(i) + \",\" + j +\n// \")=\" + data.getValue(i,j) + \" -> (\" + x + \",\"+y+\") lastx=\" +\n// lastx +\" lasty=\" + lasty + \" lasti=\" + lasti);\n if ((lasti != -1) && \n (Math.abs(data.getPos(i) - data.getPos(lasti)) < 500)) {\n connectDatapoints(g,lastx,lasty,x,y);\n }\n lastx = x;\n lasty = y;\n lasti = i;\n }\n j++;\n }\n if (props.DrawTrackLabel) {\n g.setColor(Color.BLACK);\n g.setFont(attrib.getLargeLabelFont(lrx - ulx,lry - uly));\n g.drawString(getLabel(),ulx,uly + g.getFont().getSize() * 2);\n }\n }", "public void repaintMap() {\r\n\t\tpolygonMap.repaint();\r\n\t}", "public void drawGrid(Graphics2D g, int width, int height, double minX,\n double minY, double maxX, double maxY) {\n g.setColor(Color.BLACK);\n Color gridC; //= new Color(Color.white.getRGB() - BackgroundColor.getRGB());\n Color LightGridC;\n double lumin = BackgroundColor.getRed() * 0.2126 + BackgroundColor.getGreen() * 0.7152\n + BackgroundColor.getBlue() * 0.0722;\n if (lumin > 255 / 2d) {\n gridC = Color.black;\n LightGridC = Color.GRAY;\n } else {\n gridC = Color.white;\n LightGridC = Color.lightGray;\n }\n g.setColor(gridC);\n upperX = maxX;\n lowerX = minX;\n\n upperY = maxY;\n lowerY = minY;\n //debug, drawLine bounds\n// g.drawLine(XOffSet, YOffSet, width, YOffSet);\n// g.drawLine(XOffSet, height, width, height); //X\n//\n// g.drawLine(XOffSet, YOffSet, XOffSet, height);\n// g.drawLine(width, YOffSet, width, height); //Y\n // g.drawLine(30, YOffSet, 30, 0);\n //g.drawLine(XOffSet, 30, 0, 30);\n double Xscale = GetXScale(width);\n double Yscale = GetYScale(height);\n int centerX = getCenterX(width);\n int centerY = getCenterY(height);//-lowerY*Yscale);\n\n // drawLine axis\n g.drawLine(XOffSet, centerY, width, centerY); //X axis\n g.drawLine(centerX, YOffSet, centerX, height); //Y axis\n\n\n //draws grid, numbers and increment lines\n int fontSizeX = (width / (increments * 4));\n int fontSizeY = (height / increments);\n if (fontSizeX > 15) {\n fontSizeX = 15;\n }\n if (fontSizeY > 15) {\n fontSizeY = 15;\n }\n //x-axis\n int t = (int) ((width) * 0.01);\n g.setFont(new Font(\"MonoType\", Font.PLAIN, (fontSizeX)));\n FontMetrics font = g.getFontMetrics();\n for (double i = XOffSet; i <= width; i += ((width - XOffSet) / increments)) {\n if (t == 0) {\n t = 1;\n }\n if (showGrid && i != centerX) {\n g.setColor(LightGridC);\n g.drawLine((int) i, YOffSet, (int) i, height);\n g.setColor(gridC);\n }\n if (showScale) {\n g.drawLine((int) i, (centerY + t), (int) i, (centerY - t));\n }\n\n if (showNumbers) {\n double d = Math.round(100 * ((((width - XOffSet) / Xscale) / (upperX - lowerX)\n * (((i - XOffSet) / Xscale))) + lowerX));\n String o = Double.toString(\n d / 100);\n int textWidth = font.stringWidth(o);\n g.drawString(o, (int) i - textWidth / 2, (centerY + t + font.getHeight()));\n }\n }\n //y axis\n t = (int) (height * 0.01);\n g.setFont(new Font(\"MonoType\", Font.PLAIN, (fontSizeY)));\n font = g.getFontMetrics();\n for (double i = YOffSet; i <= height; i += ((height - YOffSet) / increments)) {\n if (t == 0) {\n t = 1;\n }\n if (showGrid && i != centerY) {\n g.setColor(LightGridC);\n g.drawLine(XOffSet, (int) i, width, (int) i);\n g.setColor(gridC);\n }\n if (showScale) {\n g.drawLine(centerX - t, (int) i, centerX + t, (int) i);\n }\n\n if (showNumbers) {\n double d = Math.round(100 * ((((upperY - lowerY) / ((height - YOffSet) / Yscale)\n * (height - (i)) / Yscale) + lowerY)));\n String o = Double.toString(\n d / 100);\n int textWidth = font.stringWidth(o);\n g.drawString(o, centerX - t - textWidth,\n (int) ((i + font.getHeight() / 2)));\n }\n }\n }", "public void drawMap(ObservableList<Node> root, int scale) {\n\t\tfor (int x=0; x<dimensions; x++) {\n\t\t\tfor (int y=0; y<dimensions; y++) {\n\t\t\t\tRectangle rect = new Rectangle(x*scale, y*scale, scale, scale);\n\t\t\t\trect.setStroke(Color.BLACK);\n\t\t\t\trect.setFill(Color.LIGHTSKYBLUE);\n\t\t\t\troot.add(rect);\n\t\t\t\toceanGrid[x][y] = 0; //empty square\n\t\t\t}\n\t\t}\n\t}", "private void setMapSlopes(){\n\t\tMapObjects mapSlopes = map.getLayers().get(\"SLOPES\").getObjects();\n\t\tfor (int ii = 0; ii < mapSlopes.getCount(); ++ii){\n\t\t\tRectangleMapObject mapSlope = (RectangleMapObject) mapSlopes.get(ii);\n\t\t\tslopes.add(new Rectangle(mapSlope.getRectangle()));\n\t\t}\n\t}", "public void drawArea(Graphics2D g, int width, int height, double minX,\n double minY, double maxX, double maxY) {\n upperX = maxX;\n lowerX = minX;\n\n upperY = maxY;\n lowerY = minY;\n //debug, drawLine bounds\n// g.drawLine(XOffSet, YOffSet, width, YOffSet);\n// g.drawLine(XOffSet, height, width, height); //X\n//\n// g.drawLine(XOffSet, YOffSet, XOffSet, height);\n// g.drawLine(width, YOffSet, width, height); //Y\n\n double Xscale = GetXScale(width);\n double Yscale = GetYScale(height);\n int centerX = getCenterX(width);\n int centerY = getCenterY(height);\n\n //drawGrid(g, width, height, minX, minY, maxX, maxY);\n\n //create a polygon for every area between two zeros\n g.setColor(LineColor);\n //ArrayList<Polygon> p = new ArrayList<>();\n Polygon p = new Polygon();\n //p.add(new Polygon());\n g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,\n Opacity));\n //p.get(0).addPoint(XOffSet, getCenterY(height));\n p.addPoint(XOffSet, getCenterY(height));\n for (int i = 0; i <= PointArray.length - 2; i += 2) {\n double x = ((PointArray[i] * Xscale) + centerX);\n double y = ((centerY) - (PointArray[i + 1]) * Yscale);\n if (x == Double.POSITIVE_INFINITY || x == Double.NEGATIVE_INFINITY) {\n continue;\n }\n if (y == Double.POSITIVE_INFINITY || y == Double.NEGATIVE_INFINITY) {\n y = height - YOffSet;\n }\n //p.get(p.size() - 1).addPoint((int) x, (int) y);\n p.addPoint((int) x, (int) y);\n }\n //p.get(p.size() - 1).addPoint(width, getCenterY(height));\n p.addPoint(width, getCenterY(height));\n //for (int i = 0; i <= p.size() - 1; i++) {\n g.fill(p);//.get(i));\n //}\n g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1));\n drawLine(g, width, height, minX, minY, maxX, maxY);\n }", "@Override\r\n protected void onDraw(Canvas canvas) {\r\n super.onDraw(canvas);\r\n try {\r\n int x = 0, y = 0;\r\n int width = ScreenWidth / MatrixWidth;//width its Screen width div to matrix width\r\n int hight = ScreenHeight / MatrixHeight;//height its Screen height div to matrix height\r\n canvas.drawARGB(255, 30, 30, 30);\r\n for (int i = 0; i < map.length; i++) {\r\n x = 0;\r\n for (int j = 0; j < map[i].length; j++, x += width) {\r\n if (i == 0 && j < 3) {\r\n Rect dst = new Rect(x, y, x + width, y + hight);//dest its rectangle that can draw on screen according to x,y\r\n canvas.drawBitmap(this.blockList.getBlock(1, i, j).getBlock(), this.blockList.getBlock(1, i, j).getSrc(), dst, null);\r\n }\r\n if (map[i][j] != '0') {\r\n int type = Integer.valueOf(String.valueOf(map[i][j]));//change type char to int\r\n Rect dst = new Rect(x, y, x + width, y + hight);//dest its rectangle that can draw on screen according to x,y\r\n canvas.drawBitmap(this.blockList.getBlock(type, i, j).getBlock(), this.blockList.getBlock(type, i, j).getSrc(), dst, null);\r\n }\r\n }\r\n y += hight;\r\n }\r\n FinishTheGame();\r\n }catch (NullPointerException e){\r\n\r\n }\r\n }", "protected void paintComponent(Graphics g) {\r\n super.paintComponent(g);\r\n Graphics2D g2 = (Graphics2D)g;\r\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n int w = getWidth();\r\n int h = getHeight();\r\n // Draw ordinate.\r\n g2.draw(new Line2D.Double(Points, Points, Points, h-Points));\r\n // Draw abcissa.\r\n g2.draw(new Line2D.Double(Points, h-Points, w-Points, h-Points));\r\n // Draw labels.\r\n Font font = g2.getFont();\r\n FontRenderContext frc = g2.getFontRenderContext();\r\n LineMetrics lm = font.getLineMetrics(\"0\", frc);\r\n float sh = lm.getAscent() + lm.getDescent();\r\n // Ordinate label.\r\n String s = \"Strecke\";\r\n float sy = Points + ((h - 2*Points) - s.length()*sh)/2 + lm.getAscent();\r\n for(int i = 0; i < s.length(); i++) {\r\n String letter = String.valueOf(s.charAt(i));\r\n float sw = (float)font.getStringBounds(letter, frc).getWidth();\r\n float sx = (Points - sw)/2;\r\n g2.drawString(letter, sx, sy);\r\n sy += sh;\r\n }\r\n // Abcissa label.\r\n s = \"Datum\";\r\n sy = h - Points + (Points - sh)/2 + lm.getAscent();\r\n float sw = (float)font.getStringBounds(s, frc).getWidth();\r\n float sx = (w - sw)/2;\r\n g2.drawString(s, sx, sy);\r\n // Draw lines.\r\n double xInc = (double)(w - 2*Points)/(data.length-1);\r\n double scale = (double)(h - 2*Points)/getMax();\r\n g2.setPaint(Color.green.darker());\r\n for(int i = 0; i < data.length-1; i++) {\r\n double x1 = Points + i*xInc;\r\n double y1 = h - Points - scale*data[i];\r\n double x2 = Points + (i+1)*xInc;\r\n double y2 = h - Points - scale*data[i+1];\r\n g2.draw(new Line2D.Double(x1, y1, x2, y2));\r\n }\r\n // Mark data points.\r\n g2.setPaint(Color.red);\r\n for(int i = 0; i < data.length; i++) {\r\n double x = Points + i*xInc;\r\n double y = h - Points - scale*data[i];\r\n g2.fill(new Ellipse2D.Double(x-2, y-2, 4, 4));\r\n }\r\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }", "public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }", "private void routeDrawing(Location location) {\n\n // validity check in case the first point does not have a previous point\n if (previousLocation == null) {\n // copy the current location to the previous point\n previousLocation = location;\n }\n double lat = location.getLatitude();\n double lon = location.getLongitude();\n\n latitude = lat;\n longitude = lon;\n latList.add(latitude);\n lonList.add(longitude);\n\n // previous coordinates\n //System.out.println(\"previous Location: \" + previousLocation.getLatitude() + \" \" + previousLocation.getLongitude());\n // current coordinates\n //System.out.println(\"Current Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n\n // Polyline Options differ from\n PolylineOptions lineOptions = new PolylineOptions();\n // set the option of each part of polyline\n // 0.03 is the location update interval also the drawing interval\n vdraw = (GetDistance(previousLocation.getLatitude(), previousLocation.getLongitude(), location.getLatitude(), location.getLongitude()))/0.3;\n System.out.println(\"vdraw: \"+vdraw);\n if (vdraw<0.01){\n\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.slow))\n .width(30);\n System.out.print(\"I am running slow\");\n }\n if (vdraw>=0.008 && vdraw<=0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.commen))\n .width(30);\n System.out.print(\"I am running normally\");\n }\n if (vdraw>0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.fast))\n .width(30);\n System.out.print(\"I am running fast\");\n }\n\n // add the polyline to the map\n Polyline partOfRunningRoute = mMap.addPolyline(lineOptions);\n // set the zindex so that the poly line stays on top of my tile overlays\n partOfRunningRoute.setZIndex(1000);\n // add the poly line to the array so they can all be removed if necessary\n runningRoute.add(partOfRunningRoute);\n // add the latlng from this point to the array\n points.add(location);\n // store current location as previous location in the end\n previousLocation = location;\n }", "public void draw() {\n final int columns = (int) (2 * Math.ceil(Math.max(-minx, maxx)));\n final int rows = (int) (2 * Math.ceil(Math.max(-miny, maxy)));\n\n final int drawColumns;\n final int drawRows;\n drawColumns = drawRows = Math.max(columns, rows);\n\n double leftOffsetPx = BORDER;\n double rightOffsetPx = BORDER;\n double topOffsetPx = BORDER;\n double bottomOffsetPx = BORDER;\n\n final double availableWidth = view.getWidth() - leftOffsetPx - rightOffsetPx;\n final double availableHeight = view.getHeight() - topOffsetPx - bottomOffsetPx;\n\n final double drawWidth;\n final double drawHeight;\n drawWidth = drawHeight = Math.min(availableWidth, availableHeight);\n\n leftOffsetPx = rightOffsetPx = (view.getWidth() - drawWidth) / 2;\n topOffsetPx = bottomOffsetPx = (view.getHeight() - drawHeight) / 2;\n\n // Adjust for aspect ratio\n columnWidth = rowHeight = drawHeight / columns;\n\n centerX = (drawColumns / 2.0) * columnWidth + leftOffsetPx;\n centerY = (drawRows / 2.0) * rowHeight + topOffsetPx;\n\n drawVerticalLine((float) centerX, topOffsetPx, bottomOffsetPx);\n drawHorizontalLine((float) centerY, leftOffsetPx, rightOffsetPx);\n\n int yTick = (int) (-drawRows / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (yTick <= drawRows / 2.0) {\n if (yTick != 0) {\n final String label = yTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", yTick) : null;\n drawYTick(-yTick * rowHeight + centerY, centerX, label);\n }\n yTick += TICK_INTERVAL;\n }\n\n int xTick = (int) (-drawColumns / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (xTick <= drawColumns / 2.0) {\n if (xTick != 0) {\n final String label = xTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", xTick) : null;\n drawXTick(xTick * columnWidth + centerX, centerY, label);\n }\n xTick += TICK_INTERVAL;\n }\n\n double adaptiveTextSize = getAdaptiveTextSize();\n\n final Paint paint = new Paint();\n final float textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, (float)adaptiveTextSize, view.getResources().getDisplayMetrics());\n paint.setTextSize(textSize);\n paint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL));\n for (Entry entry : data.getEntries()) {\n final double x = entry.getX();\n final double y = entry.getY();\n\n final double xDraw = x * columnWidth + centerX;\n final double yDraw = -y * rowHeight + centerY;\n\n CharSequence dispStr = entry.getStringLabel();\n if (dispStr == null) {\n dispStr = String.format(\"%.0f\", entry.getValue());\n }\n\n\n\n\n Rect bounds = getTextRectBounds(dispStr, paint);\n int textHeight = bounds.height();\n int textWidth = bounds.width();\n canvas.drawText(dispStr, 0, dispStr.length(),\n (float) xDraw - textWidth * 0.5f, (float) yDraw + textHeight * 0.5f,\n paint);\n }\n\n }", "@Override\n protected void onDraw(Canvas canvas) {\n // draw background screen\n canvas.drawBitmap(mBitmap, 0, 0, mPaintScreen);\n\n // draw line for each path\n for( Integer key : pathMap.keySet() ){\n canvas.drawPath(pathMap.get(key), mPaintLine);\n }\n }", "@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}", "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 }", "public void paintStation(StationStatus status) {\n mapBounds = status.getBounds();\n if (mapBounds.getHeight() < MIN_HEIGHT) {\n mapBounds = new Rectangle2D.Double(mapBounds.getX(), mapBounds.getCenterY() - MIN_HEIGHT / 2, mapBounds.getWidth(), MIN_HEIGHT);\n }\n if (mapBounds.getWidth() < MIN_WIDTH) {\n mapBounds = new Rectangle2D.Double(mapBounds.getCenterX() - MIN_WIDTH / 2, mapBounds.getY(), MIN_WIDTH, mapBounds.getHeight());\n }\n Collection<? extends Edge> edges = status.getStationMap().getEdges().values();\n Consumer<Graphics2D> redPainters = edges.stream()\n .filter(e -> status.getSection(e).isEmpty())\n .map(edge -> createLinePainter(edge, TRACK_STROKE, false))\n .reduce(Consumer::andThen)\n .orElse(NONE_PAINTER);\n Consumer<Graphics2D> greenPainters = edges.stream()\n .filter(e -> status.getSection(e).isPresent())\n .map(edge -> createLinePainter(edge, TRACK_STROKE, true))\n .reduce(Consumer::andThen)\n .orElse(NONE_PAINTER);\n Consumer<Graphics2D> trainPainters = Painters.createLineTrainPainters(status);\n\n painter = redPainters\n .andThen(greenPainters)\n .andThen(trainPainters);\n repaint();\n }", "public void drawPolyLineOnMap(GoogleMap googleMap, GPS gps)\n {\n int BOUND_PADDING = 100;\n\n PolylineOptions polyOptions = new PolylineOptions();\n polyOptions.color(Color.RED);\n polyOptions.width(5);\n\n polyOptions.addAll(gps.getLatitudeLongitude());\n\n googleMap.clear();\n googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n //googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n //googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n googleMap.addPolyline(polyOptions);\n\n googleMap.addMarker(new MarkerOptions().position(gps.getLatitudeLongitude().get(0)).title(\"Start\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\n googleMap.addMarker(new MarkerOptions().position(gps.getLatitudeLongitude().get(gps.getLatitudeLongitude().size()-1)).title(\"End\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));\n\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (LatLng latLng : gps.getLatitudeLongitude())\n {\n builder.include(latLng);\n }\n\n final LatLngBounds bounds = builder.build();\n\n //BOUND_PADDING is an int to specify padding of bound.. try 100.\n //mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, BOUND_PADDING);\n\n googleMap.animateCamera(cu);\n }", "@Override\r\n public final void draw(final Rectangle r, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(r.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(r.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(r.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(r.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(r.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(r.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(r.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n\r\n draw(new Line((String.valueOf(r.getxSus())), String.valueOf(r.getySus()),\r\n String.valueOf(r.getxSus() + r.getLungime() - 1), String.valueOf(r.getySus()),\r\n color, String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus()), String.valueOf(r.getxSus() + r.getLungime() - 1),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus())),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus()), color, String.valueOf(r.getBorderColor().getAlpha()),\r\n paper), paper);\r\n\r\n for (int i = r.getxSus() + 1; i < r.getxSus() + r.getLungime() - 1; i++) {\r\n for (int j = r.getySus() + 1; j < r.getySus() + r.getInaltime() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, r.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n }", "@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }", "private void render() {\n if (drawingArea != null) {\n //get graphics of the image where coordinate and function will be drawn\n Graphics g = drawingArea.getGraphics();\n\n //draw the x-axis and y-axis\n g.drawLine(0, originY, width, originY);\n g.drawLine(originX, 0, originX, height);\n\n //print numbers on the x-axis and y-axis, based on the scale\n for (int i = 0; i < lengthX; i++) {\n g.drawString(Integer.toString(i), (int) (originX + (i * scaleX)), originY);\n g.drawString(Integer.toString(-1 * i), (int) (originX + (-i * scaleX)), originY);\n }\n for (int i = 0; i < lengthY; i++) {\n g.drawString(Integer.toString(-1 * i), originX, (int) (originY + (i * scaleY)));\n g.drawString(Integer.toString(i), originX, (int) (originY + (-i * scaleY)));\n }\n\n // draw the lines\n for (int i = 0; i < points1.size() - 1; i++) {\n g.setColor(Color.BLACK);\n g.drawLine((int) (originX + points1.get(i).x * scaleX), (int) (originY - points1.get(i).y * scaleY),\n (int) (originX + points1.get(i + 1).x * scaleX), (int) (originY - points1.get(i + 1).y * scaleY));\n g.setColor(Color.RED);\n g.drawLine((int) (originX + points2.get(i).x * scaleX), (int) (originY - points2.get(i).y * scaleY),\n (int) (originX + points2.get(i + 1).x * scaleX), (int) (originY - points2.get(i + 1).y * scaleY));\n }\n }\n }", "@Override\n public void draw(GraphicsContext gc){\n for(int i = 1; i < path.size(); i++) {\n Point2D from = path.get(i-1);\n Point2D to = path.get(i);\n gc.strokeLine(from.getX(), from.getY(), to.getX(), to.getY());\n }\n }", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.setFont(numFont);\n\n\t\tif (param.showaxis) {\n\t\t\t// pixels\n\t\t\tint actualcenterx = (int) math.Math.scale(0, param.minx, param.maxx, 0, getWidth());\n\t\t\tint actualcentery = (int) math.Math.scale(0, param.miny, param.maxy, getHeight(), 0);\n\n\t\t\tg.drawLine(actualcenterx, 0, actualcenterx, getHeight());\n\t\t\tg.drawLine(0, actualcentery, getWidth(), actualcentery);\n\t\t\tg.drawString(0 + \"\", actualcenterx - xoffset, actualcentery + yoffset);\n\n\t\t\tg.drawString(param.maxx + \"\", getWidth() - xoffset * (param.maxx + \"\").length(), actualcentery + yoffset);\n\t\t\tg.drawString(param.minx + \"\", 0, actualcentery + yoffset);\n\t\t\tg.drawString(param.maxy + \"\", actualcenterx - xoffset * (param.maxy + \"\").length(), yoffset);\n\t\t\tg.drawString(param.miny + \"\", actualcenterx - xoffset * (param.miny + \"\").length(), getHeight() - yoffset);\n\t\t}\n\n\t\tfor (UIPointSet pointSet : pointSets) {\n\n\t\t\tint prevpx = 0, prevpy = 0;\n\t\t\tfor (int i = 0; i < pointSet.getPoints().length; i++) {\n\n\t\t\t\tdouble[] point = pointSet.getPoints()[i];\n\t\t\t\t// pixels\n\t\t\t\tint px = (int) math.Math.scale(point[0], param.minx, param.maxx, 0, getWidth());\n\t\t\t\tint py = (int) math.Math.scale(point[1], param.miny, param.maxy, getHeight(), 0);\n\n\t\t\t\tif (pointSet.getPointColor() != null) {\n\t\t\t\t\tint pointWidth = 10;\n\t\t\t\t\tg.setColor(pointSet.getPointColor());\n\t\t\t\t\tg.fillOval(px - pointWidth / 2, py - pointWidth / 2, pointWidth, pointWidth);\n\t\t\t\t}\n\n\t\t\t\tif (pointSet.getLineColor() != null && i > 0) {// if (Math.abs(y2 - y) < (getHeight())) {\n\t\t\t\t\tg.setColor(pointSet.getLineColor());\n\t\t\t\t\tg.drawLine(prevpx, prevpy, px, py);\n\t\t\t\t\tfor (int ii = 1; ii < 2; ii++) {\n\t\t\t\t\t\tg.drawLine(prevpx, prevpy - ii, px, py - ii);\n\t\t\t\t\t\tg.drawLine(prevpx, prevpy + ii, px, py + ii);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprevpx = px;\n\t\t\t\tprevpy = py;\n\n\t\t\t}\n\t\t}\n\n\t\tfor (PointBox bx : savedBoxes) {\n\t\t\tbx.updatePixCoordinate();\n\t\t\tg.setColor(bx.pointSet.getPointColor());\n\t\t\tbx.paint(g, clickingmBox && mBox.equals(bx), false);\n\t\t}\n\t\tif (showmBox) {\n\t\t\tint index = savedBoxes.indexOf(mBox);\n\t\t\tg.setColor(mBox.pointSet.getPointColor());\n\t\t\tif (index < 0) {\n\t\t\t\tmBox.paint(g, clickingmBox, false);\n\t\t\t} else {\n\t\t\t\tsavedBoxes.get(index).paint(g, clickingmBox, true);\n\t\t\t}\n\t\t\t// now draw the box (top left)\n\t\t\tint corneroffset = 10;\n\t\t\tString eqS = \"y = \" + mBox.pointSet.getTitle();\n\t\t\tString fnumS = pointSets.indexOf(mBox.pointSet) + \"\";\n\n\t\t\tint boxx = corneroffset + 10;\n\t\t\tint boxy = corneroffset;\n\t\t\tint boxw = eqS.length() * (xoffset - 4) + 8 + corneroffset;\n\t\t\tint boxh = yoffset + corneroffset;\n\n\t\t\tg.clearRect(boxx, boxy, boxw, boxh);\n\n\t\t\tg.drawString(eqS, xoffset + corneroffset, yoffset + corneroffset);\n\n\t\t\tg.setFont(subFont);\n\t\t\tg.drawString(fnumS, xoffset * 2 + corneroffset, (yoffset * 4 / 3) + corneroffset);\n\n\t\t\tg.drawRect(boxx, boxy, boxw, boxh);\n\n\t\t}\n\t}", "public void drawMap(ArrayList<Entity> entities){\n\t\t//draw map\n\t\tmap.draw(graphics, entities);\n\t}", "public void mouseExited(MouseEvent e) {\n if (e.getSource() instanceof MapBean) {\n // erase the old line first\n paintRubberband(rPoint1, rPoint2);\n // set the second point to null so that a new line will be\n // re-drawn if the mouse comes back, and the line will use\n // the old starting point.\n rPoint2 = null;\n }\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(map.getImage(), mapX, mapY, mapWidth, mapHeight, null);\n //draw hexagon\n for (int j = 0; j < BOARD_HEIGHT; j++) {\n for (int i = 0; i < BOARD_WIDTH; i++) {\n gridCell.setCellIndex(i, j);\n if (mapCells[j][i] != 0) {\n gridCell.computeCorners(mCornersX, mCornersY);\n// g.setColor((mapCells[j][i] == L_ON) ? Color.ORANGE : Color.GRAY);\n// g.fillPolygon(mCornersX, mCornersY, NUM_HEX_CORNERS);\n g.drawPolygon(mCornersX, mCornersY, NUM_HEX_CORNERS);\n }\n }\n }\n }", "private void drawLineSeg(int entryNum, GPoint from, GPoint to) {\n\t\tGLine line = new GLine(from.getX(), from.getY(),\n\t\t\t\t\t\t\t to.getX(), to.getY());\n\t\tline.setColor(getColor(entryNum));\n\t\tadd(line);\n\t}", "@Override\n public void paintComponent(Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setStroke(new BasicStroke(WALL));\n int[] xs = {BORDER + WALL, BORDER, BORDER, BORDER + (width-1)*SIZE + WALL};\n int[] ys = {BORDER, BORDER, BORDER + height*SIZE, BORDER + height*SIZE};\n g2.drawPolyline(xs, ys, 4);\n int[] xs2 = {BORDER + SIZE - WALL, BORDER + width*SIZE, BORDER + width*SIZE, BORDER + width*SIZE - WALL};\n g2.drawPolyline(xs2, ys, 4);\n // code that was used to create the intermediate images\n// g2.setColor(Color.LIGHT_GRAY);\n// for(int i = 1; i < height; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(BORDER + WALL, where, BORDER + width * SIZE - WALL, where);\n// }\n// for(int i = 1; i < width; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(where, BORDER + WALL, where, BORDER + height * SIZE - WALL);\n// }\n g2.setColor(Color.blue);\n for(Wall wall : walls) {\n drawWall(g2, wall);\n }\n }", "private void drawRoute(LatLng prevCoords, LatLng curCoords) {\n\n if(!isRequiredMetersComplete()){\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.colorPrimary)));\n }\n else{\n if(isOverPace){\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.goodGreen)));\n }else{\n map.addPolyline(new PolylineOptions()\n .add(prevCoords, curCoords)\n .width(10)\n .color(getResources().getColor(R.color.badRed)));\n }\n }\n }", "private void drawWaypoints() {\r\n\t\tint x1 = (width - SIZE_X) / 2;\r\n\t\tint y1 = (height - SIZE_Y) / 2;\r\n\r\n\t\tfloat scissorFactor = (float) _resolutionResolver.getScaleFactor() / 2.0f;\r\n\r\n\t\tint glLeft = (int) ((x1 + 10) * 2.0f * scissorFactor);\r\n\t\tint glWidth = (int) ((SIZE_X - (10 + 25)) * 2.0f * scissorFactor);\r\n\t\tint gluBottom = (int) ((this.height - y1 - SIZE_Y) * 2.0f * scissorFactor);\r\n\t\tint glHeight = (int) ((SIZE_Y) * 2.0f * scissorFactor);\r\n\r\n\t\tGL11.glEnable(GL11.GL_SCISSOR_TEST);\r\n\t\tGL11.glScissor(glLeft, gluBottom, glWidth, glHeight);\r\n\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glScalef(_textScale, _textScale, _textScale);\r\n\r\n\t\t_startCell = getStartCell();\r\n\t\t_cellStartX = (int) (((float) x1 + (float) 13) / _textScale);\r\n\t\t_cellStartY = (int) (((float) y1 + (float) 22) / _textScale);\r\n\r\n\t\tint x2 = _cellStartX;\r\n\t\tint y2 = _cellStartY + (int) ((float) 0 * (float) CELL_SIZE_Y / _textScale);\r\n\r\n\t\tImmutableList<UltraTeleportWaypoint> list = UltraTeleportWaypoint.getWaypoints();\r\n\t\tfor (int i = 0; i < 2; ++i) {\r\n \t\tfor (int j = 0; j < list.size() && j < MAX_CELL_COUNT; ++j) {\r\n\r\n \t\t\tint x = _cellStartX;\r\n \t\t\tint y = _cellStartY + (int) ((float) j * (float) CELL_SIZE_Y / _textScale);\r\n\r\n \t\t\tdouble posX = list.get(j + _startCell).getPos().getX();\r\n \t\t\tdouble posY = list.get(j + _startCell).getPos().getY();\r\n \t\t\tdouble posZ = list.get(j + _startCell).getPos().getZ();\r\n\r\n \t\t\tString strX = String.format(\"x: %4.1f\", posX);\r\n \t\t\tString strY = String.format(\"y: %4.1f\", posY);\r\n \t\t\tString strZ = String.format(\"z: %4.1f\", posZ);\r\n \t\t\tString text = strX + \" \" + strY + \" \" + strZ;\r\n\r\n \t\t\tif (i == 0) {\r\n \t\t\t this.fontRendererObj.drawStringWithShadow(text, x + 18, y, list.get(j).getColor());\r\n\r\n \t\t\t boolean selected = j + _startCell < _selectedList.size() ? _selectedList.get(j + _startCell) : false;\r\n\r\n \t\t\t GL11.glPushMatrix();\r\n GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);\r\n \t\t\t this.mc.renderEngine.bindTexture(selected ? BUTTON_ON_RESOURCE : BUTTON_OFF_RESOURCE);\r\n \t\t\t HubbyUtils.drawTexturedRectHelper(0, x + CELL_SIZE_X + 18, y - 3, 16, 16, 0, 0, 256, 256);\r\n \t\t\t GL11.glPopMatrix();\r\n \t\t\t}\r\n \t\t\telse if (i == 1) {\r\n \t\t\t\tBlockPos pos = new BlockPos((int)posX, (int)posY - 1, (int)posZ);\r\n \t\t\t Block block = Minecraft.getMinecraft().theWorld.getBlockState(pos).getBlock();\r\n \t\t\tif (block != null) {\r\n \t\t\t Item itemToRender = Item.getItemFromBlock(block);\r\n \t\t\t itemToRender = itemToRender != null ? itemToRender : Item.getItemFromBlock((Block)Block.blockRegistry.getObjectById(3));\r\n \t\t\t ItemStack is = new ItemStack(itemToRender, 1, 0);\r\n \t\t\t _itemRender.renderItemAndEffectIntoGUI(is, x - 1, y - 3);\r\n \t _itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, is, x - 1, y - 3, \"\"); // TODO: is the last param correct?\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t}\r\n\r\n\t\tGL11.glPopMatrix();\r\n\t\tGL11.glDisable(GL11.GL_SCISSOR_TEST);\r\n\t}", "private void drawMap( Graphics2D g2 )\r\n {\r\n MobilityMap map = sim.getMap();\r\n \r\n /* Draw map nodes and their links */\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n for( int i=0; i < numNodes; i++ )\r\n {\r\n MapNode node = map.getNodeAt(i);\r\n Point2D.Double nodeLoc = node.getLocation();\r\n \r\n // Draw the node\r\n drawCircle( g2, nodeLoc, MAP_NODE_COLOUR, MAP_NODE_RADIUS, false );\r\n \r\n // Draw the node's links\r\n int numLinks = node.getNumberOfLinks();\r\n for( int j=0; j < numLinks; j++ )\r\n {\r\n MapNode destNode = node.getLinkAt(j).getGoesTo();\r\n Point2D.Double destNodeLoc = destNode.getLocation();\r\n drawLine( g2, nodeLoc, destNodeLoc, MAP_LINK_COLOUR );\r\n }\r\n }\r\n }", "public void renderLine (Graphics g)\r\n {\r\n if (glyph.getContourBox()\r\n .intersects(g.getClipBounds())) {\r\n getLine(); // To make sure the line has been computed\r\n\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStart(),\r\n (int) Math.rint(line.yAt((double) getStart()))),\r\n null);\r\n Point stop = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStop() + 1,\r\n (int) Math.rint(line.yAt((double) getStop() + 1))),\r\n null);\r\n g.drawLine(start.x, start.y, stop.x, stop.y);\r\n }\r\n }", "protected void drawBounds(Graphics page)\n\t{\n\n\t}", "private void plotEntries() {\n\t\tfor (int i = 0; i < entries.size(); i++) {\n\t\t\tdrawLine(i);\n\t\t}\n\t}", "private void drawLengthsOverlay(Graphics2D g2){\n\t\tFont font = new Font(\"default\", Font.BOLD, (int) (14));\n\t\tg2.setFont(new Font(\"default\", Font.BOLD, (int) (14)));\n\t\tint length_vert_spacing = getVerticalSpacing();\n\t\t// Get some useful coordinate values.\n\t\tint startX = toScaledX(0);\n\t\tint startY = toScaledY(0);\n\t\tif (!isBeforeObstacle()) {\n\t\t\tstartX = toScaledX(getDefaultTORA() - getRedeclaredTORA());\n\t\t}\n\t\t// Get the points.\n\t\tPoint scr_start = overlayPoint(startX, startY);\n\t\tPoint scr_tora = overlayPoint(startX + scaleX(getRedeclaredTORA()),\n\t\t\t\tstartY);\n\t\tPoint scr_toda = overlayPoint(startX + scaleX(getRedeclaredTODA()),\n\t\t\t\tstartY);\n\t\tPoint scr_asda = overlayPoint(startX + scaleX(getRedeclaredASDA()),\n\t\t\t\tstartY);\n\t\t// Draw the arrows.\n\t\tdrawLineBetween(g2, font, scr_start, scr_tora, \"TORA = \"\n\t\t\t\t+ getRedeclaredTORA() + \"m\", 0);\n\t\tdrawLineBetween(g2, font, scr_start, scr_toda, \"TODA = \"\n\t\t\t\t+ getRedeclaredTODA() + \"m\", length_vert_spacing);\n\t\tdrawLineBetween(g2, font, scr_start, scr_asda, \"ASDA = \"\n\t\t\t\t+ getRedeclaredASDA() + \"m\", 2 * length_vert_spacing);\n\t\tif (isBeforeObstacle()) {\n\t\t\tPoint scr_thr = overlayPoint(startX + scaleX(getDefaultTHR()),\n\t\t\t\t\tstartY);\n\t\t\tPoint scr_lda = overlayPoint(startX\n\t\t\t\t\t+ scaleX(getDefaultTHR() + getRedeclaredLDA()), startY);\n\t\t\tdrawLineBetween(g2, font, scr_thr, scr_lda, \"LDA = \"\n\t\t\t\t\t+ getRedeclaredLDA() + \"m\", -length_vert_spacing);\n\t\t\tdrawLineBetween(g2, font, scr_start, scr_thr, \"Threshold = \"\n\t\t\t\t\t+ getDefaultTHR() + \"m\", -2 * length_vert_spacing);\n\t\t} else {\n\t\t\tPoint scr_thr = overlayPoint(toScaledX(getDefaultTODA()\n\t\t\t\t\t- getRedeclaredLDA()), startY);\n\t\t\tdrawLineBetween(g2, font, scr_thr, scr_tora, \"LDA = \"\n\t\t\t\t\t+ getRedeclaredLDA() + \"m\", -length_vert_spacing);\n\t\t}\n\t}", "private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }", "private void drawOnProjectedBitMap(ImageView iv, Bitmap bm,\n float x0, float y0, float x, float y){\n if(x<0 || y<0 || x > iv.getWidth() || y > iv.getHeight()){\n //outside ImageView\n return;\n }else{\n\n float ratioWidth = (float)bm.getWidth()/(float)iv.getWidth();\n float ratioHeight = (float)bm.getHeight()/(float)iv.getHeight();\n\n mCanvas.drawLine(\n x0 * ratioWidth,\n y0 * ratioHeight,\n x * ratioWidth,\n y * ratioHeight,\n mPaint);\n mPhotoView.invalidate();\n }\n }", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "public static void main(String[] args) throws Exception{\n DrawingPanel panel = new DrawingPanel(840, 480);\n Graphics g = panel.getGraphics();\n \n //Test Step 1 - construct mountain map data\n Scanner S = new Scanner(new File(\"Colorado_844x480.dat\"));\n int[][] grid = read(S, 480, 840);\n \n //Test Step 2 - min, max\n int min = findMinValue(grid);\n System.out.println(\"Min value in map: \"+ min);\n \n int max = findMaxValue(grid);\n System.out.println(\"Max value in map: \"+ max);\n \n \n //Test Step 3 - draw the map\n drawMap(g, grid);\n \n //Test Step 4 - draw a greedy path\n \n // 4.1 implement indexOfMinInCol\n int minRow = indexOfMinInCol(grid, 0); // find the smallest value in col 0\n System.out.println(\"Row with lowest val in col 0: \"+ minRow);\n \n // 4.2 use minRow as starting point to draw path\n g.setColor(Color.RED); //can set the color of the 'brush' before drawing, then method doesn't need to worry about it\n int totalChange = drawLowestElevPath(g, grid, minRow); //\n System.out.println(\"Lowest-Elevation-Change Path starting at row \"+minRow+\" gives total change of: \"+totalChange);\n \n //Test Step 5 - draw the best path\n g.setColor(Color.RED);\n int bestRow = indexOfLowestElevPath(g, grid);\n \n //drawMap(g, grid); //use this to get rid of all red lines\n //g.setColor(Color.GREEN); //set brush to green for drawing best path\n //totalChange = drawLowestElevPath(g, grid, bestRow);\n System.out.println(\"The Lowest-Elevation-Change Path starts at row: \"+bestRow+\" and gives a total change\\nof: \"+totalChange);\n }", "public void paint(Map map, Graphics graphics, Camera camera, GraphicsManager graphicsManager)\r\n\t{\r\n\t\tgraphics.drawImage(graphicsManager.getPanelGaucheBas(), 0, 0, GameConfiguration.WINDOW_WIDTH, GameConfiguration.WINDOW_HEIGHT, null);\r\n\t\tint tileSize = GameConfiguration.TILE_SIZE;\r\n\t\t\r\n\t\tTile[][] tiles = map.getTiles();\r\n\t\tint width = GameConfiguration.WINDOW_WIDTH;\r\n\t\tint height = GameConfiguration.WINDOW_HEIGHT;\r\n\t\tif(GameConfiguration.launchInFullScreen) {\r\n\t\t\twidth = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n\t\t\theight = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n\t\t}\r\n\t\t//draw map\r\n\t\tfor (int lineIndex = 0; lineIndex < map.getLineCount(); lineIndex++) \r\n\t\t{\r\n\t\t\tfor (int columnIndex = 0; columnIndex < map.getColumnCount(); columnIndex++) \r\n\t\t\t{\r\n\t\t\t\tTile tile = tiles[lineIndex][columnIndex];\r\n//tilePos.x + tilePos.w >= 0 && tilePos.y + tilePos.h >= 0 && tilePos.x <= GAME_WIDTH && tilePos.y <= GAME_HEIGHT\r\n\t\t\t\tif(tile.getColumn() * tileSize - camera.getX() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getLine() * tileSize - camera.getY() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getColumn() * tileSize - camera.getX() <= width && tile.getLine() * tileSize - camera.getY() <= height) {\r\n\t\t\t\t\tAnimation animation = tile.getAnimation();\r\n\t\t\t\t\tgraphics.drawImage(graphicsManager.getGrassTile(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\tgraphics.drawImage(animation.getFrame(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\t/*graphics.setColor(Color.white);\r\n\t\t\t\t\tgraphics.drawRect(tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize);*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\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\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}", "public void drawLine(Graphics2D g, int width, int height, double minX,\n double minY, double maxX, double maxY) {\n upperX = maxX;\n lowerX = minX;\n\n upperY = maxY;\n lowerY = minY;\n //debug, drawLine bounds\n// g.drawLine(XOffSet, YOffSet, width, YOffSet);\n// g.drawLine(XOffSet, height, width, height); //X\n//\n// g.drawLine(XOffSet, YOffSet, XOffSet, height);\n// g.drawLine(width, YOffSet, width, height); //Y\n\n double Xscale = GetXScale(width);\n double Yscale = GetYScale(height);\n int centerX = getCenterX(width);\n int centerY = getCenterY(height);\n\n //drawGrid(g, width, height, minX, minY, maxX, maxY);\n\n g.setColor(LineColor);\n g.setStroke(new BasicStroke(curveThickness));\n //draws line from last point to current point\n for (int i = 2; i <= PointArray.length - 1; i += 2) {\n double x1 = ((PointArray[i - 2] * Xscale) + centerX);\n double y1 = ((centerY) - (PointArray[i - 1]) * Yscale);\n\n double x2 = ((PointArray[i] * Xscale) + centerX);\n double y2 = ((centerY) - (PointArray[i + 1]) * Yscale);\n\n if (Double.isNaN(y2)) {\n continue;\n }\n if (Double.isNaN(y1)) {\n continue;\n }\n if (y1 == Double.NaN) {\n i += 2;\n continue;\n } else if (y1 == Double.POSITIVE_INFINITY || y1 == Double.NEGATIVE_INFINITY) {\n continue;\n }\n\n if (y2 == Double.NaN) {\n i += 2;\n continue;\n } else if (y2 == Double.POSITIVE_INFINITY || y2 == Double.NEGATIVE_INFINITY) {\n if (i > 3) {\n if ((PointArray[i - 1] - PointArray[i - 3] > 0)) {\n y2 = YOffSet;\n } else {\n y2 = height;\n }\n } else {\n continue;\n }\n }\n if (x1 < XOffSet) {\n x1 = XOffSet;\n } else if (x1 > width) {\n continue;\n }\n if (x2 < XOffSet) {\n continue;\n } else if (x2 > width) {\n x2 = width;\n }\n\n if (y1 < YOffSet) {\n y1 = YOffSet;\n } else if (y1 > height) {\n continue;\n }\n if (y2 < YOffSet) {\n continue;\n } else if (y2 > height) {\n y2 = height;\n }\n g.drawLine((int) x1, (int) y1, (int) x2, (int) y2);\n }\n\n }", "public void paintComponent(Graphics g) \r\n {\r\n super.paintComponent(g);\r\n Graphics2D g2d = (Graphics2D) g;\r\n //inital light is red\r\n String intLight = \"Red\";\r\n \r\n \r\n //loops through the 2d array of the intersection and draws a sqare for each value that is colored dependnig \r\n //on the value inisde the array\r\n for(int i = 0; i < 10; i++)\r\n {\r\n for(int j = 0; j < 10; j++)\r\n {\r\n if ( board[i][j].equals(\"l\")) //land aka not where i can can drive\r\n {\r\n g.setColor(Color.gray);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"vr\")) // vertical right lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 1, 50);\r\n }\r\n else if ( board[j][i].equals(\"vl\")) //vertical left lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"hb\")) //horizontal bottom lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 50, 1);\r\n }\r\n \r\n else if ( board[j][i].equals(\"ht\")) //horizontal top lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"i\")) //intersection\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if (board[j][i].equals(\"vri\")) //the space before the intersection for the vertical right lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50+5, 50, 45);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 1, 50);\r\n //light\r\n if(light.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, j*50, 50, 5);\r\n }\r\n else if (board[j][i].equals(\"vli\")) //the space before the intersection for the vertical left lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 45);\r\n //light\r\n if(light.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, (j+1)*50-5, 50, 5);\r\n }\r\n else if (board[j][i].equals(\"hbi\")) //the space before the intersection for the horizontal bottom lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 45, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 50, 1);\r\n //light2\r\n if(light2.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light2.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light2.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect((i+1)*50-5, j*50, 5, 50);\r\n }\r\n else if (board[j][i].equals(\"hti\")) //the space before the intersection for the horizontal top lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50+5, j*50, 45, 50);\r\n //light2\r\n if(light2.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light2.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light2.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, j*50, 5, 50);\r\n }\r\n }\r\n } \r\n //screates a linked list that is ach lane, every node inside the list will either have a car or be empty\r\n Map scan;\r\n scan = saveHB;\r\n while(scan != null)\r\n {\r\n //each ehicle tpye is a different color so its easy to see which vehicle is which\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n //if there is a vehicle in this space draw the vehicle\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n scan = saveHT;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n \r\n scan = saveVR;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n scan = saveVL;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n }" ]
[ "0.69457865", "0.6839494", "0.67469513", "0.65502495", "0.6545268", "0.6510366", "0.63492674", "0.6349073", "0.63433564", "0.6291783", "0.62668365", "0.6265698", "0.6213876", "0.61411023", "0.61331177", "0.61311966", "0.6127988", "0.61243355", "0.61022794", "0.6096112", "0.60924906", "0.6082708", "0.6079694", "0.60762995", "0.606707", "0.60631216", "0.6036278", "0.602461", "0.6017342", "0.601561", "0.5935815", "0.5912907", "0.59116423", "0.59076613", "0.5907089", "0.5877403", "0.58762336", "0.5875443", "0.58751625", "0.5867648", "0.58483726", "0.5847752", "0.582221", "0.5819809", "0.5814345", "0.58134776", "0.58125633", "0.58095145", "0.5808749", "0.5806819", "0.5804943", "0.5803574", "0.5799138", "0.5796158", "0.5795576", "0.57938325", "0.5779526", "0.57728904", "0.57434833", "0.5728876", "0.5723332", "0.5721839", "0.57160556", "0.57113993", "0.5708157", "0.5705204", "0.57049006", "0.56975436", "0.56958187", "0.5695645", "0.56951594", "0.5694308", "0.5688296", "0.56823856", "0.5678563", "0.5667405", "0.5659702", "0.5658903", "0.5657401", "0.5654321", "0.56520563", "0.5651774", "0.56448334", "0.564008", "0.56400204", "0.5635918", "0.5634767", "0.5625597", "0.5617348", "0.5615561", "0.5614985", "0.5607657", "0.56068695", "0.56043357", "0.5603806", "0.5596264", "0.55960673", "0.5579435", "0.55744445", "0.55742246" ]
0.60736156
24
For current floor decrements values to fit map image
public static int transformCoordenate(int floor, byte axis) { switch (floor) { case 0: switch (axis) { case X_COORD: return 0; case Y_COORD: return -103; } break; case 1: return 0; case 2: switch (axis) { case X_COORD: return -321; case Y_COORD: return -23; } break; case 3: switch (axis) { case X_COORD: return -137; case Y_COORD: return -241; } break; case 4: switch (axis) { case X_COORD: return 0; case Y_COORD: return -13; } break; case 5: switch (axis) { case X_COORD: return 0; case Y_COORD: return -90; } break; case 6: switch (axis) { case X_COORD: return -116; case Y_COORD: return -223; } break; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearGotoFloor();", "private void resetFValue(){\r\n int length = _map.get_mapSize();\r\n for(int i=0;i<length;i++){\r\n _map.get_grid(i).set_Fnum(10000);\r\n }\r\n }", "public void setCurrentFloor(int i);", "public void advanceFloor(){\n //TODO: write method to move onto next floor\n }", "public int getCurrentFloor();", "public void setFloor(int floor) {\n this.floor = floor;\n }", "private double normalizeImageValue(double value){\n return value/(31);\n }", "public void update()\n {\n if(x + image.getWidth(null) < 0)\n {\n x = 0;\n }\n else\n {\n x--;\n }\n }", "@Override\n public void onValueDisplaced(int value) {\n }", "public void adjustDown() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].y = tiles[x][y].y + 4;\n backGroundTiles[x][y].y = backGroundTiles[x][y].y + 4;\n grassTiles[x][y].y = grassTiles[x][y].y + 4;\n }\n }", "public void depolarize(){\n\t\t\tif(sodiumChannel.getGateStatus().equalsIgnoreCase(\"open\")) {\n\t\t\t\tfor(int i = 1; i <= threshold; i++) {\n\t\t\t\t\tcurrentVoltage = currentVoltage + sodiumIon;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public final void removeFloor(Floor floor) {\n/* 6509 */ int floorLevel = floor.getFloorLevel();\n/* 6510 */ if (this.floors != null) {\n/* */ \n/* 6512 */ this.floors.remove(floor);\n/* 6513 */ if (floor.isStair())\n/* 6514 */ Stairs.removeStair(hashCode(), floorLevel); \n/* 6515 */ if (this.floors.size() == 0)\n/* 6516 */ this.floors = null; \n/* */ } \n/* 6518 */ if (this.structure == null)\n/* */ return; \n/* 6520 */ if (this.watchers != null)\n/* */ {\n/* 6522 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 6526 */ vz.removeFloor(this.structure.getWurmId(), floor);\n/* */ }\n/* 6528 */ catch (Exception e) {\n/* */ \n/* 6530 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* 6534 */ if (floorLevel > 0) {\n/* 6535 */ destroyPileItem(floorLevel);\n/* */ \n/* */ }\n/* 6538 */ else if (this.vitems != null) {\n/* */ \n/* 6540 */ Item pileItem = this.vitems.getPileItem(floorLevel);\n/* 6541 */ if (pileItem != null) {\n/* */ \n/* 6543 */ pileItem.updatePosZ(this);\n/* */ \n/* 6545 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 6549 */ if (vz.isVisible(pileItem, this))\n/* */ {\n/* 6551 */ vz.removeItem(pileItem);\n/* 6552 */ vz.addItem(pileItem, this, true);\n/* */ }\n/* */ \n/* 6555 */ } catch (Exception e) {\n/* */ \n/* 6557 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 6564 */ if (this.vitems != null)\n/* */ {\n/* 6566 */ for (Item item : this.vitems.getAllItemsAsArray()) {\n/* */ \n/* 6568 */ if (item.isDecoration() && item.getFloorLevel() == floorLevel) {\n/* */ \n/* 6570 */ item.updatePosZ(this);\n/* 6571 */ item.updateIfGroundItem();\n/* */ } \n/* */ } \n/* */ }\n/* 6575 */ if (this.creatures != null)\n/* */ {\n/* 6577 */ for (Creature c : this.creatures) {\n/* */ \n/* 6579 */ if (c.getFloorLevel() == floorLevel)\n/* */ {\n/* 6581 */ if (!c.isPlayer()) {\n/* */ \n/* 6583 */ float oldposz = c.getPositionZ();\n/* 6584 */ float newPosz = c.calculatePosZ();\n/* 6585 */ float diffz = newPosz - oldposz;\n/* 6586 */ c.setPositionZ(newPosz);\n/* 6587 */ c.moved(0.0F, 0.0F, diffz, 0, 0);\n/* */ } \n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 6596 */ checkDeletion();\n/* */ }", "void unsetValueRatio();", "public void resetCoordinates(){\n pos=0;\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE;}\n else{\n this.coordinates[0]=0;}\n if(this.pIndex%3==0){\n this.coordinates[1]=0;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE;} \n }", "public int getFloor();", "public void adjustUp() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].y = tiles[x][y].y - 4;\n backGroundTiles[x][y].y = backGroundTiles[x][y].y - 4;\n grassTiles[x][y].y = grassTiles[x][y].y - 4;\n }\n }", "public void setActualFloor(int _actualFloor) {\n\t\tactualFloor = _actualFloor;\n\t}", "public void disperse() {\t\t\n\t\tfor (int r = 0; r < rows; r++){\n\t\t\tfor (int c = 1; c < cols; c++){\n\t\t\t\tint sum = values[r+1][c-1] + values[r+1][c] + values[r+1][c+1];\n\t\t\t\tif(r < rows - fireLevel + 14){\n\t\t\t\t\tvalues[r][c] = (sum / 3) - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalues[r][c] = (int)((sum / 3.0) - 0.0); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (values[r][c] < 0) values[r][c] = 0;\n\t\t\t\tg2.setColor(colors[values[r][c]]);\n\t\t\t\tif(values[r][c] > 5){\n\t\t\t\t\tg2.fillRect(c*res,r*res,res,res);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override // com.beloo.widget.chipslayoutmanager.p295d.AbstractLayouter\n /* renamed from: m */\n public void mo21685m() {\n int c = this.f10947d - mo21667c();\n this.f10948e = 0;\n for (Pair pair : this.f10944a) {\n Rect rect = (Rect) pair.first;\n rect.left -= c;\n rect.right -= c;\n this.f10948e = Math.max(rect.right, this.f10948e);\n this.f10946c = Math.min(this.f10946c, rect.top);\n this.f10945b = Math.max(this.f10945b, rect.bottom);\n }\n }", "private void setPixels() {\n\t\t\tfinal byte[] dest = new byte[(int) (getMetadata().get(0).getAxisLength(\n\t\t\t\tAxes.X) * getMetadata().get(0).getAxisLength(Axes.Y))];\n\t\t\tlong lastImage = -1;\n\n\t\t\t// fill in starting image contents based on last image's dispose\n\t\t\t// code\n\t\t\tif (getMetadata().getLastDispose() > 0) {\n\t\t\t\tif (getMetadata().getLastDispose() == 3) { // use image before last\n\t\t\t\t\tfinal long n = getMetadata().get(0).getPlaneCount() - 2;\n\t\t\t\t\tif (n > 0) lastImage = n - 1;\n\t\t\t\t}\n\n\t\t\t\tif (lastImage != -1) {\n\t\t\t\t\tfinal byte[] prev = getMetadata().getImages().get((int) lastImage);\n\t\t\t\t\tSystem.arraycopy(prev, 0, dest, 0, (int) (getMetadata().get(0)\n\t\t\t\t\t\t.getAxisLength(Axes.X) * getMetadata().get(0).getAxisLength(\n\t\t\t\t\t\t\tAxes.Y)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// copy each source line to the appropriate place in the destination\n\n\t\t\tint pass = 1;\n\t\t\tint inc = 8;\n\t\t\tint iline = 0;\n\t\t\tfor (int i = 0; i < getMetadata().getIh(); i++) {\n\t\t\t\tint line = i;\n\t\t\t\tif (getMetadata().isInterlace()) {\n\t\t\t\t\tif (iline >= getMetadata().getIh()) {\n\t\t\t\t\t\tpass++;\n\t\t\t\t\t\tswitch (pass) {\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tiline = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tiline = 2;\n\t\t\t\t\t\t\t\tinc = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tiline = 1;\n\t\t\t\t\t\t\t\tinc = 2;\n\t\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\tline = iline;\n\t\t\t\t\tiline += inc;\n\t\t\t\t}\n\t\t\t\tline += getMetadata().getIy();\n\t\t\t\tif (line < getMetadata().get(0).getAxisLength(Axes.Y)) {\n\t\t\t\t\tfinal int k = line * (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint dx = k + getMetadata().getIx(); // start of line in dest\n\t\t\t\t\tint dlim = dx + getMetadata().getIw(); // end of dest line\n\t\t\t\t\tif ((k + getMetadata().get(0).getAxisLength(Axes.X)) < dlim) dlim =\n\t\t\t\t\t\tk + (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint sx = i * getMetadata().getIw(); // start of line in\n\t\t\t\t\t// source\n\t\t\t\t\twhile (dx < dlim) {\n\t\t\t\t\t\t// map color and insert in destination\n\t\t\t\t\t\tfinal int index = getMetadata().getPixels()[sx++] & 0xff;\n\t\t\t\t\t\tdest[dx++] = (byte) index;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tgetMetadata().getColorTables().add(getMetadata().getAct());\n\t\t\tgetMetadata().getImages().add(dest);\n\t\t}", "static void resetMiniCalib() {\n\n maxX--;\n minX++;\n\n //maxY = 0;\n //minY = SCREEN_HEIGHT;\n maxY--;\n minY++;\n\n if (minY > maxY) {\n maxY += 1;\n minY -= 1;\n }\n\n if (minX > maxX) {\n maxX += 1;\n minX -= 1;\n }\n\n cX = (minX + maxX) / 2;\n cY = (minY + maxY) / 2;\n\n runMiniCalib();\n\n }", "public void cleanUp(){\n\t\t//offset(-1*bounds.left, -1*bounds.top);\n\t}", "private void devolver100() {\n cambio = cambio - 100;\n de100--;\n cambio100++;\n }", "public int getGotoFloor();", "protected int moveDownFloor() {\n delayElevator();\n return currentFloor.decrementAndGet();\n }", "public int getMinFloor();", "void deriveImage()\n\t{\n\n\t\t//img = new BufferedImage(dimx, dimy, BufferedImage.TYPE_INT_ARGB);\n\t\timg = null;\n\t\ttry{\n\t\t\timg = ImageIO.read(new File(\"src/input/World.png\"));\n\n\t\t}catch (IOException e){\n\t\t\tSystem.out.println(\"world image file error\");\n\t\t}\n\t\t//System.out.println(img.getHeight());\n\t\t//System.out.println(img.getWidth());\n//\t\tfloat maxh = -10000.0f, minh = 10000.0f;\n//\n//\t\t// determine range of tempVals s\n//\t\tfor(int x=0; x < dimx; x++)\n//\t\t\tfor(int y=0; y < dimy; y++) {\n//\t\t\t\tfloat h = tempVals [x][y];\n//\t\t\t\tif(h > maxh)\n//\t\t\t\t\tmaxh = h;\n//\t\t\t\tif(h < minh)\n//\t\t\t\t\tminh = h;\n//\t\t\t}\n\t\t\n\t\tfor(int x=0; x < dimx; x++)\n\t\t\tfor(int y=0; y < dimy; y++) {\n\t\t\t\t \t\n\t\t\t\t// find normalized tempVals value in range\n\t\t\t\t//float val = (tempVals [x][y] - minh) / (maxh - minh);\n\t\t\t\tfloat val = tempVals[x][y];\n\n\t\t\t\t//System.out.println(val);\n\n\t\t\t\tColor c = new Color(img.getRGB(x,y));\n\n\t\t\t\tif((c.getRed() > 50 && c.getGreen() > 100 && c.getBlue() < 200)) {\n\n\t\t\t\t\tif (val != 0.0f) {\n\t\t\t\t\t\tColor col = new Color(val, 0, 0);\n\t\t\t\t\t\timg.setRGB(x, y, col.getRGB());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t\n\t}", "public void setCurrentFloor(int currentFloor) {\n this.currentFloor = currentFloor;\n }", "public int currentFloor(){\n return currentFloor;\n }", "private void resetToBase(){\n\t\t//find number of markers after base\n\t\tSystem.out.println(\"here is the base: \" + base);\n\t\tint numMarkers = 0;\n\n\t\tfor(int i=base+1; i<indices.length; i++){\n\t\t\tif(indices[i]==1){\n\t\t\t\tindices[i] = 0;\n\t\t\t\tnumMarkers++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=base; i<base+numMarkers; i++){\n\t\t\tindices[i+1] = 1;\n\t\t}\n\t}", "public void negative(BufferedImage img, int startX, int startY, int endX, int endY) throws IOException{\r\n int pixels[] = new int[3];\r\n double ww[]=new double[3];\r\n WritableRaster raster = img.getRaster();\r\n \r\n for(int i=startX;i<endX;i++) {\r\n for(int j=startY;j<endY;j++){\r\n \r\n \r\n raster.getPixel(i, j, pixels);\r\n \r\n ww[0] = 255-pixels[0];\r\n ww[1] = 255-pixels[1];\r\n ww[2] = 255-pixels[2];\r\n \r\n raster.setPixel(i, j, ww);\r\n \r\n }\r\n \r\n }\r\n\r\n \r\n\r\n }", "public int getFloor() {\n return floor;\n }", "private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}", "public void Down4()\r\n {\r\n if(By2>0 && By2<900){\r\n \r\n By2+=2.5;\r\n }\r\n }", "private void m113395b(float f) {\n float abs = Math.abs(f);\n if (abs < 350.0f) {\n this.f91930a.f92028d = 255.0f - ((abs / 350.0f) * 25.0f);\n } else {\n this.f91930a.f92028d = 230.0f - ((((abs - 350.0f) * 1.35f) / ((float) this.f91930a.getHeight())) * 255.0f);\n }\n C35169i iVar = this.f91930a;\n float f2 = 0.0f;\n if (this.f91930a.f92028d >= 0.0f) {\n f2 = this.f91930a.f92028d;\n }\n iVar.f92028d = f2;\n }", "public synchronized void method_219() {\n if(this.field_730 != null) {\n this.field_730.setPixels(0, 0, this.field_723, this.field_724, this.field_728, this.pixels, 0, this.field_723);\n this.field_730.imageComplete(2);\n }\n }", "public void reset() {\n xmin = Float.MAX_VALUE;\n xmax = -Float.MAX_VALUE;\n ymin = Float.MAX_VALUE;\n ymax = -Float.MAX_VALUE;\n zmin = Float.MAX_VALUE;\n zmax = -Float.MAX_VALUE;\n }", "public void adjustRight() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].x = tiles[x][y].x + 4;\n backGroundTiles[x][y].x = backGroundTiles[x][y].x + 4;\n grassTiles[x][y].x = grassTiles[x][y].x + 4;\n }\n\n }", "public void setDestinationFloor(int destinationFloor){\n this.destinationFloor=destinationFloor;\n }", "public void mo4361Y() {\n this.f3169c = -1;\n }", "public void mo472g() throws RemoteException {\r\n int i = 0;\r\n if (this.f1761e != null && this.f1762f != null && this.f1763g != null && this.f1767k) {\r\n try {\r\n this.f1772p = false;\r\n MapProjection c = this.f1769m.mo395c();\r\n FPoint fPoint;\r\n if (m2832l()) {\r\n DPoint m = m2833m();\r\n int abs = (int) ((Math.abs(this.f1775s - this.f1774r) * 180.0d) / 3.141592653589793d);\r\n double d = (this.f1775s - this.f1774r) / ((double) abs);\r\n FPoint[] fPointArr = new FPoint[(abs + 1)];\r\n this.f1770n = new float[(fPointArr.length * 3)];\r\n for (int i2 = 0; i2 <= abs; i2++) {\r\n MapProjection mapProjection;\r\n if (i2 == abs) {\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1763g.latitude, this.f1763g.longitude, fPoint);\r\n fPointArr[i2] = fPoint;\r\n } else {\r\n mapProjection = c;\r\n fPointArr[i2] = m2831a(mapProjection, (((double) i2) * d) + this.f1774r, m.f3635x, m.f3636y);\r\n }\r\n mapProjection = c;\r\n fPointArr[i2] = m2831a(mapProjection, (((double) i2) * d) + this.f1774r, m.f3635x, m.f3636y);\r\n this.f1770n[i2 * 3] = fPointArr[i2].f3637x;\r\n this.f1770n[(i2 * 3) + 1] = fPointArr[i2].f3638y;\r\n this.f1770n[(i2 * 3) + 2] = 0.0f;\r\n }\r\n this.f1771o = fPointArr.length;\r\n return;\r\n }\r\n FPoint[] fPointArr2 = new FPoint[3];\r\n this.f1770n = new float[(fPointArr2.length * 3)];\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1761e.latitude, this.f1761e.longitude, fPoint);\r\n fPointArr2[0] = fPoint;\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1762f.latitude, this.f1762f.longitude, fPoint);\r\n fPointArr2[1] = fPoint;\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1763g.latitude, this.f1763g.longitude, fPoint);\r\n fPointArr2[2] = fPoint;\r\n while (i < 3) {\r\n this.f1770n[i * 3] = fPointArr2[i].f3637x;\r\n this.f1770n[(i * 3) + 1] = fPointArr2[i].f3638y;\r\n this.f1770n[(i * 3) + 2] = 0.0f;\r\n i++;\r\n }\r\n this.f1771o = fPointArr2.length;\r\n } catch (Throwable th) {\r\n az.m3143a(th, \"ArcDelegateImp\", \"calMapFPoint\");\r\n th.printStackTrace();\r\n }\r\n }\r\n }", "public void majIHM(){\n this.image.setFitWidth(this.getHeight()-10);\n this.image.setFitHeight(this.getHeight()-10);\n }", "public int upperBoundary(){\r\n\t\treturn yStart - Constants.FLOOR_HEIGHT;\r\n\t}", "private void clearButtonDown(Floor floor)\r\n\t{\r\n\t\t\tdirectionButtonPanels[floor.getNumber()][0]=LiftButton.NOT_ACTIVE;\r\n\t}", "public K floor(K key);", "public void adjustIntensity()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n\tdouble dbL = (double)(L-1);\r\n\tshort maxI;\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\t\tmaxI = (short)Math.min(L-1, \r\n\t\t Math.round((L-1) * maxIntensity(hue[row][col]/dbL,\r\n\t\t saturation[row][col]/dbL)));\r\n\t\tintensity[row][col] =\r\n\t\t (short)Math.min(intensity[row][col], maxI);\r\n\t }\r\n\t}\r\n }", "protected void stopAndViewToPast()\n {\n if(!widgg.common.bFreeze){ \n widgg.common.bFreeze = true;\n //now ixDataShow remain unchanged.\n } else {\n int ixdDataSpread = ixDataShowRight - ixDataShown[pixelOrg.xPixelCurve * 5/10];\n //int ixDataShowRight1 = ixDataShown[nrofValuesShow * 7/8];\n //int ixdDataSpread = ixDataShowRight - ixDataShowRight1;\n ixDataShowRight -= ixdDataSpread;\n if((ixDataShowRight - widgg.ixDataWr) < 0 && (widgg.ixDataWr - ixDataShowRight) < ixdDataSpread) {\n //left end reached.\n ixDataShowRight = widgg.ixDataWr + ixdDataSpread;\n }\n }\n widgg.redraw(100, 200);\n //System.out.println(\"left-bottom\");\n \n }", "private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void bufferImageGrey()\n {\n int col = 0;\n int[][] heightmap = parent.normaliseMap(parent.getPreviewMap(), 255);\n \n bufferedImage = createImage(heightmap.length, heightmap[0].length);\n Graphics bg = bufferedImage.getGraphics();\n for(int i = 0; i < heightmap.length; i ++) {\n for(int j = 0; j < heightmap[i].length - 1; j++) {\n col = heightmap[i][j];\n if(col > 255)\n col = 255;\n bg.setColor(new Color(col, col, col));\n bg.drawLine(i, j, i, j);\n }\n }\n }", "public final void mo9764A() {\n int i = this.f9080g + this.f9081h;\n this.f9080g = i;\n int i2 = this.f9084k + i;\n int i3 = this.f9085l;\n if (i2 > i3) {\n int i4 = i2 - i3;\n this.f9081h = i4;\n this.f9080g = i - i4;\n return;\n }\n this.f9081h = 0;\n }", "private void updateBoxes(){\n if(model.getMap() != null) {\n DoubleVec position = invModelToView(new DoubleVec(canvas.getWidth()*0.5,canvas.getHeight()*0.5));\n inner = new Rectangle(position, 1.0/zoomFactor * fi * canvas.getWidth(), 1.0/zoomFactor * fi * canvas.getHeight(), 0);\n outer = new Rectangle(position, 1.0/zoomFactor * fo * canvas.getWidth(), 1.0/zoomFactor * fo * canvas.getHeight(), 0);\n }\n }", "public void blackScreen() {\n boolean var5 = field_759;\n int var1 = this.field_723 * this.field_724;\n int var2;\n if(this.interlace) {\n var2 = 0;\n int var3 = -this.field_724;\n if(var5 || var3 < 0) {\n do {\n int var4 = -this.field_723;\n if(var5) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n while(var4 < 0) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n var2 += this.field_723;\n var3 += 2;\n } while(var3 < 0);\n\n }\n } else {\n var2 = 0;\n if(var5 || var2 < var1) {\n do {\n this.pixels[var2] = 0;\n ++var2;\n } while(var2 < var1);\n\n }\n }\n }", "public void buildEmptyMap() {\n this.emptyMap = new BufferedImage(this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, BufferedImage.TYPE_INT_RGB);\n final Graphics2D graphics = (Graphics2D) this.emptyMap.getGraphics();\n graphics.drawImage(this.boulderDashModel.getArea().getImage(), 0, 0, this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, null);\n }", "public void normalization(Map <String,ArrayList<Point>> map){\r\n \t/*First Translation*/\r\n \tint minX,minY,x,y,i = 0;\r\n \tminX = minXValue(map);\r\n \tminY = minYValue(map);\r\n \tint indexTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexTrans).getX() - minX);\r\n \t\ty = (int) (map.get(key).get(indexTrans).getY()- minY);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexTrans++;\r\n \t\t}\r\n \t/*Scaling */\r\n \t/*x = x*s ; y = y*s */\r\n \t/*initialize s*/\r\n \tint xMaxWindow= 600,yMaxWindow = 600,s;\r\n \tif ((xMaxWindow/maxXValue(map)) < (yMaxWindow/maxYValue(map)))\r\n \t{\r\n \t\t\ts = (int) (0.8*(xMaxWindow/maxXValue(map)));\r\n \t}\r\n \t\telse\r\n \t\t{\r\n \t\ts = (int) (0.8*(yMaxWindow/maxYValue(map)));\r\n \t\t}\r\n \tint indexScaling = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexScaling).getX()*s);\r\n \t\ty = (int) (map.get(key).get(indexScaling).getY()*s);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexScaling++;\r\n \t\t}\r\n \t/*Translation Back*/\r\n \t/* x = x + 0.1*xMaxWindow ; y = y + 0.1*yMaxWindow */\r\n \tint iSecTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(i).getX() + 0.1*xMaxWindow);\r\n \t\ty = (int) (map.get(key).get(i).getY() + 0.1*yMaxWindow);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tiSecTrans++;\r\n \t\t}\r\n \r\n \t\r\n \t\r\n }", "public void mo42982i() {\n this.f12193a = 0;\n this.f12194b = 0;\n this.f12195c = 0;\n this.f12196d.setNull();\n this.f12197e.mo42967b();\n this.f12198f.clear();\n }", "public Bitmap getBitmap() {\n\t\tBitmap bitmap;\n\t\tint intpixels[] = new int[getNrows()*getNcols()];\n\n// Log.i(\"min value\", Float.toString(getMinElevation()));\n// Log.i(\"max value\", Float.toString(getMaxElevation()));\n// Log.i(\"range value\", Float.toString(getMaxElevation()-getMinElevation()));\n\t\tfor(int k = 0; k<getNrows(); k++) {\n\t\t\tfor(int m=0; m<getNcols(); m++) {\n\t\t \t//normalize each float to a value from 0-255\n\n double range = 255/(getMaxElevation()-getMinElevation());\n\t\t \tintpixels[k+(m*getNrows())] = (int)(range*(getElevationData()[k][m]-getMinElevation()));\n\n //Log.i(\"pixel value\", Integer.toString(intpixels[m+(k*getNcols())]));\n\t\t \t//intpixels[k] = (int)( ((pixels[k]-min)/(max-min))*(double)255.0);\n\t\t \t//convert to greyscale ARGB value\n\t\t \t//intpixels[m+(k*getNcols())] = 0xFF000000 + intpixels[m+(k*getNcols())] + intpixels[m+(k*getNcols())]<<8 + intpixels[m+(k*getNcols())]<<16;\n\t\t\t}\t\n\t }\n\n for(int l=0;l<getNcols()*getNrows(); l++) {\n //intpixels[l] = 0xFF000000 + intpixels[l] + intpixels[l]<<8 + intpixels[l]<<16;\n intpixels[l] = Color.argb(255, intpixels[l], intpixels[l], intpixels[l]);\n }\n\t\tbitmap = Bitmap.createBitmap(intpixels, 0, getNrows(), getNrows(), getNcols(), Bitmap.Config.ARGB_8888);\n\n Matrix matrix = new Matrix();\n matrix.postRotate(90);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0,\n bitmap.getWidth(), bitmap.getHeight(),\n matrix, true);\n try {\n FileOutputStream out = new FileOutputStream(\"/sdcard/field.png\");\n bitmap.compress(Bitmap.CompressFormat.PNG, 90, out);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\n return bitmap;\n\t}", "public void setFloor(double input) {\r\n floor=input;\r\n }", "@Test\n public void rectLowerRightWriteTest() {\n final Rectangle rect = new Rectangle(80, 30, 50, 50);\n minx = 3;\n miny = -7;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "private void clearButtonUp(Floor floor)\r\n\t{\r\n\t\t\tdirectionButtonPanels[floor.getNumber()][1]=LiftButton.NOT_ACTIVE;\r\n\t}", "private void m87324c() {\n this.f61230w = -1;\n this.f61216i = false;\n this.f61217j = false;\n this.f61229v = 0.0f;\n this.f61228u = 0.0f;\n this.f61227t = 0.0f;\n this.f61223p.clear();\n }", "public void mo41170f() {\n this.f25421c.set(0);\n }", "public void mo4059b() {\n imageCacheStatsTracker.mo4072f();\n }", "@Nullable\n protected abstract Map.Entry<K, V> onGetFloorEntry(@Nullable final K key);", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void updateMemory(Map map) {\n\t\tif(!memory.used)\n\t\t\treset(map);\n\t\tspiral();\n\t}", "void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }", "@Override\r\n public void onStopTrackingTouch(SeekBar seekBar) {\n mImgView.setImageBitmap(null);\r\n //softskin\r\n mImgView.setImageBitmap(mFaceEditor.BFSoftskin(Math.abs(seekBar.getProgress()/10), GlobalDefinitions.whiteRatio));//));//change to 0-100\r\n\r\n }", "private static BufferedImage getMap(int art, GameModel gameModel, Color mapC, Color skyC){\n\n BufferedImage image = new BufferedImage(2800,1800,BufferedImage.TYPE_4BYTE_ABGR);\n\n int genauigkeit = 400;\n\n int[] mapX = new int[genauigkeit + 2];\n int[] mapY = new int[genauigkeit + 2];\n\n mapX[genauigkeit + 1] = 0;\n mapX[genauigkeit] = GameLoop.imgW;\n\n mapY[genauigkeit + 1] = GameLoop.imgH;\n mapY[genauigkeit] = GameLoop.imgH;\n\n double[] rnd = new double[8];\n\n for(int i = 0;i < 4;i++){\n rnd[i] = Math.random() * 0.1;\n rnd[i+4] = Math.random();\n }\n\n for(int i = 0;i < genauigkeit;i++){\n mapX[i] = (int) (GameLoop.imgW/(double)genauigkeit * (i));\n\n switch(art){\n case 1:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/8);\n break;\n case 2:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.01) * gameModel.getHeight()/8);\n break;\n case 3:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/12 + i);\n break;\n case 4:\n mapY[i] = (int) (gameModel.getHeight()*0.8 - 1/(2000 + Math.pow(i - (genauigkeit - 2)/2.0,2)) * 1500000);\n break;\n case 5:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.pow(Math.sin(i * 0.03),3) * gameModel.getHeight()/4);\n break;\n case 6:\n mapY[i] = (int) (gameModel.getHeight()/2.0);\n mapY[i] += Math.sin(i * (rnd[0])) * rnd[4] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[1])) * rnd[5] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[2])) * rnd[6] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[3])) * rnd[7] * gameModel.getHeight()*0.1;\n\n\n\n\n\n }\n\n }\n\n Polygon map = new Polygon(mapX,mapY,genauigkeit+2);\n\n Graphics2D g2d = image.createGraphics();\n\n g2d.setColor(skyC);\n\n g2d.fillRect(0,0,2800,1800);\n\n g2d.setColor(mapC);\n\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n g2d.fillPolygon(map);\n\n return image;\n }", "private double noBranch() {\n\t\treturn num * configMap.get('r') + (num-1) * configMap.get('l') + num * configMap.get('f') + configMap.get('a');\n\t}", "public void heightMap(World world, ActivePlayer player, int radius, int i, int k) {\n \t\tlong start = System.currentTimeMillis();\n \t\tint sStart = MiniMapWidget.scale;\n \t\t\n \t\t/*\n \t\t * Generate the image and apply shading \n \t\t */\n \t\tint tx, tz;\n \t\tint y, id, dy, diff;\n \t\t//Map<Integer, Integer[]> pairs = new HashMap<Integer, Integer[]>();\n \t\tint py = player.getLocation().getBlockY();\n \t\t\n \t\tBufferedImage image = null;\n \t\tif(MiniMapWidget.scale <= 0)\n \t\timage = new BufferedImage(radius*2*16, radius*2*16, BufferedImage.TYPE_INT_RGB);\n \t\telse\n \t\timage = new BufferedImage(radius*2, radius*2, BufferedImage.TYPE_INT_RGB);\n \t\tGraphics gr = image.getGraphics();\n \t\tgr.setColor(transparent);\n \t\t\n \t\tfor (int x = -radius; x < radius; x++)\n \t\t\tfor (int z = -radius; z < radius; z++) {\n \t\t\t\t\n \t\t\t\tif(System.currentTimeMillis()-start > 1000+MiniMapWidget.scale*4 || MiniMapWidget.scale != sStart) {\n \t\t\t\t\tgr.dispose();\n \t\t\t\t\t// TODO Add pathing back\n \t\t\t\t\t//writePath(pairs);\n \t\t\t\t\tgr = this.image.getGraphics();\n \t\t\t\t\tgr.drawImage(image, 0, 0, 256, 256, null);\n \t\t\t\t\tgr.dispose();\n \t\t\t\t\t// Can we help stop the memory leak here?\n \t\t\t\t\timage.flush();\n \t\t\t\t\timage = null;\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\ttx = (int) (i + x);\n \t\t\t\ttz = (int) (k + z);\n \t\t\t\t\n \t\t\t\t//MiniMapLocation test = inList(tx, tz);\n \t\t\t\t//if(test != null) {\n \t\t\t\t//int index = test.hashCode();\n \t\t\t\t//Integer[] pair = {(x+MiniMap.radius), (z+MiniMap.radius)};\n \t\t\t\t//pairs.put(index, pair);\n \t\t\t\t//}\n \t\t\t\t\n \t\t\t\ty = getHighestBlockY(world, tx, tz);\n \t\t\t\tid = world.getBlockTypeIdAt(tx, y, tz);\n \t\t\t\t\n \t\t\t\tif(map.isTransparent(id)) {\n \t\t\t\t\tint ly = getHighestNonTransparentBlockY(world, tx, tz);\n \t\t\t\t\tfor(int m=ly; m<y; m++) {\n \t\t\t\t\tint nd = world.getBlockTypeIdAt(tx, m, tz);\n \t\t\t\t\tBufferedImage tile = map.getTexture(nd);\n \t\t\t\t\tgr.drawImage(tile, (x+radius)*16, (z+radius)*16, null);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tdy = ((y-py)*2 + (y-64));\n \t\t\t\tdiff = getRelativeShading(world, tx, y, tz)*15;\n \t\t\t\t\n \t\t\t\tdy = dy+diff+world.getBlockAt(tx, y+1, tz).getLightLevel()*5;\n \t\t\t\t\n \t\t\t\tif(MiniMapWidget.scale <= 0) {\n \t\t\t\t\n \t\t\t\tBufferedImage tile = map.getTexture(id);\n \t\t\t\t\n \t\t\t\tfor(int m=0; m<16; m++)\n \t\t\t\t\tfor(int n=0; n<16; n++) {\n \t\t\t\t\t\tColor color = new Color(tile.getRGB(m, n));\n \t\t\t\t\t\tint r = color.getRed() + dy;\n \t\t\t\t\t\tif (r > 255)\n \t\t\t\t\t\tr = 255;\n \t\t\t\t\t\tif (r < 0)\n \t\t\t\t\t\tr = 0;\n \t\t\t\t\t\tint g = (color.getGreen() + dy);\n \t\t\t\t\t\tif (g > 255)\n \t\t\t\t\t\tg = 255;\n \t\t\t\t\t\tif (g < 0)\n \t\t\t\t\t\tg = 0;\n \t\t\t\t\t\tint b = color.getBlue() + dy;\n \t\t\t\t\t\tif (b > 255)\n \t\t\t\t\t\tb = 255;\n \t\t\t\t\t\tif (b < 0)\n \t\t\t\t\t\tb = 0;\n \t\t\t\t\t\tcolor = new Color(r, g, b);\n \t\t\t\t\t\ttile.setRGB(m, n, color.getRGB());\n \t\t\t\t\t\tcolor = null;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tgr.drawImage(tile, (x+radius)*16, (z+radius)*16, null);\n \t\t\t\t} else {\n \t\t\t\t\tColor color = map.getColor(id);\n \t\t\t\t\tint r = color.getRed() + dy;\n \t\t\t\t\tif (r > 255)\n \t\t\t\t\tr = 255;\n \t\t\t\t\tif (r < 0)\n \t\t\t\t\tr = 0;\n \t\t\t\t\tint g = (color.getGreen() + dy);\n \t\t\t\t\tif (g > 255)\n \t\t\t\t\tg = 255;\n \t\t\t\t\tif (g < 0)\n \t\t\t\t\tg = 0;\n \t\t\t\t\tint b = color.getBlue() + dy;\n \t\t\t\t\tif (b > 255)\n \t\t\t\t\tb = 255;\n \t\t\t\t\tif (b < 0)\n \t\t\t\t\tb = 0;\n \t\t\t\t\tcolor = new Color(r, g, b);\n \t\t\t\t\timage.setRGB(x+image.getWidth()/2, z+image.getHeight()/2, color.getRGB());\n \t\t\t\t\tcolor = null;\n \t\t\t\t}\n \t\t\t}\n \t\tgr.dispose();\n \t\ttry {\n \t\t\tFile file = new File(\"test.png\");\n \t\t\tImageIO.write(image, \"png\", file);\n \t\t} catch (Exception e) {\n \t\t\t\n \t\t}\n \t\t// TODO Add pathing back\n \t\t//writePath(pairs);\n \t\tgr = this.image.getGraphics();\n \t\tgr.drawImage(image, 0, 0, 256, 256, null);\n \t\tgr.dispose();\n \t\t// Can we help stop the memory leak here?\n \t\timage.flush();\n \t\timage = null;\n \t}", "void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static BufferedImage lowerMap8(BufferedImage source) {\n //load image\n int width = source.getWidth();\n int height = source.getHeight();\n\n //find non zero minimum\n int min = Integer.MAX_VALUE;\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n if (getG8(source, x, y) < min && getG8(source, x, y) != 0) {\n min = getG8(source, x, y);\n }\n }\n }\n\n //subtract minimum from everything\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n if (getG8(source, x, y) != 0) {\n setG8(source, x, y, getG8(source, x, y) - min);\n }\n }\n }\n\n return source;\n }", "public void zoomIn(){\n\t\t zoomed = modifyDimensions(picture.getWidth(),getHeight()); //in primul pas se maresc dimensiunile pozei\n\t\t for(int i = 0; i < zoomed.getHeight(); i += 2) {\n\t for(int j = 0; j < zoomed.getWidth(); j += 2) {\n\t zoomed.setRGB(j, i, picture.getRGB(j / 2,i / 2));\n\n\t if (j + 1 < zoomed.getWidth()) {\n\t zoomed.setRGB(j + 1, i, mediePixeli(picture.getRGB(j / 2, i / 2), picture.getRGB((j + 2) / 2, i / 2))); // intre doua coloane se adauga media pixelilor din acestea\n\t }\n\t }\n\t }\n\n\n\t for(int i = 1; i < zoomed.getHeight(); i += 2){\n\t \tfor(int j = 0; j < zoomed.getWidth(); j++ ){\n\t zoomed.setRGB(j, i, mediePixeli(picture.getRGB((j - 1) / 2, i / 2), picture.getRGB((j + 1) / 2, (i / 2))));\n\t }\n\t }\n\t \n\t }", "public int getCurrentFloor() {\n return currentFloor;\n }", "public int getCurrentFloor() {\n return currentFloor;\n }", "@Override\n public void update() {\n if (oldFloorIndex != root.floorsController.getCurrentFloor()) {\n view.floorTitle.setText(\"Floor: \" + root.floorsController.getCurrentFloor());\n oldFloorIndex = root.floorsController.getCurrentFloor();\n }\n }", "public void k() {\n float f2 = BitmapDescriptorFactory.HUE_RED;\n for (float f3 : this.i) {\n if (f3 > BitmapDescriptorFactory.HUE_RED) {\n f2 += f3;\n }\n }\n if (f2 != BitmapDescriptorFactory.HUE_RED) {\n int length = this.i.length;\n for (int i2 = 0; i2 < length; i2++) {\n float[] fArr = this.i;\n if (fArr[i2] > BitmapDescriptorFactory.HUE_RED) {\n fArr[i2] = fArr[i2] / f2;\n }\n }\n }\n }", "@Override\r\n\tpublic void move(Map map) {\r\n\t\tRandom rand = new Random();\r\n\t\tdouble change = rand.nextDouble();\r\n\t\t\r\n\t\tif(change > 0.8) {\r\n\t\t\treverse = !reverse;\r\n\t\t}\r\n\r\n\t\tguardIndex = move_aux(guardIndex,coords,reverse,map);\r\n\t}", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "void rescaleIndicators(float magnification) {\n // if cellSize is 1\n boolean regenerate = scaleInterval((float) canvas.getMagnification());\n // System.out.println(\"regenerate = \" + regenerate);\n if (regenerate) {\n if (orient != null && anisotropy != null) {\n generateAreasAndIndicators();\n }\n }\n lastMagnification = magnification;\n }", "protected int moveUpFloor() {\n delayElevator();\n return currentFloor.incrementAndGet();\n }", "public FractalMapImpl() {\n this.shift = 0;\n }", "private void getTileNumber() {\r\n int xtile = (int) Math.floor((coordinates.getLon() + 180) / 360 * (1 << zoom));\r\n int ytile = (int) Math.floor((1 - Math.log(Math.tan(Math.toRadians(coordinates.getLat())) + 1 / Math.cos(Math.toRadians(coordinates.getLat()))) / Math.PI) / 2 * (1 << zoom));\r\n\r\n if (xtile < 0) xtile = 0;\r\n\r\n if (xtile >= (1 << zoom)) xtile = ((1 << zoom) - 1);\r\n\r\n if (ytile < 0) ytile = 0;\r\n\r\n if (ytile >= (1 << zoom)) ytile = ((1 << zoom) - 1);\r\n\r\n this.xtile = xtile;\r\n this.ytile = ytile;\r\n }", "public @NotNull Image flipH()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n if (this.format != ColorFormat.RGBA)\n {\n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n // OPTION 1: Move pixels with memCopy()\n long src = Integer.toUnsignedLong(y * this.width + this.width - 1 - x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, bytesPerLine);\n \n // OPTION 2: Just copy data pixel by pixel\n // output.put(y * this.width + x, this.data.getBytes(y * this.width + (this.width - 1 - x)));\n }\n }\n \n this.data.free();\n \n this.data = output;\n }\n else\n {\n // OPTION 3: Faster implementation (specific for 32bit pixels)\n // NOTE: It does not require additional allocations\n IntBuffer ptr = this.data.toBuffer().asIntBuffer();\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width / 2; x++)\n {\n int backup = ptr.get(y * this.width + x);\n ptr.put(y * this.width + x, ptr.get(y * this.width + this.width - 1 - x));\n ptr.put(y * this.width + this.width - 1 - x, backup);\n }\n }\n }\n this.mipmaps = 1;\n }\n \n return this;\n }", "void easy_ride_from_70kmh_down (double min_lift) { \n double start_speed = 70; // kmh\n double pitch = 0;\n double min_drag = 10000.0;\n double step = -10;\n velocity = start_speed;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if ((step < 0 && velocity+step <= 0) ||\n // (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }", "public void updateFarhenheight(){\n tempInF = ( (tempInC / 5.0 ) * 9.0 ) + 32;\n }", "public void clearFloor(Position pos) {\n\t\t\tcellLabels.get(pos.getColumn(), pos.getRow()).setText(\"\");\n\t\t\tcellLabels.get(pos.getColumn(), pos.getRow()).setBackground(Color.gray);\n\t\t}", "private void m7224b(Canvas canvas) {\n int i = this.f5600v - this.f5597s;\n int i2 = this.f5589i - (this.f5588h / 2);\n this.f5583c.setBounds(0, 0, this.f5588h, this.f5597s);\n this.f5584d.setBounds(0, 0, this.f5599u, this.f5598t);\n canvas.translate(0.0f, (float) i);\n this.f5584d.draw(canvas);\n canvas.translate((float) i2, 0.0f);\n this.f5583c.draw(canvas);\n canvas.translate((float) (-i2), (float) (-i));\n }", "public void mo8483f() {\n mo8472a((List<C1070b>) this.f3532b);\n mo8472a((List<C1070b>) this.f3533c);\n this.f3538h = 0;\n }", "protected byte[] getMeasuredFloorTemperature() {return null;}", "public void setFloor(String floor) {\n\t\tthis.floor = floor;\n\t}", "public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }", "private void m76767e() {\n m76765c();\n this.f61649f -= this.f61648e;\n if (this.f61649f < 0) {\n this.f61649f = 0;\n }\n m76768f();\n }", "public void moveTo(int floor) {\n if ( floor > TOP_FLOOR || floor < BOTTOM_FLOOR)\n return;\n while (currentFloor.get() != floor) {\n if (currentFloor.get() < floor) {\n direction.lazySet(Status.UP);\n moveUpFloor();\n }\n if (currentFloor.get() > floor) {\n direction.lazySet(Status.DOWN);\n moveDownFloor();\n }\n }\n }", "public void mo4354a() {\n this.f3151a = 0;\n this.f3152b = false;\n this.f3153c = false;\n this.f3154d = false;\n }", "@Test\n public void rectLowerLeftWriteTest() {\n final Rectangle rect = new Rectangle(-20, 30, 50, 50);\n minx = 0;\n miny = 0;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "public static void countResF() {\n mResF = new Vec3(/*-1.0f */ (float) Math.sin(Math.toRadians(mOri[1])),(float) Math.sin(Math.toRadians(mOri[0])), 0);\n\n\n /*Object aaa = new Object()\n {\n public void setUpsideDown() {\n mResF.swapXY();\n mResF.setX( mResF.x() * - 1.f );\n Log.e(\"YYYY: \", \" UPSIDEDOWN !!!\" + mnScreenOri + mnScreenRotation);\n }\n };*/\n\n\n switch (mnScreenRotation) {\n case Surface.ROTATION_0:\n mResF.swapXY();\n mResF.setY( mResF.y() * - 1.f );\n //Log.e(\"YYYY: \", \" NORMAL !!!\" + \" rot: \" + mnScreenRotation);\n break;\n case Surface.ROTATION_90:\n mResF.setX( mResF.x() * - 1.f );\n mResF.setY( mResF.y() * - 1.f );\n //Log.e(\"YYYY: \", \" Left !!!\" + \" rot: \" + mnScreenRotation);\n break;\n case Surface.ROTATION_180:\n mResF.swapXY();\n mResF.setX( mResF.x() * - 1.f );\n //Log.e(\"YYYY: \", \" UPSIDEDOWN !!!\" + \" rot: \" + mnScreenRotation);\n break;\n case Surface.ROTATION_270:\n //Log.e(\"YYYY: \", \" Right !!!\" + \" rot: \" + mnScreenRotation);\n break;\n }\n\n /*if ( -1 == mnScreenOri ) {\n\n //mResF.setX( mResF.x() * - 1.f );\n //mResF.setY( mResF.y() * - 1.f );\n Log.e(\"YYYY: \", \" TABLE !!!\" + mnScreenRotation);\n\n } else if ( 315 < mnScreenOri || mnScreenOri <= 45 ) { //0\n\n mResF.swapXY();\n mResF.setY( mResF.y() * - 1.f );\n\n Log.e(\"YYYY: \", \" NORMAL !!!\" + mnScreenOri + mnScreenRotation);\n\n } else if ( 225 < mnScreenOri ) { //1\n\n mResF.setX( mResF.x() * - 1.f );\n mResF.setY( mResF.y() * - 1.f );\n Log.e(\"YYYY: \", \" Left !!!\" + mnScreenOri + mnScreenRotation);\n\n\n } else if ( 135 < mnScreenOri ) { //2\n\n mResF.swapXY();\n mResF.setX( mResF.x() * - 1.f );\n Log.e(\"YYYY: \", \" UPSIDEDOWN !!!\" + mnScreenOri + mnScreenRotation);\n\n\n } else //if ( 45 < mnScreenOri ) //3\n {\n\n Log.e(\"YYYY: \", \" Right !!!\" + mnScreenOri + mnScreenRotation);\n\n }*/\n }", "private void onChange() {\n startTime = -1L;\n endTime = -1L;\n minLat = Double.NaN;\n maxLat = Double.NaN;\n minLon = Double.NaN;\n maxLon = Double.NaN;\n }", "private void mo71773u() {\n List imageInfos = this.f73950g.getImageInfos();\n if (imageInfos != null && !imageInfos.isEmpty()) {\n ImageInfo imageInfo = (ImageInfo) imageInfos.get(0);\n if (imageInfo != null) {\n this.mCoverView.setVisibility(0);\n this.mLineProgressBar.mo74361a();\n C23323e.m76524b(this.mCoverView, imageInfo.getLabelLarge());\n C23323e.m76502a(imageInfo.getLabelLarge(), (C23328a) new C23328a() {\n /* renamed from: a */\n public final void mo60609a(C13346c<C13326a<C13645c>> cVar) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }\n\n /* renamed from: a */\n public final void mo60610a(Exception exc) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }\n });\n }\n }\n }", "public void zeroValues()\n {\n fx = 0.0f;\n fy = 0.0f;\n fz = 0.0f;\n magnitude = 0.0f;\n }", "private void dec_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() - 1); }\n }" ]
[ "0.62272155", "0.6143575", "0.5912192", "0.5877597", "0.58113265", "0.57600886", "0.5732334", "0.5730637", "0.5710316", "0.5664473", "0.56284714", "0.55753636", "0.55648875", "0.5549245", "0.5548878", "0.5542541", "0.5490046", "0.54340655", "0.5429753", "0.5412152", "0.53962326", "0.5385221", "0.5384719", "0.53829175", "0.5363549", "0.5354338", "0.53534263", "0.532764", "0.531746", "0.5287885", "0.52859515", "0.5280607", "0.5263747", "0.52527034", "0.5250493", "0.5247858", "0.52323085", "0.52316016", "0.52302015", "0.5228849", "0.52112377", "0.52026355", "0.52016616", "0.5172552", "0.5169567", "0.516904", "0.51645774", "0.5156992", "0.5155691", "0.5150068", "0.51484895", "0.51412296", "0.5126556", "0.5119123", "0.5115946", "0.5113851", "0.5113666", "0.5111415", "0.5111019", "0.5103234", "0.5100529", "0.5084953", "0.5082442", "0.50669366", "0.50650364", "0.50637895", "0.5061814", "0.5044683", "0.5043613", "0.50394243", "0.5034468", "0.5034209", "0.502857", "0.5024043", "0.5024043", "0.50228244", "0.502186", "0.5015846", "0.50145847", "0.5008749", "0.5006212", "0.50020415", "0.4999927", "0.4999613", "0.49947962", "0.49932384", "0.49928197", "0.49902388", "0.49899194", "0.49867666", "0.49864802", "0.4984302", "0.4982209", "0.49784192", "0.4975549", "0.4974479", "0.49733734", "0.49727294", "0.49720573", "0.4970606", "0.49642074" ]
0.0
-1
Launch a timer task to perform animations
public static void startTimeout() { t = new Timer(); tt = new TimerTask() { public void run() { while (true) { if (diff[0] > 0 || diff[1] > 0) { try { runFocusPoint(); Thread.sleep(50); } catch (InterruptedException ex) { //ex.printStackTrace(); } } else { break; } } cancelTask(); diff[0] = 0; diff[1] = 0; } }; t.scheduleAtFixedRate(tt, 0, 50); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void anim() {\n // start the timer\n t.start();\n }", "public void startAnimation() {\n timer.start();\n }", "private void startAnimation(){\n\t TimerActionListener taskPerformer = new TimerActionListener();\n\t new Timer(DELAY, taskPerformer).start();\n \t}", "public void start() {\n if (animationTimer != null) {\n animationTimer.cancel();\n }\n animationTimer = new Timer();\n animationTimer.scheduleAtFixedRate(new AnimationTask(), 0, 25);\n }", "public void makeTimer(){\n\t\n\t\tframeIndex = 0;\n\t\n\t\t//Create a new interpolator\n\t\tInterpolator lint = new Interpolator();\n\t\n\t\t//interpolate between all of the key frames in the list to fill the array\n\t\tframes = lint.makeFrames(keyFrameList);\n\t\n\t\t//timer delay is set in milliseconds, so 1000/fps gives delay per frame\n\t\tint delay = 1000/fps; \n\t\n\t\n\t\tActionListener taskPerformer = new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tif(frameIndex == frames.length){ frameIndex = 0;}\n\n\t\t\t\tframes[frameIndex].display();\n\t\t\t\tframes[frameIndex].clearDisplay();\n\t\t\t\tframeIndex++;\n\t\t\t}\n\t\t};\n\n\t\ttimer = new Timer(delay, taskPerformer);\t\n\t}", "public abstract void animation(double seconds);", "private void startAnimation()\n\t{\n\t\tActionListener timerListener = new TimerListener();\n\t\tTimer timer = new Timer(DELAY, timerListener);\n\t\ttimer.start();\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tdimensionclip3.start();\r\n\t\t\t\t\t\t\tTimer fourtheffect = new Timer();\r\n\t\t\t\t\t\t\tTimerTask fourtheffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tdimensionclip4.start();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tfourtheffect.schedule(fourtheffecttask, 1300);\r\n\t\t\t\t\t\t}", "public void createTimer() {\n timer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (animal.changeScore()) {\n setNumber(animal.getPoints());\n }\n if (animal.getStop()) {\n System.out.println(\"Game Ended\");\n background.stopMusic();\n stop();\n background.stop();\n\n ArrayList list = null;\n try {\n list = scoreFile.sortFile(animal.getPoints());\n } catch (IOException e) {\n e.printStackTrace();\n }\n popUp(list);\n }\n }\n };\n }", "public void startAnimation()\n {\n if ( animationTimer == null )\n {\n currentImage = 0; // display first image\n \n // Create timer\n animationTimer = new Timer ( ANIMATION_DELAY, new TimerHandler() );\n \n animationTimer.start(); // start Timer\n } // end if statement\n else // animationTimer already exists, restart animation\n {\n if ( ! animationTimer.isRunning() )\n animationTimer.restart();\n } // end else statement\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tdimensionclip2.start(); // 두번째 효과음 재생\r\n\t\t\t\t\tTimer thirdeffect = new Timer();\r\n\t\t\t\t\tTimerTask thirdeffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\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\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tdimensionclip3.start();\r\n\t\t\t\t\t\t\tTimer fourtheffect = new Timer();\r\n\t\t\t\t\t\t\tTimerTask fourtheffecttask = new TimerTask() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tdimensionclip4.start();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tfourtheffect.schedule(fourtheffecttask, 1300);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\tthirdeffect.schedule(thirdeffecttask, 1400);\r\n\t\t\t\t}", "public void run() {\t\t\r\n\t\tif(this.stopped) {\r\n\t\t\tthis.animationFigure.showBusy(false);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(this.state==null || this.state.getState() == State.UNBLOCKED) {\r\n\t\t\tthis.finished=true;\r\n\t\t this.animationFigure.showBusy(false);\r\n\t\t\t//notify Listeners and tell them that animation finished. This listeners are user defined listeners which will be informed.\r\n\t\t\tanimationFigure.notifyAnimationListener(new AnimationFinishedEvent(animationFigure, AnimationFinishedEvent.BUSY_FINISHED));\r\n\t\t\t//notify observers, here the observer which listens if animation is finished. this Observer looks into the animationqueue \r\n\t\t\t//after each finished \r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers(this.animationFigure);\r\n\t\t\t\r\n\t\t\t// notify waiting threads\r\n\t\t\tsynchronized (this) {\r\n\t\t\t\tthis.notifyAll();\r\n\t\t\t}\r\n\t\t return;\r\n\t\t}\r\n\t\tif (counter >= 5) {\r\n\t\t\tcounter = 0;\r\n\t\t\tthis.animationFigure.showBusy(!this.animationFigure.isShowBusy());\r\n\t\t}\r\n\t\tcounter++;\r\n\t\tmap.getDisplay().timerExec(100, this);\t\t\t\r\n\t}", "public static void main(String[] args) \n { \n Timer timer = new Timer(); \n TimerTask task = new Helper(); \n\n timer.schedule(task, 3000, 5000); \n System.out.println(\"hi\");\n\n }", "@Override\n public void run() {\n runAnimation();\n }", "private void setupAnimationTimer() {\n new AnimationTimer() {\n @Override\n public void handle(long l) {\n view.movePlayer();\n view.updateView();\n }\n }.start();\n\n // Timeline for UI stuff\n uiTimeline = new Timeline();\n\n KeyFrame keyStart = new KeyFrame(\n Duration.seconds(0),\n e -> view.updateUI((1160 / distance) * 0.005)\n );\n KeyFrame keyEnd = new KeyFrame(Duration.millis(5));\n\n uiTimeline.getKeyFrames().addAll(keyStart, keyEnd);\n uiTimeline.setCycleCount(Timeline.INDEFINITE);\n uiTimeline.setAutoReverse(false);\n\n countdownTimer = new Timeline(\n new KeyFrame(\n Duration.seconds(distance - (1160 / distance) * 0.005),\n e -> journeyComplete()\n )\n );\n\n // Timeline for asteroids\n Timeline asteroidTimer = new Timeline(\n new KeyFrame(Duration.millis(2000), e -> model.AsteroidPool.spawn())\n );\n asteroidTimer.setCycleCount(Timeline.INDEFINITE);\n asteroidTimer.play();\n }", "public void play()\n{\n // If timer is null, create it\n if(_timer==null)\n _timer = new javax.swing.Timer(getInterval(), new ActionListener() {\n public void actionPerformed(ActionEvent e) { update(); }});\n\n // If animator not running, start timer\n if(!isRunning()) {\n \n // Record time animator was at and time started\n _playStartTime = getTime();\n _startTime = System.currentTimeMillis();\n \n // Start timer\n _timer.start();\n \n // Send animatorStarted notification\n for(Listener listener : getListeners(Listener.class)) listener.animatorStarted(this);\n }\n}", "public void run() {\n loadAlertAnimationDelay(aType);\n }", "public void run() {\n\t// Remember the starting time\n\tlong tm = System.currentTimeMillis();\n\twhile (Thread.currentThread() == animator) {\n\t // Display the next frame of animation.\n\t repaint();\n\n\t // Delay depending on how far we are behind.\n\t try {\n\t\ttm += delay;\n\t\tThread.sleep(Math.max(0, tm - System.currentTimeMillis()));\n\t } catch (InterruptedException e) {\n\t\tbreak;\n\t }\n\n\t // Advance the frame\n\t frame++;\n\t}\n }", "public void startAnimation() {\n int delay = 50; // milliseconds\n ActionListener taskPerformer = new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if (counter < points.length - 1) {\n counter += 20;\n if (counter > points.length) {\n counter = points.length - 1;\n ((Timer) evt.getSource()).stop();\n notifyStopped();\n }\n validate();\n repaint();\n } else {\n ((Timer) evt.getSource()).stop();\n notifyStopped();\n }\n }\n };\n new Timer(delay, taskPerformer, getFreeColClient()).start();\n }", "void startAnimation();", "private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }", "public void run()\n {\n // Remember the starting time\n long tm = System.currentTimeMillis();\n while (Thread.currentThread() == animator)\n {\n // Display the next frame of animation.\n update();\n try\n {\n tm += delay;\n Thread.sleep(Math.max(0, tm - System.currentTimeMillis()));\n }\n catch (InterruptedException e)\n {\n break;\n }\n // Advance the frame\n frame++;\n }\n }", "public static String _timeranimacion_tick() throws Exception{\nif (mostCurrent._imgmosquito.getLeft()>0 || mostCurrent._imgmosquito.getTop()>0) { \n //BA.debugLineNum = 338;BA.debugLine=\"imgMosquito.Left = imgMosquito.Left - 15\";\nmostCurrent._imgmosquito.setLeft((int) (mostCurrent._imgmosquito.getLeft()-15));\n //BA.debugLineNum = 339;BA.debugLine=\"imgMosquito.Top = imgMosquito.Top - 15\";\nmostCurrent._imgmosquito.setTop((int) (mostCurrent._imgmosquito.getTop()-15));\n }else {\n //BA.debugLineNum = 341;BA.debugLine=\"TimerAnimacion.Enabled = False\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5.setEnabled(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 343;BA.debugLine=\"butPaso1.Visible = False\";\nmostCurrent._butpaso1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 344;BA.debugLine=\"imgMosquito1.Left = -60dip\";\nmostCurrent._imgmosquito1.setLeft((int) (-anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (60))));\n //BA.debugLineNum = 345;BA.debugLine=\"imgMosquito1.Top = 50dip\";\nmostCurrent._imgmosquito1.setTop(anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (50)));\n //BA.debugLineNum = 346;BA.debugLine=\"imgMosquito1.Visible = True\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 347;BA.debugLine=\"TimerAnimacionEntrada.Initialize(\\\"TimerAnimacion\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.Initialize(processBA,\"TimerAnimacion_Entrada\",(long) (10));\n //BA.debugLineNum = 348;BA.debugLine=\"TimerAnimacionEntrada.Enabled = True\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.setEnabled(anywheresoftware.b4a.keywords.Common.True);\n };\n //BA.debugLineNum = 351;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void start() {timer.start();}", "public void actionPerformed(ActionEvent e) {\n PerformTimerTask();\n }", "public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }", "private TimerTask getTimerTask() {\n TimerTask timerTask = new TimerTask() {\n @Override\n public void run() {\n\n if (angleSignaled && !ConcurrencyUtil.isAnyAnimationOnRun()) {\n\n // numAnimationOnRun += 2;\n Map<String, Double> newAnglesMap = qiblaManager\n .fetchDeltaAngles();\n Double newNorthAngle = newAnglesMap\n .get(QiblaCompassManager.NORTH_CHANGED_MAP_KEY);\n Double newQiblaAngle = newAnglesMap\n .get(QiblaCompassManager.QIBLA_CHANGED_MAP_KEY);\n\n Message message = mHandler.obtainMessage();\n message.what = ROTATE_IMAGES_MESSAGE;\n Bundle b = new Bundle();\n if (newNorthAngle == null) {\n b.putBoolean(IS_COMPASS_CHANGED, false);\n } else {\n ConcurrencyUtil.incrementAnimation();\n b.putBoolean(IS_COMPASS_CHANGED, true);\n\n b.putDouble(COMPASS_BUNDLE_DELTA_KEY, newNorthAngle);\n }\n if (newQiblaAngle == null) {\n b.putBoolean(IS_QIBLA_CHANGED, false);\n\n } else {\n ConcurrencyUtil.incrementAnimation();\n b.putBoolean(IS_QIBLA_CHANGED, true);\n b.putDouble(QIBLA_BUNDLE_DELTA_KEY, newQiblaAngle);\n }\n\n message.setData(b);\n mHandler.sendMessage(message);\n } else if (ConcurrencyUtil.getNumAimationsOnRun() < 0) {\n Log.d(NAMAZ_LOG_TAG,\n \" Number of animations are negetive numOfAnimation: \"\n + ConcurrencyUtil.getNumAimationsOnRun());\n }\n }\n };\n return timerTask;\n }", "public void schedule() {\n cancel();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n runnable.run();\n }\n }, delay);\n }", "public void startTimer() {\n animationTimer = new AnimationTimer() {\n @Override\n public void handle(final long now) {\n videoController.update(now);\n if (videoController.isClosed()) {\n stopTimer();\n return;\n }\n roomController.update(now);\n timeLogController.update(now);\n }\n };\n timeLogController.clearInformationArea();\n animationTimer.start();\n }", "private void forestIncomeTimerStart(){\n forestIncomeTimer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n\n\n forestModel.setWood(forestModel.getWood()\n .add(forestModel.getElfIncome())\n .add(forestModel.getLumberjackIncome())\n .add(forestModel.getWoodcutterIncome()));\n setWoodLabel();\n setWoodIncomeLabel();\n\n\n\n\n\n }\n\n }, 1, 1000);\n }", "private void startTimer(){\n scoreboard.disableStart(true);\n timer.scheduleAtFixedRate(new TimerTask(){\n @Override\n public void run(){\n Platform.runLater(new Runnable(){\n @Override\n public void run() {\n scoreboard.updateTime();\n }\n });\n }\n },0,1000);\n }", "@Override\n public void run() {\n long startTime = System.currentTimeMillis();\n\n //Animation loop.\n while (Thread.currentThread() == animatorThread) {\n //Advance the animation frame.\n frameNumber++;\n repaint();\n //Delay depending on how far we are behind.\n try {\n startTime += delay;\n Thread.sleep(Math.max(0,\n startTime - System.currentTimeMillis()));\n } catch (InterruptedException e) {\n break;\n }\n }\n }", "private void setTimer() {\r\n timer = new Timer(TIMER_DELAY, new ActionListener() {\r\n public void actionPerformed(ActionEvent ae) {\r\n action();\r\n }\r\n });\r\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tanimDraw.stop();\n\t\t\t\t\tanimDraw2.stop();\t\t\t\t\n\t\t\t\t\thandler3.sendMessage(handler3.obtainMessage());\n\t\t\t\t}", "public void initializeTimerTask() {\n timerTask = new TimerTask() {\n public void run() {\n Log.i(\"in timer\", \"in timer ++++ \"+ (counter++));\n cek_tugas();\n uploadphoto();\n cekNotifSampai();\n cekJanjiSurvey();\n }\n };\n }", "public void startMiniTimer() {\n long millisInFuture = 10000;\r\n long countDownInterval = 1000;\r\n phaseTwoTimer = new CountDownTimer(millisInFuture, countDownInterval) {\r\n public void onTick(long millisUntilFinished) {\r\n long millis = millisUntilFinished;\r\n\r\n // notifications for time\r\n if (millis <= 10000 && millis > 9001) {\r\n Toast.makeText(getActivity(), \"10\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 9000 && millis >= 8001) {\r\n Toast.makeText(getActivity(), \"9\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 8000 && millis >= 7001) {\r\n Toast.makeText(getActivity(), \"8\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 7000 && millis >= 6001) {\r\n Toast.makeText(getActivity(), \"7\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 6000 && millis >= 5001) {\r\n Toast.makeText(getActivity(), \"6\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 5000 && millis >= 4001) {\r\n Toast.makeText(getActivity(), \"5\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 4000 && millis >= 3001) {\r\n Toast.makeText(getActivity(), \"4\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 3000 && millis >= 2001) {\r\n Toast.makeText(getActivity(), \"3\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 2000 && millis >= 1001) {\r\n Toast.makeText(getActivity(), \"2\", Toast.LENGTH_LONG).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"1\", Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n\r\n public void onFinish() {\r\n Toast.makeText(getActivity(), \"PHASE 2\", Toast.LENGTH_LONG).show(); // entering phase 2\r\n phase = 2;\r\n initTimer(rootView);\r\n drawNewBoards();\r\n }\r\n }.start();\r\n }", "private void runAnimation() {\n if (footage == null) {\n System.out.println(\"Load the footage first\");\n } else {\n Runnable animationToRun = () -> {\n\n Background yellowBg = new Background(new BackgroundFill(Color.YELLOW, CornerRadii.EMPTY, Insets.EMPTY));\n Background blackBg = new Background(new BackgroundFill(Color.BLACK, CornerRadii.EMPTY, Insets.EMPTY));\n Background blueBg = new Background(new BackgroundFill(Color.BLUE, CornerRadii.EMPTY, Insets.EMPTY));\n Background whiteBg = new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY));\n\n doRun = true;\n int numFrames = footage.getNumFrames();\n int currentFrameIndex = 0;\n Background bck = null;\n while (doRun) {\n if (currentFrameIndex >= numFrames - 1) currentFrameIndex = 0;\n IFrame currentFrame = footage.getFrame(currentFrameIndex);\n // Iterate through the current frame displaying appropriate colour\n for (int row = 0; row < footage.getNumRows(); row++) {\n for (int col = 0; col < footage.getNumRows(); col++) {\n switch (currentFrame.getChar(row, col)) {\n case 'l':\n bck = yellowBg;\n break;\n case 'r':\n bck = blackBg;\n break;\n case 'b':\n bck = blueBg;\n break;\n default:\n bck = whiteBg;\n }\n final int theRow = row;\n final int theCol = col;\n final Background backgroundColour = bck;\n // This is another lambda callback. When the Platform\n // GUI thread is ready it will run this code.\n Platform.runLater(() -> {\n\n // Update UI here\n // We have to make this request on a queue that the GUI thread\n // will run when ready.\n gridArray[theRow][theCol].setBackground(backgroundColour);\n });\n\n }\n }\n try {\n // This is how we delay for 200th of a second\n Thread.sleep(200);\n } catch (InterruptedException e) {\n }\n currentFrameIndex++;\n }\n };\n animation = new Thread(animationToRun);\n animation.start();\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tanimDraw.stop();\n\t\t\t\t\tanimDraw2.stop();\n\t\t\t\t\thandler.sendMessage(handler.obtainMessage());\n\t\t\t\t}", "@Override\n public void run() {\n long seconds = millisUntilFinished / 1000;\n long minutes = seconds / 60;\n\n String time = minutes % 60 + \":\" + seconds % 60;\n// double timeInDouble = Double.parseDouble(time);\n if(minutes >= 0 && seconds >= 0)holder.setText(time);\n else holder.setText(\"Task Completed\");\n\n millisUntilFinished -= 1000;\n\n Log.d(\"DEV123\",time);\n// imageView.setX(imageView.getX()+seconds);\n /* and here comes the \"trick\" */\n handler.postDelayed(this, 1000);\n }", "private void startTimer() {\n\t\ttimer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint currTime = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tjavafx.application.Platform.runLater(new Runnable () {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tcurrTime++;\n\t\t\t\t\t\ttimerLabel.setText(\"Time: \" + currTime);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000, 1000);\n\t}", "private void runTimer() {\n\n // Handler\n final Handler handler = new Handler();\n\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n if (playingTimeRunning) {\n playingSecs++;\n }\n\n handler.postDelayed(this, 1000);\n }\n });\n\n }", "private void startTime()\n {\n timer.start();\n }", "@Override\n public void run() {\n AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();\n frameAnimation.start();\n }", "private void createAnimation () {\n // KeyFrame frame = new KeyFrame(Duration.millis(MILLISECOND_DELAY), e -> myManager.step());\n // myAnimation = new Timeline();\n // myAnimation.setCycleCount(Timeline.INDEFINITE);\n // myAnimation.getKeyFrames().add(frame);\n }", "public void startTimer() {\n // TODO = handle more aspects of the behaviour required by the specification\n System.out.println(\"starting timer\");\n initialHeroCastle();\n isPaused = false;\n // trigger adding code to process main game logic to queue. JavaFX will target\n // framerate of 0.3 seconds\n timeline = new Timeline(new KeyFrame(Duration.seconds(0.1), event -> {\n if (world.getMode() == -1){\n modeSelectionSwitchToMainMenu();\n }\n world.runTickMoves();\n world.runBattles();\n world.updateGoal();\n if (world.goalAchieved()) {\n world.gameOver();\n deadSwitchToMainMenu(true);\n return;\n }\n List<Soldier> soldiers = world.possiblySpawnSoldiers();\n for (Soldier s : soldiers) {\n loadSoldier(s);\n }\n List<BasicEnemy> deadEnemies = world.cleanEnemies();\n for (BasicEnemy e : deadEnemies) {\n reactToEnemyDefeat(e);\n }\n List<BasicEnemy> newEnemies = world.possiblySpawnEnemies();\n for (BasicEnemy newEnemy : newEnemies) {\n loadEnemies(newEnemy);\n }\n printThreadingNotes(\"HANDLED TIMER\");\n loopNumber.setText(\"Loop: \" + (int) world.getCurrentLoop().get());\n if (world.isCharacterDead()) {\n if (!world.useOneRing())\n deadSwitchToMainMenu(false);\n return;\n }\n if (world.isAtHeroCastle() && world.shouldShopAppear()) {\n System.out.println(\"At Hero Castle. Shopping!\");\n shopSwitchToMainMenu();\n }\n }));\n timeline.setCycleCount(Animation.INDEFINITE);\n timeline.play();\n }", "public void start_handler_timer_task() {\n if (timertask != null) {\n return;\n }\n timertask = new Timer();\n timertask.scheduleAtFixedRate(new fyp002_Handler(), MOBILE_DELAY/2, MOBILE_INTERVAL/2);\n }", "@Override // se crea una clase anonima donde se implementa el metodo run porque Timer task implementa la interfaz runnable\r\n public void run() {\r\n System.out.println(\"Tarea realizada en: \" + new Date() + \" nombre del Thread: \"\r\n + Thread.currentThread().getName()); //retorna el nombre del hilo actual\r\n System.out.println(\"Finaliza el tiempo\");\r\n timer.cancel(); // termina este timer descartando cualquier tarea programada actual\r\n }", "public static String _timeranimacion_entrada_tick() throws Exception{\nif (mostCurrent._imgmosquito1.getLeft()<anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (220)) || mostCurrent._imgmosquito1.getTop()<anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (340))) { \n //BA.debugLineNum = 356;BA.debugLine=\"imgMosquito1.Left = imgMosquito1.Left + 20\";\nmostCurrent._imgmosquito1.setLeft((int) (mostCurrent._imgmosquito1.getLeft()+20));\n //BA.debugLineNum = 357;BA.debugLine=\"imgMosquito1.Top = imgMosquito1.Top + 20\";\nmostCurrent._imgmosquito1.setTop((int) (mostCurrent._imgmosquito1.getTop()+20));\n }else {\n //BA.debugLineNum = 359;BA.debugLine=\"TimerAnimacionEntrada.Enabled = False\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.setEnabled(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 364;BA.debugLine=\"butPaso1.Visible = False\";\nmostCurrent._butpaso1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 365;BA.debugLine=\"butPaso2.Visible = True\";\nmostCurrent._butpaso2.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 366;BA.debugLine=\"butPaso3.Visible = False\";\nmostCurrent._butpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 367;BA.debugLine=\"butPaso4.Visible = False\";\nmostCurrent._butpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 368;BA.debugLine=\"lblLabelPaso1.Visible = True\";\nmostCurrent._lbllabelpaso1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 369;BA.debugLine=\"lblPaso2a.Visible = False\";\nmostCurrent._lblpaso2a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 370;BA.debugLine=\"lblPaso2b.Visible = False\";\nmostCurrent._lblpaso2b.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 371;BA.debugLine=\"lblPaso3.Visible = False\";\nmostCurrent._lblpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 372;BA.debugLine=\"lblPaso3a.Visible = False\";\nmostCurrent._lblpaso3a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 373;BA.debugLine=\"lblPaso4.Visible = False\";\nmostCurrent._lblpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 374;BA.debugLine=\"imgPupas.Visible = False\";\nmostCurrent._imgpupas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 375;BA.debugLine=\"imgLarvas.Visible = False\";\nmostCurrent._imglarvas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 376;BA.debugLine=\"imgMosquito.Visible = False\";\nmostCurrent._imgmosquito.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 377;BA.debugLine=\"imgMosquito1.Visible = True\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 378;BA.debugLine=\"imgHuevos.Visible = True\";\nmostCurrent._imghuevos.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 379;BA.debugLine=\"lblEstadio.Visible = True\";\nmostCurrent._lblestadio.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 380;BA.debugLine=\"lblEstadio.Text = \\\"Huevo\\\"\";\nmostCurrent._lblestadio.setText(BA.ObjectToCharSequence(\"Huevo\"));\n //BA.debugLineNum = 381;BA.debugLine=\"utilidades.CreateHaloEffect(Activity, butPaso2,\";\nmostCurrent._vvvvvvvvvvvvvvvvvvvvv7._vvvvvvvvv3 /*void*/ (mostCurrent.activityBA,(anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(mostCurrent._activity.getObject())),mostCurrent._butpaso2,anywheresoftware.b4a.keywords.Common.Colors.Red);\n };\n //BA.debugLineNum = 384;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry{\t\t\t\t\t\t\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tanimDraw.stop();\n\t\t\t\t\tanimDraw2.stop();\t\t\t\t\n\t\t\t\t\thandler2.sendMessage(handler2.obtainMessage());\n\t\t\t\t}", "public void start() {\r\n\t\tif (animationFigure instanceof TrainFigure) {\r\n\t\t\t((TrainFigure) animationFigure).setBusyColor(org.eclipse.draw2d.ColorConstants.red);\r\n\t\t}\r\n\t\tcounter = 1;\r\n\t\t//notify Listeners\r\n\t\tanimationFigure.notifyAnimationListener(new AnimationStartedEvent(animationFigure, AnimationStartedEvent.BUSY_STARTED));\r\n\t\tthis.stopped=false;\r\n\t\tmap.getDisplay().asyncExec(this);\r\n\t}", "public void run()\r\n\t{\r\n\t\ttimer.scheduleAtFixedRate(this.getTimerTask(), 0, repeat * 60 * 1000);\r\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n //initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "private void idleAnimation(){\n timer++;\n if( timer > 4 ){\n setImage(loadTexture());\n animIndex++;\n timer= 0;\n if(animIndex > maxAnimIndex ){\n animIndex = 0;\n }\n }\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\trepaint(); //Timer will invoke this method which then refreshes the screen\r\n\t\t\t\t // for the \"animation\"\r\n\t}", "public abstract void animationStarted();", "public void starteSpiel(ActionEvent actionEvent) {\n System.out.println(\"Started\");\n //https://www.programcreek.com/java-api-examples/?api=javafx.animation.AnimationTimer\n //60 fps\n new AnimationTimer() {\n public void handle(long currentNanoTime) {\n // calculate time since last update.\n moveBall();\n }\n }.start(); // Was diese?\n\n\n }", "public void run()\n \t\t{\n \t\t\t//Update the timer label\n \t\t\tsetTime();\n \t\t}", "private static void timerTest1() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}\n\t\t}, 2000);\n\n\t}", "public void start()\n {\n animator = new Thread(this);\n animator.start();\n }", "private void rerunAnimation() {\n transition.playFromStart();\r\n}", "public final void setJam(){\nActionListener taskPerformer = new ActionListener() {\n\npublic void actionPerformed(ActionEvent evt) {\nString nol_jam = \"\", nol_menit = \"\",nol_detik = \"\";\n\njava.util.Date dateTime = new java.util.Date();\nint nilai_jam = dateTime.getHours();\nint nilai_menit = dateTime.getMinutes();\nint nilai_detik = dateTime.getSeconds();\n\nif(nilai_jam <= 9) nol_jam= \"0\";\nif(nilai_menit <= 9) nol_menit= \"0\";\nif(nilai_detik <= 9) nol_detik= \"0\";\n\nString jam = nol_jam + Integer.toString(nilai_jam);\nString menit = nol_menit + Integer.toString(nilai_menit);\nString detik = nol_detik + Integer.toString(nilai_detik);\n\nlblwktu.setText(jam+\":\"+menit+\":\"+detik+\"\");\n}\n};\nnew Timer(1000, taskPerformer).start();\n}", "public GameTimer()\n \t{\n \t\tsuper();\n \t\tt = new Task();\n \t\tscheduleAtFixedRate( t, 0, 1000 );\n \t\tstartTime = System.currentTimeMillis();\n \t}", "public void startAnimation() {\r\n\t\tani.start();\r\n\t}", "@Override\n public void run() {\n drawComponents();\n // Ve lai sau 1p\n drawComponentsHandler.postDelayed(drawComponentsRunnable, 60000);\n }", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "public static void main(String[] args) {\n\n Timer timer = new Timer();\n final TimerTask task = new TimerTask() {\n\n @Override\n public void run() {\n System.out.println(\"=====\" + System.currentTimeMillis());\n try {\n TimeUnit.SECONDS.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n };\n timer.schedule(task, 1000, 1000);\n }", "private void startGame() {\n\t\ttimer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new ScheduleTask(), 5, BreakoutBall.BALLSPEED);\n\t}", "void onStart(int duration);", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tThread.sleep(this.timerTime);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.timerFinished = true;\n\t}", "synchronized void run() {\n \n // add pending animations\n animations.addAll(addedAnims);\n addedAnims.clear();\n \n if (numberOfFrames == timeMeasureInterval) {\n startTime = System.nanoTime();\n TOL = 1.0 / getFps();\n }\n \n if (animations.size() > 0) {\n \n ArrayList<AnimationBase> delList = new ArrayList<AnimationBase>();\n \n try {\n \n for (AnimationBase a : animations) {\n \n if (a.deletionRequested()) {\n delList.add(a);\n } else {\n a.run();\n }\n \n if (a.getTime() == 1.0) {\n \n boolean deleteAnimation = a.deleteAfterExecution()\n && (a.getRepeats() >= a.getNumberOfRepeats());\n \n if (deleteAnimation) {\n delList.add(a);\n } else {\n a.reset();\n }\n }\n }\n \n for (AnimationBase a : delList) {\n removeAnimation(a);\n a.reset();\n // System.out.println(\"DEL Anim: \" + a.getClass().getName());\n }\n \n } catch (java.util.ConcurrentModificationException ex) {\n // we ignore this as the worst that can happen are unomportant\n // visual inconsistencies\n ex.printStackTrace(System.err);\n }\n \n } else {\n if (repaintThread != null) {\n repaintThread.stop();\n }\n }\n \n if (oldTime != 0 && numberOfFrames == timeMeasureInterval) {\n long diff = (startTime - oldTime) / timeMeasureInterval;\n if (diff == 0) {\n setFps(30);\n } else {\n setFps((long) 1e9 / diff);\n }\n }\n \n // don't allow 0 fps\n if (Math.abs(getFps()) < TOL){\n setFps(30);\n numberOfFrames = 0; // retrigger fps measurement\n }\n \n // System.out.println(\">> AnimationManager: Frame: \" +\n // numberOfFrames + \" FPS=\" +\n // getFps());\n \n if (isShowFPS()) {\n System.out.println(\">> AnimationManager: FPS=\" + getFps());\n }\n if (numberOfFrames == timeMeasureInterval) {\n oldTime = startTime;\n numberOfFrames = 0;\n }\n numberOfFrames++;\n }", "public void start()\n {\n clock = new java.util.Timer();\n clock.schedule(\n new TimerTask() //This is really a new anonymous class, extending TimerTask.\n {\t\t\t\t\t //Since it has only one method, it seemed easiest to create it in line here.\n public void run() //Called by the Timer when scheduled.\n {\n timeElapsed++;\n if (timeElapsed > 999) //999 is the highest 3 digit integer, the highest number that can\n {\t\t\t\t\t\t\t //be shown on the displays. Beyond that, the player automatically loses.\n endGame(false);\n return;\n }\n repaint();\n }\n }\n \t\t\t, 1000, 1000); //1000 milliseconds, so a repeated 1 second delay.\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask,100,1000);\n\n }", "public static void startTimerLabel()\n {\n {\n if (timeline != null) {\n timeline.stop();\n }\n timeSeconds.set(STARTTIME);\n //timeLabel.setText(timeSeconds.toString());\n timeline = new Timeline();\n //timeline.setCycleCount(timeline.INDEFINITE); // need this?\n\n timeline.getKeyFrames().add(\n new KeyFrame(Duration.seconds(STARTTIME+1),\n new EventHandler<ActionEvent>() {\n public void handle(ActionEvent event) {\n //System.out.println(\"Got Timer timeout.\");\n if (cancel == false) {\n SceneResultsTimed.updatePlayerScore();\n localStage.setScene(SceneMgr.getScene(SceneMgr.IDX_RESULTSTIMED));\n }\n }\n },\n new KeyValue(timeSeconds, 0)));\n timeline.playFromStart();\n }\n }", "private void startTimer() {\n Timer.addTimeout(endTime, this);\n }", "private void initTimer(){\r\n\t\ttimer = new Timer() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t};\r\n\t}", "void onAnimationStart();", "public void PerformTimerTask() {\n \tif(refreshRate !=0){\n x+=px;\n y+=py;\n if (x+width >= panelW) {\n x = panelW - width;\n px = -px;\n }\n if (y+height >= panelH) {\n y = panelH - height;\n py = -py;\n }\n if (x < 0) {\n x = 0;\n px = -px;\n }\n if (y < 0) {\n y = 0;\n py = -py;\n }\n repaint();\n \t}\n }", "public void mo5969f() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n duration.addListener(new C1298Va(this));\n }", "public HousingAnimation() {\n\t\tsetSize(WINDOW_X, WINDOW_Y);\n\t\tsetVisible(true);\n\n\t\tTimer timer = new Timer(TENANT_SPEED, this);\n\t\ttimer.start();\n\t\n\t\t//addGui(tenant.getGui());\n\t}", "@Override\n public void startGame() {\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n update();\n }\n }, 0, 2);\n }", "public void startTimer() {\n mStatusChecker.run();\n }", "public static void main(String args[]) {\n\t\tTimer timer = new Timer(true);\n\t\t// timer.scheduleAtFixedRate(timerTask, 0, 1 * 1000);\n\t\ttimer.schedule(new MyTimerTask(1), 100);\n\t\ttimer.schedule(new MyTimerTask(2), 300);\n\t\ttimer.schedule(new MyTimerTask(3), 100);\n\t\ttimer.schedule(new MyTimerTask(4), 200);\n\t\ttimer.schedule(new MyTimerTask(5), 100);\n\t\tSystem.out.println(\"TimerTask started\");\n\t\t// cancel after sometime\n\t\ttry {\n\t\t\tThread.sleep(20000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttimer.cancel();\n\t\tSystem.out.println(\"TimerTask cancelled\");\n\t\ttry {\n\t\t\tThread.sleep(3000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, 10000);\n }", "private void TimerMethod() {\n this.runOnUiThread(Timer_Tick);\n }", "@Override\n\tpublic void run() {\n\t\tif (state != 3) {\n\t\t\tthis.requestFocus();\n\t\t\tlong lastTime = System.nanoTime();\n\t\t\tdouble amountOfTicks = 60.0;\n\t\t\tdouble ns = 1000000000 / amountOfTicks;\n\t\t\tdouble delta = 0;\n\t\t\tlong timer = System.currentTimeMillis();\n\t\t\tint frames = 0;\n\t\t\twhile (isRunning) {\n\n\t\t\t\tlong now = System.nanoTime();\n\n\t\t\t\tdelta += (now - lastTime) / ns;\n\t\t\t\tlastTime = now;\n\n\t\t\t\twhile (delta >= 1) {\n\t\t\t\t\ttick();\n\t\t\t\t\tdelta--;\n\t\t\t\t}\n\t\t\t\trender();\n\t\t\t\tframes++;\n\n\t\t\t\tif (System.currentTimeMillis() - timer > 1000) {\n\t\t\t\t\ttimer += 1000;\n\t\t\t\t\tframes = 0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tstop();\n\n\t\t}\n\n\t}", "public void startTimer() {\n timer = new Timer();\n //initialize the TimerTask's job\n initializeTimerTask();\n //schedule the timer, to wake up every 1 second\n timer.schedule(timerTask, 1000, 1000); //\n }", "public void run() {\n Timeline timeline = new Timeline(new KeyFrame(Duration.millis(17),\n t -> this.draw()));\n\n timeline.setCycleCount(Timeline.INDEFINITE);\n timeline.play();\n }", "public void schedule(Runnable job, long delay, TimeUnit unit);", "public void mo5964b() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5436pa, \"alpha\", new float[]{0.0f, 0.3f, 0.5f, 0.7f, 0.9f, 1.0f}).setDuration(j).start();\n this.f5438qa.getMeasuredHeight();\n this.f5384D.getmImageViewHeight();\n C1413m.m6828a(27, this.f5389I);\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n this.f5384D.getmImageView().setImageResource(R.drawable.iqoo_buttonanimation);\n this.f5393M = (AnimationDrawable) this.f5384D.getmImageView().getDrawable();\n this.f5393M.start();\n duration.addListener(new C1300Wa(this));\n }", "public void userStart(View view){\n\n glay.animate().alpha(1).start();\n wlay.animate().alpha(0).start();\n\n\n started = true;\n\n\n\n ilay.animate().alpha(0).start();\n //Defining the score and total of exercises\n score = total = 0;\n\n //set the time\n sec = 60;\n start.animate().alpha(0).start();\n appRun();\n\n }", "public void run() {\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }", "public ProgressTimer(boolean showOutput) {\r\n \tdoOutput = showOutput;\r\n \tstartTime = System.currentTimeMillis();\r\n TimerTask timerTask = new TimerTask() {\r\n @Override\r\n public void run() {\r\n if (doOutput) System.out.print(\".\");\r\n counter++;//increments the counter\r\n }\r\n };\r\n if (doOutput) System.out.print(\" \");\r\n timer = new Timer(\"ProgressTimer\");//create a new Timer\r\n\r\n timer.scheduleAtFixedRate(timerTask, 30, 1000);//this line starts the timer at the same time its executed\r\n }", "public void run() {\n while (true) {\n animate();\n repaint();\n \n \n double seconds = .04; //time that 1 frame takes.\n int miliseconds = (int) (1000.0 * seconds);\n try {\n Thread.sleep(miliseconds);\n } catch (InterruptedException e) {\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\t\n\t // Inizializza nome thread\n\t Thread.currentThread().setName(\"Timer\");\n\t \n\t // Richiama procedura di gestione aggiornamento configurazione\n\t update();\n }", "public final void doAnimation(double seconds)\n\t{\n\t\tthis.seconds_passed += seconds;\n\t\tthis.animation(seconds);\n\t}", "protected abstract void animate(int anim);", "private static void timerTest3() {\n\t\tTimer timer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest3\");\n\n\t\t\t}\n\t\t}, 2000, 1000);\n\n\t}" ]
[ "0.7544263", "0.7246182", "0.7242279", "0.71568906", "0.7087059", "0.6967717", "0.6866369", "0.6772612", "0.6677174", "0.6647483", "0.6613125", "0.6604971", "0.6589058", "0.65746313", "0.65707827", "0.6566043", "0.64562625", "0.6420543", "0.64187", "0.63731223", "0.6360498", "0.63353825", "0.6335034", "0.6329658", "0.63289416", "0.6293426", "0.62751603", "0.6253025", "0.6224885", "0.619724", "0.6180275", "0.6169364", "0.6148293", "0.61470044", "0.6141495", "0.6136446", "0.61295956", "0.61074704", "0.6102547", "0.6096671", "0.6084208", "0.6079121", "0.606313", "0.6056829", "0.6055093", "0.60455096", "0.60447353", "0.6032802", "0.60232526", "0.60227174", "0.60196686", "0.6016184", "0.60121185", "0.60101974", "0.6004343", "0.60031337", "0.59619", "0.59586203", "0.59584814", "0.5957618", "0.59499085", "0.5939802", "0.593297", "0.5921384", "0.5907922", "0.58963424", "0.58923304", "0.5884355", "0.5884178", "0.58829963", "0.5876777", "0.58749694", "0.58749646", "0.58745915", "0.586723", "0.58655775", "0.58606875", "0.58597237", "0.58551866", "0.58451205", "0.58446515", "0.58416975", "0.583968", "0.58353454", "0.5826252", "0.58237123", "0.5822419", "0.5812203", "0.5795876", "0.5793174", "0.5792712", "0.578468", "0.5784532", "0.5784405", "0.5784021", "0.5783771", "0.5783722", "0.57802504", "0.57782173", "0.57698035" ]
0.58999187
65
cancels and starts the timer task
private void reStartTimeout() { cancelTask(); startTimeout(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void schedule() {\n cancel();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n runnable.run();\n }\n }, delay);\n }", "private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}", "public void initializeTimerTask() {\n timerTask = new TimerTask() {\n public void run() {\n Log.i(\"in timer\", \"in timer ++++ \"+ (counter++));\n cek_tugas();\n uploadphoto();\n cekNotifSampai();\n cekJanjiSurvey();\n }\n };\n }", "private static void timerTest1() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}\n\t\t}, 2000);\n\n\t}", "protected void cancelTimerTask() {\n ScheduledTimerTask scheduledTimerTask = this.scheduledTimerTask;\n if (null != scheduledTimerTask) {\n this.scheduledTimerTask = null;\n scheduledTimerTask.cancel();\n }\n }", "public void stoptimertask() {\n if (timer != null) {\r\n timer.cancel();\r\n timer = null;\r\n }}", "public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}", "@Override // se crea una clase anonima donde se implementa el metodo run porque Timer task implementa la interfaz runnable\r\n public void run() {\r\n System.out.println(\"Tarea realizada en: \" + new Date() + \" nombre del Thread: \"\r\n + Thread.currentThread().getName()); //retorna el nombre del hilo actual\r\n System.out.println(\"Finaliza el tiempo\");\r\n timer.cancel(); // termina este timer descartando cualquier tarea programada actual\r\n }", "public void start() {\n\t\ttry {\n\t\t\t_timer.cancel();\n\t\t} catch (Exception e) {\n\t\t\t// Attempting to stop just in case, so this isn't a problem.\n\t\t}\n\t\t_timer = new Timer();\n\t\ttry {\n\t\t\t_timer.schedule(getTask(), TIME, TIME);\n\t\t} catch (IllegalStateException e) {\n\t\t\tstop();\n\t\t\tstart(); // Redo method if it was already running before.\n\t\t}\n\t}", "public void startTimer() {\n timer = new Timer();\n //initialize the TimerTask's job\n initializeTimerTask();\n //schedule the timer, to wake up every 1 second\n timer.schedule(timerTask, 1000, 1000); //\n }", "private void startTime()\n {\n timer.start();\n }", "protected void stopTimeTask() {\n\t\tif (chatAsyncTask!=null) {\n\t\t\tchatAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (liveAsyncTask!=null) {\n\t\t\tliveAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (timerTask!=null) {\n\t\t\ttimerTask.cancel();\n\t\t\ttimerTask = null;\n\t\t}\n\t\t\n\t\tif (timer!=null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t\t\n\t\t\n\t}", "public void start() {timer.start();}", "private void startTimer() {\n Timer.addTimeout(endTime, this);\n }", "public static void startTimeout() {\n t = new Timer();\n tt = new TimerTask() {\n\n public void run() {\n while (true) {\n if (diff[0] > 0 || diff[1] > 0) {\n try {\n runFocusPoint();\n Thread.sleep(50);\n } catch (InterruptedException ex) {\n //ex.printStackTrace();\n }\n } else {\n break;\n }\n }\n cancelTask();\n diff[0] = 0;\n diff[1] = 0;\n }\n };\n t.scheduleAtFixedRate(tt, 0, 50);\n }", "public void beginTimer(View view) {\n if (!isRunning) {\n isRunning = true;\n startButton.setText(R.string.stop_text);\n startTime = System.currentTimeMillis();\n timeHandler.removeCallbacks(startTimer);\n timeHandler.postDelayed(startTimer, 0);\n } else {\n startButton.setText(R.string.go_button);\n stopTimer();\n }\n }", "private void cancelSchedule() {\n\n if (timer == null)\n return;\n // timer.cancel();\n }", "void cancelTimeout() {\n timer.cancel();\n }", "public synchronized void start() {\r\n\t\tif(type == TYPE_DELAY) {\r\n\t\t\tdate = new Date(System.currentTimeMillis() + delay);\r\n\t\t}\r\n\t\tif(started) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tstarted = true;\r\n\t\ttm.addStartedTimers(this);\t\t\r\n//\t\ttm.getHandler().post(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tdoCancel();\r\n//\t\t\t\tdoStart();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "public void startTimer() {\n mStatusChecker.run();\n }", "public void stopTimerTask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void startTeleopTimer() {\n t.reset();\n t.start();\n }", "private void cancelTimeout(){\n\t\tSharedPreferences timeout = mContext.getSharedPreferences(\"Timeout\"+Integer.toString(mRid), Context.MODE_PRIVATE);\n\t SharedPreferences.Editor editor = timeout.edit();\n\t editor.putLong(\"start\", 0);\n\t editor.apply();\n\t}", "@Override\n public void run() {\n time_ = (int) (System.currentTimeMillis() - startTime_) / 1000;\n updateUI();\n\n if (time_ >= maxTime_) {\n // Log.v(VUphone.tag, \"TimerTask.run() entering timeout\");\n handler_.post(new Runnable() {\n public void run() {\n report(true);\n }\n });\n }\n }", "public GameTimer()\n \t{\n \t\tsuper();\n \t\tt = new Task();\n \t\tscheduleAtFixedRate( t, 0, 1000 );\n \t\tstartTime = System.currentTimeMillis();\n \t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, to wake up every 1 second\n timer.schedule(timerTask, 10000, 10000);\n }", "private SleeperTask()\r\n\t{\r\n\t\ttimer = new Timer();\r\n\t\tprovider = null;\r\n\t\taction = \"\";\r\n\t\tverbose = false;\r\n\t\tsetRepeat(5);\r\n\t}", "public void cancel() {\n timer.cancel();\n timer = new Timer();\n }", "public void startTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" timer started\");\n if(newTimer != null){\n //newTimer = new Timer();\n if(timerTask != null) timerTask.cancel();\n newTimer.purge();\n timerTask = new TimerTask() {\n @Override\n public void run() {\n timerEngine();\n }\n };\n newTimer.schedule(timerTask,(getModel().getRefreshTime()*1000),(getModel().getRefreshTime()*1000)/2);\n }\n }", "public void startCount() {\n //meetodi k�ivitamisel nullime tunnid, minutid, sekundid:\n secondsPassed = 0;\n minutePassed = 0;\n hoursPassed = 0;\n if (task != null)\n return;\n task = new TimerTask() {\n @Override\n public void run() {//aeg l�ks!\n secondsPassed++; //loeme sekundid\n if (secondsPassed == 60) {//kui on l�binud 60 sek, nullime muutujat\n secondsPassed = 0;\n minutePassed++;//kui on l�binud 60 sek, suurendame minutid 1 v�rra\n }\n if (minutePassed == 60) {//kui on l�binud 60 min, nullime muutujat\n minutePassed = 0;\n hoursPassed++;//kui on l�binud 60 min, suurendame tunnid 1 v�rra\n }\n //kirjutame aeg �les\n String seconds = Integer.toString(secondsPassed);\n String minutes = Integer.toString(minutePassed);\n String hours = Integer.toString(hoursPassed);\n\n if (secondsPassed <= 9) {\n //kuni 10 kirjutame 0 ette\n seconds = \"0\" + Integer.toString(secondsPassed);\n }\n if (minutePassed <= 9) {\n //kuni 10 kirjutame 0 ette\n minutes = \"0\" + Integer.toString(minutePassed);\n }\n if (hoursPassed <= 9) {\n //kuni 10 kirjutame null ettte\n hours = \"0\" + Integer.toString(hoursPassed);\n }\n\n\n time = (hours + \":\" + minutes + \":\" + seconds);//aeg formaadis 00:00:00\n getTime();//edastame aeg meetodile getTime\n\n }\n\n };\n myTimer.scheduleAtFixedRate(task, 0, 1000);//timer k�ivitub kohe ja t��tab sekundite t�psusega\n\n }", "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask,100,1000);\n\n }", "public void startTimer() {\n startTime = System.currentTimeMillis();\n }", "public void resetTimer(){\n timerStarted = 0;\n }", "public static void cancelTask() {\n try {\n if (Utils.isNotNull(tt)) {\n tt.cancel();\n }\n if (Utils.isNotNull(t)) {\n t.cancel();\n }\n } catch (Throwable e) {\n //Utils.debugModePrintStack(e, \"FMap\", \"cancelTask\");\n } finally {\n tt = null;\n t = null;\n }\n timeoutValue = 0;\n }", "public void stoptimertask() {\n\t\tif (timer != null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t}", "private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }", "void resetTimeout() {\n timer.cancel();\n timer = getTimer();\n timer.schedule(getTimerTask(), this.timeout);\n }", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "public void resume()\r\n {\r\n\t timer.start();\r\n }", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, 10000);\n }", "Timer getTimer();", "public void cancel() {\n\t\tif(hasStarted) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"An alarm has not been started\");\n\t\t}\n\t}", "public static void initTimer(){\r\n\t\ttimer = new Timer();\r\n\t timer.scheduleAtFixedRate(new TimerTask() {\r\n\t public void run() {\r\n\t \t//se o player coletar todas os lixos, o tempo para\r\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }\r\n\t\t}, 1000, 1000);\r\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n //initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "void activateAlarmThenStop(){\n\t Runnable soundAlarmTask = new SoundAlarmTask();\n\t ScheduledFuture<?> soundAlarmFuture = fScheduler.schedule(\n\t soundAlarmTask, startTime, TimeUnit.SECONDS\n\t );\n\t Runnable stopAlarm = new StopAlarmTask(soundAlarmFuture);\n\t fScheduler.schedule(stopAlarm, 3601, TimeUnit.SECONDS);\n\t \n\t System.out.println(\"methodStartTime: \" + startTime);\n\t \n\t //commented out below 2 lines, b/c I don't want this to stop!\n\t //Runnable stopAlarm = new StopAlarmTask(soundAlarmFuture);\n\t //fScheduler.schedule(stopAlarm, fShutdownAfter, TimeUnit.SECONDS);\n\t }", "public void StartTimer() {\n\t\tCount = new Timer();\n\t}", "private void initTimerTask() {\n\t\t\n\t\ttimerTask = new TimerTask() { \n\t\t @Override \n\t\t public void run() { \n\t\t // TODO Auto-generated method stub \n\t\t \t\n\t\t \tif (isCompleteQuery) {\n\t\t \t\tisCompleteQuery = !isCompleteQuery;\n\t\t \t\t\n\t\t \t\tMessage message = new Message(); \n\t\t\t message.what = 911; \n\t\t\t handler.sendMessage(message); \n\t\t\t LogUtils.i(\"*****************定时任务查询\");\n\t\t\t\t}\n\t\t \n\t\t } \n\t\t}; \n\t\tif (timer == null) {\n\t\t\ttimer = new Timer();\n\t\t}\n\t\t\n\t\ttimer.schedule(timerTask, 10000, 5000);//延迟10秒查询,每5秒执行一次\n\t}", "private void cancelTimer() {\n Timer.cancelTimeout(this);\n responded = true;\n }", "public void startTime() {\n if (!isRunning) {\n timer = new Timer();\n clock = new Clock();\n timer.scheduleAtFixedRate(clock,0,1000);\n isRunning = true;\n }\n }", "@Override\n public void run() {\n timer2.cancel();\n if(alarmcount==0)\n {\n setAlarm.setVisible(false);\n stopAlarm.setVisible(true);\n\n MC.Stop();\n MC.Play(songalarm);\n play_button.setVisible(true);\n pause_button.setVisible(false);\n }\n timeRemaining.setText(\"RINGG!!\");\n //stopAlarm.setVisible(true);\n }", "private void stopTime()\n {\n timer.stop();\n }", "public void start_handler_timer_task() {\n if (timertask != null) {\n return;\n }\n timertask = new Timer();\n timertask.scheduleAtFixedRate(new fyp002_Handler(), MOBILE_DELAY/2, MOBILE_INTERVAL/2);\n }", "@Override\n public void run() {\n timer2.cancel();\n if(alarmcount==0)\n {\n setAlarm.setVisible(false);\n stopAlarm.setVisible(true);\n \n MC.Stop();\n MC.Play(songalarm);\n play_button.setVisible(true);\n pause_button.setVisible(false);\n }\n timeRemaining.setText(\"RINGG!!\");\n //stopAlarm.setVisible(true);\n }", "public void actionPerformed(ActionEvent e) {\n PerformTimerTask();\n }", "public static void main(String[] args) \n { \n Timer timer = new Timer(); \n TimerTask task = new Helper(); \n\n timer.schedule(task, 3000, 5000); \n System.out.println(\"hi\");\n\n }", "public void setTimer() {\n\t\t\n\t}", "public void stop() {timer.stop();}", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "@Override\n public void onClick(View view) {\n newtimer.cancel();\n finish();\n }", "void resetLoop () {\n try {\n timer.cancel();\n timer.purge();\n } catch (Exception e) {\n\n }\n timer = new Timer();\n timer.schedule(new LoopTask(), stepDelay, stepDelay);\n }", "public void buildTimer() {\n if(mTask.isRunning()) {\n // Update the time from when the timer was last running\n if(mTask.getLastTick() > 0) {\n mTask.incrementTime((int) ((System.currentTimeMillis() - mTask.getLastTick()) / 1000));\n mTask.setLastTick(-1);\n invalidate();\n }\n\n // Create and start the timer\n if(mTimer != null) mTimer.interrupt();\n mTimer = new TaskTimerThread(mTask, 1, this);\n mTimer.start();\n Log.v(TAG, \"Started timer\");\n } else {\n // Stop the timer and clear the last tick\n if(mTimer != null) mTimer.interrupt();\n mTask.setLastTick(-1);\n Log.v(TAG, \"Stopped timer\");\n }\n }", "public void startTimer() {\n\t\ttimer.start();\n\t}", "public abstract void startInitTimer();", "private AppTimer() {\n\t\tstart();\n\t}", "private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }", "public void stopTime() {\n if (isRunning) {\n timer.cancel();\n timer.purge();\n }\n isRunning = false;\n }", "public void startClick (View view){\n \tif(stopped){\n \t\tstartTime = System.currentTimeMillis() - elapsedTime; \n \t}\n \telse{\n \t\tstartTime = System.currentTimeMillis();\n \t}\n \tmHandler.removeCallbacks(startTimer);\n mHandler.postDelayed(startTimer, 0);\n showStopButton();\n }", "public void resetTimer() {\n\t\tsetStartingTime(System.currentTimeMillis());\t\n\t\tthis.progressBar.setForeground(Color.black);\n\t\tlogger.fine(\"Set normal timer with data: \" + this.toString());\n\n\t}", "public void run()\r\n\t{\r\n\t\ttimer.scheduleAtFixedRate(this.getTimerTask(), 0, repeat * 60 * 1000);\r\n\t}", "public void resetTimer() {\n button.setText(\"Notify Me!\");\n timerSeekBar.setProgress(60);\n timerSeekBar.setEnabled(true);\n timerText.setText(\"1:00\");\n counter.cancel();\n counterActive = false;\n }", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "void start_timer(){\n tv_verify_downtime.setVisibility(View.VISIBLE);\n countDownTimer.start();\n }", "public static void main(String args[]) {\n\t\tTimer timer = new Timer(true);\n\t\t// timer.scheduleAtFixedRate(timerTask, 0, 1 * 1000);\n\t\ttimer.schedule(new MyTimerTask(1), 100);\n\t\ttimer.schedule(new MyTimerTask(2), 300);\n\t\ttimer.schedule(new MyTimerTask(3), 100);\n\t\ttimer.schedule(new MyTimerTask(4), 200);\n\t\ttimer.schedule(new MyTimerTask(5), 100);\n\t\tSystem.out.println(\"TimerTask started\");\n\t\t// cancel after sometime\n\t\ttry {\n\t\t\tThread.sleep(20000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttimer.cancel();\n\t\tSystem.out.println(\"TimerTask cancelled\");\n\t\ttry {\n\t\t\tThread.sleep(3000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run(){\n \t\t\t\tif (duration>0) {\r\n \t\t\t\t\trecord.startRecording();\r\n \t\t\t\t\tstpBtn.setEnabled(true);\r\n \t\t\t\t\t//psBtn.setEnabled(true); //TODO: pause button action\r\n \t\t\t\t\t(new Timer()).schedule(new TimerTask() {\r\n \t\t\t\t\t\tpublic void run () {\r\n \t\t\t\t\t\t\t//stop recording\r\n \t\t\t\t\t\t\trecord.stopRecording();\r\n \t\t\t\t\t\t\trcrdBtn.setEnabled(true);\r\n \t\t\t\t\t\t\tstpBtn.setEnabled(false);\r\n \t\t\t\t\t\t\tpsBtn.setEnabled(false);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}, duration);\r\n \t\t\t\t} else { //countdown, no timer\r\n \t\t\t\t\t//start recording\r\n \t\t\t\t\trecord.startRecording();\r\n \t\t\t\t\t//stop and pause buttons come visible after countdown has run\r\n \t\t\t\t\trcrdBtn.setEnabled(false);\r\n \t\t\t\t\tstpBtn.setEnabled(true);\r\n \t\t\t\t\t//psBtn.setEnabled(true); TODO: implement pause action\r\n \t\t\t\t\t//TODO: Mimimize frame to taskbar\r\n \t\t\t\t}\r\n \t\t\t}", "private static void timerTest4() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 14);\n\t\tcalendar.set(Calendar.MINUTE, 20);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tDate time = calendar.getTime();\n\n\t\tTimer timer = new Timer();\n\t\tSystem.out.println(\"wait ....\");\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest4\");\n\n\t\t\t}\n\t\t}, time, 24 * 60 * 60 * 1000);\n\n\t}", "public void run()\r\n {\n \tm_Handler.sendEmptyMessage(JMSG_TIMER);\r\n }", "void handleTimeoutTask();", "public void endTimer(){\n timer.cancel();\n }", "private void startTimer() {\n\t\ttimer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint currTime = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tjavafx.application.Platform.runLater(new Runnable () {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tcurrTime++;\n\t\t\t\t\t\ttimerLabel.setText(\"Time: \" + currTime);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000, 1000);\n\t}", "private void setTimer() {\r\n timer = new Timer(TIMER_DELAY, new ActionListener() {\r\n public void actionPerformed(ActionEvent ae) {\r\n action();\r\n }\r\n });\r\n }", "protected void timer_tick(ActionEvent e) {\n\t\thour = time / 3600;\r\n\t\tminute = time % 3600 / 60;\r\n\t\tsecond = time % 3600 % 60;\r\n\t\tlblCountDown.setText(\"剩余时间:\" + stringTime(hour) + \":\" + stringTime(minute) + \":\" + stringTime(second));\r\n\t\tif (time == 0) {\r\n\t\t\ttimer.stop();\r\n\t\t\ttimeOut();\r\n\t\t}\r\n\t\ttime--;\r\n\t}", "public Timer()\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t}", "public void resetTimerComplete() {\n\t\tsetStartingTime(0);\n\t}", "public void initializeTimerTask() {\n timerTask = new TimerTask() {\n @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n public void run() {\n Log.e(tag, \"in timer ++++ \"+ (counter++));\n usageStatsManager = (UsageStatsManager) getApplicationContext().getSystemService(\"usagestats\");\n packageManager = getApplicationContext().getPackageManager();\n UsageEvents usageEvents = usageStatsManager.queryEvents(getStartTime(), System.currentTimeMillis());\n while (usageEvents.hasNextEvent()) {\n UsageEvents.Event event = new UsageEvents.Event();\n usageEvents.getNextEvent(event);\n if (event.getEventType() == UsageEvents.Event.MOVE_TO_FOREGROUND &&\n event.getPackageName().equalsIgnoreCase(\"com.google.android.youtube\"))\n {\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"Sagar says - YouTube is Opened\", Toast.LENGTH_LONG).show();\n }\n });\n Log.e(tag, \"ACTION FOREGROUND\");\n Log.e(tag, \"PackageName \"+ event.getPackageName());\n Log.e(tag, \"timestamp \"+ new SimpleDateFormat\n (\"dd/MM/yyyy HH:mm:ss\").format(event.getTimeStamp()));\n }\n else if (event.getEventType() == UsageEvents.Event.MOVE_TO_BACKGROUND &&\n event.getPackageName().equalsIgnoreCase(\"com.google.android.youtube\"))\n {\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"Sagar says - YouTube goes in background\", Toast.LENGTH_LONG).show();\n }\n });\n Log.e(tag, \"ACTION BACKGROUND\");\n Log.e(tag, \"PackageName \"+ event.getPackageName());\n Log.e(tag, \"timestamp \"+ new SimpleDateFormat\n (\"dd/MM/yyyy HH:mm:ss\").format(event.getTimeStamp()));\n }\n }\n }\n };\n }", "public static void ComienzaTimer(){\n timer = System.nanoTime();\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tUtils.printLog(TAG, \"timer set isNextPreValid = true; \");\r\n\t\t\t\tisNextPreValid = true;\r\n\t\t\t\tcancel();\r\n\t\t\t}", "private static void timerTest2() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (count < 5) {\n\t\t\t\t\tSystem.out.println(\"timertest2\" + \" \" + ++count);\n\t\t\t\t} else {\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}, 2000, 1000);\n\n\t}", "public void run() {\n isRunningTime = true;\n\n coolDownTime.put(target, coolDownTime.get(target) - 1);\n\n if(coolDownTime.get(target) <= 0) {\n coolDownTime.remove(target);\n\n target.sendMessage(DwD + ChatColor.GOLD + \"Your Dark Cloud cooldown has expired.\");\n\n isRunningTime = false;\n\n taskCoolDownToCancel.cancel();\n }\n }", "public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}", "public void temporizadorTiempo() {\n Timer timer = new Timer();\n tareaRestar = new TimerTask() {\n @Override\n public void run() {\n tiempoRonda--;\n }\n };\n timer.schedule(tareaRestar, 1,1000);\n }" ]
[ "0.69727796", "0.6959658", "0.6924501", "0.6893426", "0.68928736", "0.6879749", "0.6843557", "0.6831778", "0.6808136", "0.6805002", "0.6779206", "0.67746806", "0.675122", "0.67455125", "0.6742722", "0.6678699", "0.66717273", "0.6646288", "0.66427124", "0.6642089", "0.6631557", "0.6604659", "0.6602133", "0.6597773", "0.65965354", "0.65903383", "0.6589864", "0.6589864", "0.6589864", "0.6589864", "0.6569442", "0.65552145", "0.6532598", "0.6510348", "0.64949566", "0.6494295", "0.64851165", "0.64825666", "0.6464788", "0.6445481", "0.6438967", "0.64276415", "0.64257205", "0.64072365", "0.6395408", "0.63913846", "0.638489", "0.6384816", "0.6341277", "0.6330417", "0.63290006", "0.63148963", "0.63139707", "0.62989897", "0.6288018", "0.6256019", "0.62481016", "0.62422836", "0.62412685", "0.6238597", "0.62303025", "0.6228501", "0.6205998", "0.6197029", "0.618209", "0.6180347", "0.6174297", "0.6161141", "0.6157928", "0.61548", "0.61476976", "0.6145764", "0.61206234", "0.61143386", "0.6106973", "0.6105311", "0.61021477", "0.6086237", "0.607905", "0.60730875", "0.6063539", "0.6061011", "0.60563815", "0.60502934", "0.6043602", "0.6039921", "0.6032411", "0.6026148", "0.60216486", "0.60215443", "0.60201937", "0.6020088", "0.60148466", "0.6009556", "0.6005827", "0.60011667", "0.599375", "0.5993256", "0.5989785", "0.5988858" ]
0.7293428
0
Cancels the timer task
public static void cancelTask() { try { if (Utils.isNotNull(tt)) { tt.cancel(); } if (Utils.isNotNull(t)) { t.cancel(); } } catch (Throwable e) { //Utils.debugModePrintStack(e, "FMap", "cancelTask"); } finally { tt = null; t = null; } timeoutValue = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void cancelTimeout() {\n timer.cancel();\n }", "protected void cancelTimerTask() {\n ScheduledTimerTask scheduledTimerTask = this.scheduledTimerTask;\n if (null != scheduledTimerTask) {\n this.scheduledTimerTask = null;\n scheduledTimerTask.cancel();\n }\n }", "public void cancel() {\n timer.cancel();\n timer = new Timer();\n }", "private void cancelSchedule() {\n\n if (timer == null)\n return;\n // timer.cancel();\n }", "private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}", "private void cancelTimer() {\n Timer.cancelTimeout(this);\n responded = true;\n }", "private void cancelTimeout(){\n\t\tSharedPreferences timeout = mContext.getSharedPreferences(\"Timeout\"+Integer.toString(mRid), Context.MODE_PRIVATE);\n\t SharedPreferences.Editor editor = timeout.edit();\n\t editor.putLong(\"start\", 0);\n\t editor.apply();\n\t}", "protected void stopTimeTask() {\n\t\tif (chatAsyncTask!=null) {\n\t\t\tchatAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (liveAsyncTask!=null) {\n\t\t\tliveAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (timerTask!=null) {\n\t\t\ttimerTask.cancel();\n\t\t\ttimerTask = null;\n\t\t}\n\t\t\n\t\tif (timer!=null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t\t\n\t\t\n\t}", "public void stopTimerTask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}", "public void cancel() {\n\t\tif(hasStarted) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"An alarm has not been started\");\n\t\t}\n\t}", "void cancelTimeout() {\n timeoutCancelled = true;\n if (timeout != null) {\n timeout.cancel();\n }\n }", "public void endTimer(){\n timer.cancel();\n }", "public void stopTimer(){\n this.timer.cancel();\n }", "public synchronized void cancel() {\n }", "void cancel() {\n\tsleepThread.interrupt();\n }", "public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private synchronized void cancelScanTimer() {\n if (mScanTimerFuture != null) {\n mScanTimerFuture.cancel(true);\n mScanTimerFuture = null;\n }\n }", "public void cancelTask(String id);", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancelTask(){\n\t\tif(main.teleporting.containsKey(teleporter.getName())){\n\t\t\tmain.teleporting.remove(teleporter.getName());\n\t\t}\n\t\tthis.cancel();\n\t}", "public void cancel() {\n\t\tcancel(false);\n\t}", "public void stopTimer()\n {\n timer.cancel();\n }", "public void cancel() {\n\t}", "public void cancelRunnable() {\n\t\tif (taskID != null) {\n\t\t\tplugin.getServer().getScheduler().cancelTask(taskID);\n\t\t}\n\t}", "public void cancel()\n\t{\n\t}", "public void stoptimertask() {\n if (timer != null) {\r\n timer.cancel();\r\n timer = null;\r\n }}", "public void cancel() {\n\t\tinterrupt();\n\t}", "public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "public void cancelTimeout(int user_id){\r\n\t\tTimerTask task = timers.get(user_id);\r\n\t\tif(task != null)\r\n\t\t\ttask.cancel();\r\n\t}", "public void cancel(){\n cancelled = true;\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "public void cancel();", "private void stop() {\n timer.cancel();\n timer = null;\n }", "@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}", "public void cancelTimers() {\n this.impressionTimer.cancel();\n this.autoDismissTimer.cancel();\n }", "public static void cancelAlarmElapsed() {\n if (alarmManagerElapsed!= null) {\n alarmManagerElapsed.cancel(alarmIntentElapsed);\n }\n }", "@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "public void cancel() {\n btCancel().push();\n }", "@Override\n public void onClick(View view) {\n newtimer.cancel();\n finish();\n }", "public void cancel() {\n\t\tcancelled = true;\n\t}", "private void stopTime()\n {\n timer.stop();\n }", "public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }", "public synchronized boolean cancel(String taskKey)\n {\n \t// the complete scheduler has already been canceled?\n \tif (timer == null)\n \t\treturn false;\n \t\n \tSchedulerTimerTask timerTask = (SchedulerTimerTask) scheduledTimerTasks.remove(taskKey);\n \tif (null == timerTask)\n \t{\n \t\treturn false;\n \t}\n \t\n // delete from HSQL if visible\n if (timerTask.schedulerTask.isVisible())\n {\n IDataAccessor accessor = AdminApplicationProvider.newDataAccessor();\n IDataTransaction transaction = accessor.newTransaction();\n try\n {\n IDataTable table = accessor.getTable(Enginetask.NAME);\n table.qbeClear();\n table.qbeSetKeyValue(Enginetask.schedulerid, getId());\n table.qbeSetKeyValue(Enginetask.taskid, taskKey);\n if (table.search() > 0)\n {\n table.getRecord(0).delete(transaction);\n transaction.commit();\n }\n }\n catch (Exception ex)\n {\n // convert exception\n throw new RuntimeException(ex);\n }\n finally\n {\n transaction.close();\n }\n }\n\n // and really cancel\n return timerTask.cancel();\n }", "public void cancel() {\r\n\t\tbStop = true;\r\n\t}", "@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\tpublic void cancel() {\n\t\t\n\t}", "private void stopCountdown() {\n if (countDownTimer != null) {\n countDownTimer.cancel();\n countDownTimer = null;\n }\n }", "void resetTimeout() {\n timer.cancel();\n timer = getTimer();\n timer.schedule(getTimerTask(), this.timeout);\n }", "@Override\n public void cancel() {\n }", "@Override\n public void cancel() {\n\n }", "void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }", "@Override\n public void cancel() {\n }", "@Override\n public void cancel() {\n\n }", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void stoptimertask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public abstract void cancel(float timeoutInSeconds)\n throws NotImplementedException, IncorrectStateException,\n TimeoutException, NoSuccessException;", "public long stop() {\n return timer.stop(task);\n }", "void cancel(long inId);", "public synchronized void postDeregister() {\n if (timer != null) {\n try {\n timer.cancel();\n } catch (Exception x) {\n if (LOG.isLoggable(Level.FINEST))\n LOG.log(Level.FINEST,\"Failed to cancel timer\",x);\n else if (LOG.isLoggable(Level.FINE))\n LOG.fine(\"Failed to cancel timer: \"+x);\n } finally {\n timer = null;\n }\n }\n }", "public void stopTime() {\n if (isRunning) {\n timer.cancel();\n timer.purge();\n }\n isRunning = false;\n }", "@Override\n\tpublic void canceled() {\n\t\t\n\t}", "@Override\n\tpublic void canceled() {\n\t\t\n\t}", "private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }", "public void cancel( String reason );", "public boolean cancel();", "public void stopTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" timer stopped\");\n if(newTimer != null && timerTask != null){\n timerTask.cancel();\n newTimer.purge();\n timerTask = null;\n }\n }", "public int stopTimer() {\n timerTask.cancel();\n timerTask = null;\n return counts;\n }", "private void cleanUp() {\n timer_.cancel();\n countdownTask_.cancel();\n vibrator_.cancel();\n }", "public void stop() {timer.stop();}", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tLog.d(\"cancel\", \"cancel my task\");\n\t\t\n\t\t}", "public void cancel(){\n \tLog.v(TAG, \"Cancel request\");\n \t// Cancel the initialization task\n \tif(initTask != null){\n \t\tLog.i(TAG, \"initTask was not null.\");\n \t\tinitTask.cancel(true);\n \t\tinitTask = null;\n \t}\n }", "public void stop() {\n\t\tthis.timer.cancel();\n\t}", "public void stop() {\n\t\t_timer.cancel();\n\t}", "public void stoptimertask() {\n\t\tif (timer != null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t}", "public void cancel(){\n if(currentCrawler!=null)\n currentCrawler.cancel();\n if(timer!=null)\n timer.cancel();\n wizard.gotoWelcomeScreen();\n }", "public void cancel() {\n if (mCurrentTest != null && mCurrentTest.isRunning()) {\n Log.i(TAG, \"cancel: Cancelling test \\\"\" + mCurrentTest.getName() + \"\\\"...\");\n mCurrentTest.cancel();\n }\n }", "public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}", "public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}", "@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }", "void stopReportingTask();" ]
[ "0.80901897", "0.7879561", "0.7859737", "0.77068967", "0.7683798", "0.7556611", "0.7514316", "0.74251676", "0.7416223", "0.7371887", "0.7349772", "0.7261637", "0.72447264", "0.7087554", "0.703328", "0.7032999", "0.7013701", "0.7010453", "0.6989045", "0.6977052", "0.6977052", "0.6977052", "0.6977052", "0.6977052", "0.6977052", "0.6947788", "0.6925647", "0.6915227", "0.6907501", "0.6903168", "0.69015175", "0.6892908", "0.6891451", "0.6875404", "0.68598783", "0.68598783", "0.68598783", "0.68598783", "0.68598783", "0.68496263", "0.683127", "0.6794032", "0.67718184", "0.6759655", "0.6731509", "0.6726083", "0.67209816", "0.6714189", "0.67115784", "0.67115784", "0.67115784", "0.67098606", "0.6708819", "0.668193", "0.6679212", "0.6677003", "0.6669649", "0.66675603", "0.66608495", "0.66525924", "0.663133", "0.6607253", "0.6603431", "0.6595167", "0.6592822", "0.6592481", "0.6586012", "0.6582122", "0.6582122", "0.6582122", "0.6576159", "0.6576159", "0.6576159", "0.6576159", "0.65694517", "0.6569034", "0.65646434", "0.65336454", "0.6529214", "0.6520181", "0.6520181", "0.65156186", "0.65146375", "0.6493069", "0.6481458", "0.6476513", "0.64550537", "0.64468974", "0.6444001", "0.6441325", "0.641521", "0.6403105", "0.6367631", "0.6363638", "0.63567775", "0.6349778", "0.6336248", "0.63333046", "0.6332742", "0.63316953" ]
0.7763054
3
Map> map = categoryService.getAllCategorys();
@RequestMapping("") public ModelAndView category(){ JSONObject json = categoryService.getAllCategorys(); ModelAndView mv = new ModelAndView("category/category"); mv.addObject("categories",json); mv.addObject("active", "2"); return mv; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, ArrayList<Category>> getCategories() {\n int mainParentId = 0;\n\n Map<String, ArrayList<Category>> allCategories = new HashMap<String, ArrayList<Category>>();\n\n//get main categories\n\n Set<Category> mainCategories = new HashSet<Category>(categoryDAO.getCategoriesByParentId(mainParentId));\n// get sub categories\n\n System.out.println(mainCategories);\n for (Category mainCategory : mainCategories) {\n allCategories.put(mainCategory.getName(), categoryDAO.getCategoriesByParentId(mainCategory.getId()));\n }\n return allCategories;\n }", "List<Category> getAllCategories();", "List<ProductCategory> getAll();", "public List<Categorie> getAllCategories();", "public static HashMap<String, Integer> getHashMap() {\n String query;\n HashMap<String, Integer> catID = new HashMap<String, Integer>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category_id, category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n catID.put(rs.getString(\"category\"), rs.getInt(\"category_id\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return catID;\n }", "public static Map<String, String> getCategoryInfo() throws SQLException {\n\t\tHashMap<String, String> table = new HashMap<String, String>();\n\t\tConnection conn = DBConnector.getInstance().getConn();\n\t\t\n\t\tString sql = \"SELECT * FROM mhtc_sch.getCategories(FALSE, NULL)\";\n\t\tPreparedStatement pstatement = conn.prepareStatement(sql);\n\t\tResultSet rs = pstatement.executeQuery();\n\t\t\n\t\twhile (rs.next()) {\n\t\t\tString categoryID = rs.getString(\"Id\").toLowerCase();\n\t\t\tString categoryName = rs.getString(\"Name\");\n\t\t\ttable.put(categoryName, categoryID);\n\t\t}\n\t\t\n\t\treturn table;\n\t}", "List<Category> findAll();", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "LinkedHashMap<Long, City> getAllCitiesMap();", "public List<Category> findAll();", "List<Category> getCategories() throws DAOExceptionHandler;", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "public Set<String> getCategory(){return category;}", "List<Category> getAllCategories() throws DataBaseException;", "@GetMapping(\"category\")\n\t\tpublic List<String> getCategory(){\n\t\t\tList<String> list = repo.findByCat();\n\t\t\treturn list;\n\t\t\t\n\t\t\t\n\t\t}", "@GetMapping\n\tpublic ResponseEntity<List<Category>> findAll(){\n\t\t\t//Category u = new Category(1L, \"Maria\", \"maria@gmail.com\", \"92313323\", \"12345\");\t\n\t\t\n\t\tList<Category> list = service.findAll();\n\t\t\n\t\t//criar resposta http e no corpo da resposta colocar lista\n\t\treturn ResponseEntity.ok().body(list);\t\n\t\t\n\t}", "@GetMapping(\"/category\")\n\t public ResponseEntity<List<Category>> getcategorys() {\n\n\t List<Category> list = categoryService.getAllcategorys();\n\t if (list.size() <= 0) {\n\t return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n\t }\n\t return ResponseEntity.status(HttpStatus.CREATED).body(list);\n\t }", "@RequestMapping(value = \"/categories\", method = RequestMethod.GET, produces = \"application/json\")\n public Collection<String> getCategories() {\n return this.datasetService.getCategories();\n }", "Map<String, String> findAllInMap();", "Map<String, Object> getServiceSpecificObjects();", "public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\treturn categoryDao.getAll();\r\n\t}", "public List<Cvcategory> findAllCvcategories();", "public List<String> getCategories();", "List<Categorie> findAll();", "List<Category> selectCategoryList();", "List<Category> getAllCategories() throws DaoException;", "HashMap<String, Object[]> getUbicaciones();", "public Map<String, List<String>> getServices();", "Set<Category> getShopCategories(Shop shop);", "Map<Long, List<String>> retrieveCategoriesForTargetTable(TargetTable ttable);", "public List<String> getCategory(SqlSession session, HashMap<String, Object> map) {\r\n\t\treturn session.selectList(\"getCategory\", map);\r\n\t}", "public Category getCategoryById()\r\n {\r\n return cdb.getCategoryById();\r\n }", "@Override\n\tpublic List<Category> getAllCategories() {\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"FROM \"+Category.class.getName());\n\t\treturn (List<Category>)query.list();\t\t\n\t}", "@Override\n public List<CategoryDTO> listAll() {\n List<CategoryDTO> result = new ArrayList<>();\n List<Category> listCategory = categoryRepository.findAll();\n for (Category category: listCategory){\n result.add(categoryConverter.toDTO(category));\n }\n return result;\n }", "public Map<Integer, Componente> ottieniComponentiByCategoria(String idCategoria){\n\t\tMap<Integer, Componente> mappa = new HashMap<Integer, Componente>();\n\t\ttry { //Evito eventuali errori per l'identificativo della categoria\n\t\t\tfor (Componente elemento : this.mappaComponenti.get(idCategoria)) {\n\t\t\t\tmappa.put(elemento.getId(), elemento);\n\t\t\t}\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn mappa;\n\t}", "@Transactional\n\tpublic List<CategoryEntity> GetCategory() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\tList<CategoryEntity> categoryEntities = session.createQuery(\"from category\").getResultList();\n\n\t\treturn categoryEntities;\n\t}", "public static Map<Integer, TaxCategory> manitoba() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\tTaxCategory cat1 = new TaxCategory(10.8, 0, 33723);\n\t\t\t\tcategories.put( 1, cat1 );\n\t\t\t\tTaxCategory cat2 = new TaxCategory(12.75, 33723.01, 72885);\n\t\t\t\tcategories.put( 2, cat2 );\n\t\t\t\tTaxCategory cat3 = new TaxCategory(17.4, 72885.01, 100000000);\n\t\t\t\tcategories.put( 3, cat3 );\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\tString hql = \"from Category\";\r\n\t\treturn (List<Category>) getHibernateTemplate().find(hql);\r\n\t}", "public List<CategoryMappingValue> getCategories() {\r\n\t\treturn categories;\r\n\t}", "@Override\n\tpublic List<Category> getCategoryByKey(String mc) {\n\t\treturn dao.getCategoryByKey(mc);\n\t}", "List<Category> findAll(Integer page,Integer pageSize)throws Exception;", "@Test\n public void selectAll() {\n List<ProductCategory>productCategories=categoryService.selectAll();\n for (ProductCategory productCategory:productCategories\n ) {\n System.out.println(productCategory);\n }\n }", "public List<VehicleCategoryMasterBean> categoryList() throws Exception;", "@Override\n @Transactional(readOnly = true)\n @Cacheable\n public List<Category> findAll(){\n log.debug(\"Request to get all Categories\");\n return categoryRepository.findAll();\n }", "public LinkedHashMap<String, String> getCategories() {\r\n\t\treturn this.categories;\r\n\t}", "public interface CategoryService {\n\n List<CategoryPack> findCategoryPackList();\n\n List<Category> findCategoryList(Integer start, Integer count);\n\n Integer findCategoryTotalNumber();\n\n CategoryPack selectCategoryById(Integer cid);\n\n void deleteCategoryById(Integer id);\n\n void addCategory(Category category);\n\n void updateCategory(Category category);\n}", "@GetMapping\n\t@ResponseStatus(code = HttpStatus.OK)\n\tpublic List<CategoryDTO> viewCategory() throws ServiceException {\n\t\tList<CategoryDTO> viewResponse = categoryService.listCategory();\n\t\treturn viewResponse;\n\t\t\n\t}", "public String categoryList(CategoryDetails c);", "public List<Category> getAllCategories() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Category\");\r\n\t\tList<Category> categories = query.list();\r\n\r\n\t\treturn categories;\r\n\t}", "Map getAll();", "public Categories getCategories() {\n return this.categories;\n }", "@GetMapping\n\t public List<Categories> touslescategories() {\n\t\treturn catsociete.findAll();}", "List<Activity> getAllActivity(Map<String,String> map);", "List<Product> getProductsByCategoryId(Serializable categoryId);", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "public Category getCategory();", "@RequestMapping(value=\"/category_sub.htm\",method=RequestMethod.GET)\r\n\tpublic String listsubCategory(Map<String, Object> map) \r\n\t{\r\n\tList<Category> category=categoryDao.listCategory();\r\n\t\r\n\t((ModelMap) map).addAttribute(\"categoryList\", category);\r\n\treturn \"category_sub\";\r\n\t}", "List<CategoryDto> listRecommend();", "public List<Category> getAllCategories() {\n\t\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\tQuery q = session.createQuery(\"from Category\");\n\t\t\tList<Category> catlist = q.list();\n\t\t\t\n\t\t\treturn catlist;\n\t\t}", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn dao.getAllCategory();\n\t}", "public static ArrayList<String> getCategories() {\n String query;\n ArrayList<String> categories = new ArrayList<String>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n categories.add(rs.getString(\"category\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return categories;\n }", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "@Override\n public List<Category> getAll()\n {\n \n ResultSet rs = DataService.getData(\"SELECT * FROM Categories\");\n \n List<Category> categories = new ArrayList<Category>();\n \n try\n {\n while (rs.next())\n {\n categories.add(convertResultSetToCategory(rs));\n }\n }\n catch (SQLException e)\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n return categories;\n }", "@Override\n public Single<List<CategoryModel>> getCategories() {\n return api.getCategories().map(categories -> iVmMapper.mapToViewModel(categories));\n }", "public HashMap<Integer,Category_components> get_classes(){\n return game_classes;\n }", "public List<CategoriesTypePojo> getCategoriesType() {\n\t\t Session session = sessionFactory.getCurrentSession();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<CategoriesTypePojo> list= session.createCriteria(CategoriesTypePojo.class).list();\n\t\treturn list;\n\t}", "@Override\n\tpublic HERO_STK_RESPONSEINFO getCategorySuggestions() {\n\t\tString selectQuery = \"select * from hero_admin_category\";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Object> categoryList = jdbcTemplate.query(selectQuery, new RowMapper() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t/*List<HashMap<String, String>> detail = new ArrayList<HashMap<String,String>>();*/\n\t\t\t\t\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\t\tmap.put(\"data\", rs.getString(\"CATEGORY_ID\"));\n\t\t\t\tmap.put(\"value\", rs.getString(\"CATEGORY_NAME\"));\n\t\t\t\t\n\t\t\t\t/*detail.add(map);*/\n\t\t\n\t\t\t\tlog.info(\"Category Suggestion List \"+map);\n\t\t\t\t\n\t\t\t\treturn map;\n\t\t\t}\n\t\t});\n\t\t\n\t\tresponse.setResponseType(\"S\");\n\t\tresponse.setResponseObj((categoryList));\n\t\t\n\t\tresponseInfo.setInventoryResponse(response);\n\t\t\n\t\treturn responseInfo;\n\t}", "List<Category> listAllCategoriesByStoreId(Integer storeId);", "google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory();", "@Override\n\tpublic List<CategoryVO> mainCategory() {\n\t\treturn mapper.mainCategory();\n\t}", "public Map<String, Object> getTagMap();", "@Override\n\tpublic List<FoodCategory> findList(Map<String, Object> queryMap) {\n\t\treturn foodCategoryDao.findList(queryMap);\n\t}", "public Map<String, List<Object>> getDCModelMap(){\n\t\tDBCollection dcModel = db.getCollection(\"dcModel\");\n\t\tMap<String, List<Object>> varModelMap = new HashMap<String, List<Object>>();\n \tDBCursor varModelCursor = dcModel.find();\n \tfor(DBObject varModelObj: varModelCursor) {\n \t\tvarModelMap.put((String) varModelObj.get(\"v\"), (List<Object>) varModelObj.get(\"m\")); \t\t\n \t}\n \treturn varModelMap;\n\t}", "public interface CategoryService {\n Category addCategory(Category cat);\n List<Category> listAll();\n Category getByName(String categoryName);\n}", "@RequestMapping(\"/category.htm\")\r\n\tpublic String listmasterCategory(Map<String, Object> map) \r\n\t{\r\n\tList<Category> category=categoryDao.defaultcategory();\r\n\t((ModelMap) map).addAttribute(\"categoryList\", category);\r\n\treturn \"category\"; \r\n\t}", "public @NotNull Set<Category> findAllCategories() throws BazaarException;", "@Override\n\tpublic Iterable<Category> findAllCategory() {\n\t\treturn categoryRepository.findAll();\n\t}", "public Map<String, Object> getInfo();", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Category> getCategoryFindAll() {\n return em.createNamedQuery(\"Category.findAll\", Category.class).getResultList();\n }", "public String getCategoryListing(){\n\t\tCategoryDAO daoObject = new CategoryDAO();\n\t\tString result = \"\";\n\t\t/*if(requestCall.equalsIgnoreCase(\"table\")){\n\t\t\t//System.out.println(\"in getCategoryListing service call table\");\n\t\t\tresult = daoObject.getCategoriesAndSubCategories();\n\t\t}else{\n\t\t\tresult = daoObject.getCategories(); \n\t\t}*/\n\t\t//result = daoObject.getCategoriesAndSubCategories();\n\t\tresult = daoObject.getCategories();\n\t\treturn result;\n\t}", "@ApiOperation(value = \"Get a list of Products of Categories\", response = Map.class)\n\t@ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Return a list of Product Objects.\", response = ProductGetAllDTO.class ),\n @ApiResponse(code = 400, message = \"Return a error object\", response = error.class) })\n\t\n\t@GetMapping(path = \"/api/products/inCategory/{category_id}\")\n\tpublic ResponseEntity<Map<String, Object>> productOfCategories(\n\t\t\t@PathVariable(name = \"category_id\", required = true) Integer category_id,\n\t\t\t@RequestParam(name = \"page\", required = false, defaultValue = \"1\") Integer page,\n\t\t\t@RequestParam(name = \"limit\", required = false, defaultValue = \"20\") Integer limit,\n\t\t\t@RequestParam(name = \"description_length\", required = false, defaultValue = \"200\") Integer description_length) {\n\n\t\treturn ResponseEntity.ok(productService.productCategorySearch(category_id, page, limit, description_length));\n\n\t}", "Category getCategoryById(int categoryId);", "public List<Category> getlist() {\n\t\tSession session = getSession();\n\t\t\n\t\tQuery query = session.createQuery(\"from Category\");\n\t\tList<Category> categoryList = query.list();\n\t\treturn categoryList;\n\t}", "public interface ICategoryService {\n void saveOrUpdate(CategoryBean[] categories);\n\n List<CategoryBean> getCategoryBeanList(Integer userId);\n}", "public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);", "Map<String, String> mo14888a();", "public interface ICategoryService {\n ServerResponse<List<Category>> selectAll();\n}", "public Collection<CartItem> getCartItems(){\t\t\n\t\treturn map.values();\n\t}", "@Override\r\n\tpublic Map<Long, Item> getCatalogoUnidades() {\r\n\t\tMap<Long, Item> unidades = new HashMap<Long, Item>();\r\n\t\tList<Map<String, Object>> rows = jdbcTemplate.queryForList(\"select u.id as codigo, u.descripcion as descripcion from registro_cobranza.cu_cat_uc u where u.id in (select unidad_id from sccl.unidades group by unidad_id)\");\r\n\t\tfor(Map<String, Object> row : rows){\r\n\t\t\tunidades.put((Long)row.get(\"codigo\"), new Item((Long)row.get(\"codigo\"),(String)row.get(\"descripcion\")));\r\n\t\t}\r\n\t\treturn unidades;\r\n\t}", "List<Product> getProductByCategory(String category) throws DataBaseException;", "public List<Category> findAll() {\n\t\treturn categoryMapper.selectAll();\n\t}", "@Override\r\n\tpublic List<Category> list() {\n\t\treturn categories;\r\n\t}", "public List<Category> getCategories() {\n CategoryRecords cr = company.getCategoryRecords();\n List<Category> catList = cr.getCategories();\n return catList;\n }", "Map getAspectDatas();", "@Transactional\r\n\tpublic List<CmVocabularyCategory> getCmVocabularyCategorys() {\r\n\t\treturn dao.findAllWithOrder(CmVocabularyCategory.class, \"modifyTimestamp\", false);\r\n\t}", "Map<String, Collection<String>> getConnectedEntities();", "public String getCategory();", "java.util.Map<java.lang.Integer, java.lang.Integer>\n getInfoMap();", "@Test\n\tpublic void getCategoryTest() {\n\t\tList<Map<String, String>> list = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"category\", \"Placement\");\n\t\tlist.add(map);\n\t\twhen(TicketDao.getCategory()).thenReturn(list);\n\t\tString category = \"<option value='\" + \"Placement\" + \"'>\" + \"Placement\" + \"</option>\";\n\t\tassertEquals(category, Service.getCategory());\n\t}", "@ModelAttribute(\"categories\")\r\n\tpublic List<Category> getCategoryList() {\r\n\t\treturn categoryDAO.list();\r\n\t}" ]
[ "0.70071733", "0.70003724", "0.6849101", "0.66830593", "0.66788435", "0.65702933", "0.6548778", "0.65201515", "0.6500094", "0.6467767", "0.63905483", "0.63758886", "0.63690215", "0.6355051", "0.6353978", "0.63510454", "0.6342968", "0.6332103", "0.63314104", "0.6286561", "0.625239", "0.6243035", "0.62349486", "0.62276953", "0.6221004", "0.62131405", "0.62125105", "0.61781174", "0.6171188", "0.6142579", "0.61220473", "0.6115616", "0.6095605", "0.60796374", "0.6075587", "0.6072182", "0.6053756", "0.6051877", "0.6050009", "0.60487974", "0.6046245", "0.6045234", "0.6038025", "0.6037723", "0.60355073", "0.602869", "0.60071224", "0.59831935", "0.59752023", "0.59732103", "0.59622216", "0.59336936", "0.5919894", "0.5913351", "0.5903707", "0.5889328", "0.5888299", "0.5887146", "0.58830816", "0.586999", "0.5868743", "0.5867487", "0.5866347", "0.58641714", "0.58554536", "0.58526707", "0.5839964", "0.5837262", "0.58292633", "0.5825729", "0.5821325", "0.58124375", "0.5805324", "0.5803105", "0.5797277", "0.5793821", "0.5792773", "0.57926655", "0.57923263", "0.5788761", "0.57866454", "0.57864976", "0.5781333", "0.5774596", "0.5760218", "0.57598174", "0.5759629", "0.5753058", "0.5751476", "0.5743995", "0.5743335", "0.5742917", "0.57328844", "0.5730266", "0.572645", "0.5723586", "0.57202387", "0.5719148", "0.5715615", "0.5712125", "0.57101303" ]
0.0
-1
Initializes a new ConnectionEstablishedEvent.
public ConnectionEstablishedEvent(Number projectVersionID, URI interactiveHostURI) { super(projectVersionID, interactiveHostURI); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setConnectionEstablishedListener()\r\n\t{\r\n\t\tchatModel.getConnectionEstablishedProperty().addListener(\r\n\t\t\t\tnew ChangeListener<Object>()\r\n\t\t\t\t{\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void changed(\r\n\t\t\t\t\t\t\tObservableValue<? extends Object> observable,\r\n\t\t\t\t\t\t\tObject oldValue, Object newValue)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (chatModel.isConnectionEstablished())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenableChat();\r\n\t\t\t\t\t\t\tdeconnecterButton.setDisable(false);\r\n\t\t\t\t\t\t\tbuttonConnexion.setDisable(true);\r\n\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdisableChat();\r\n\t\t\t\t\t\t\tbuttonConnexion.setDisable(false);\r\n\t\t\t\t\t\t\tdeconnecterButton.setDisable(true);\r\n\t\t\t\t\t\t\tserver.closeServerSockets();\r\n\t\t\t\t\t\t\tserver.startOpenSocketThread();\r\n\t\t\t\t\t\t\tserver.startReceiveMessageThread();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}", "protected void connectionEstablished() {}", "@Override\n\tpublic void listenerStarted(ConnectionListenerEvent evt) {\n\t\t\n\t}", "void connectionCreated();", "@Override\n public void initialize(ConnectionProviderListenerSettings settings) throws Exception {\n }", "public void initialize() {\r\n\r\n\t\t/** URL of the ActiveMQ broker, prepended by transport protocol **/\r\n\t\tString brokerUrl = config.getConfig().getString(\"broker_url\");\r\n\r\n\t\t/** Topic to subscribe to for receiving access to all notifications **/\r\n\t\tString topicName = config.getConfig().getString(\"topic\");\r\n\r\n\t\t/** Username for authenticating with the ActiveMQ broker **/\r\n\t\tString userName = config.getConfig().getString(\"user\");\r\n\r\n\t\t/** The password corresponding to the username **/\r\n\t\tString password = config.getConfig().getString(\"password\");\r\n\r\n\t\t// Creates a connection\r\n\t\tActiveMQSslConnectionFactory connectionFactory = new ActiveMQSslConnectionFactory(\r\n\t\t\t\tbrokerUrl);\r\n\r\n\t\t// Setting the trust manager to the connection factory\r\n\t\tconnectionFactory.setKeyAndTrustManagers(null, trustedCerts,\r\n\t\t\t\tnew SecureRandom());\r\n\t\tconnectionFactory.setWatchTopicAdvisories(false);\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (logger.isDebugEnabled()){\r\n\t\t\t\tlogger.debug(\"creating connection to \" + brokerUrl);\r\n\t\t\t}\r\n\t\t\t// Connect to the broker\r\n\t\t\tConnection connection = connectionFactory.createConnection(\r\n\t\t\t\t\tuserName, password);\r\n\r\n\t\t\t// Creating session for sending messages\r\n\t\t\tsession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\r\n\t\t\tconnection.start();\r\n\r\n\t\t\t// Creating the topic (i.e. creating a link to the already existing\r\n\t\t\t// one on the broker)\r\n\t\t\tTopic topic = session.createTopic(topicName);\r\n\r\n\t\t\t// MessageConsumer is used for receiving (consuming) messages from\r\n\t\t\t// the topic (above given threshold)\r\n\t\t\tMessageConsumer consumer = session.createConsumer(topic);\r\n\t\t\tconsumer.setMessageListener(this);\r\n\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"Connection to Notification with Id \"\r\n\t\t\t\t\t\t+ connection.getClientID() + \" Listening for messages\");\r\n\t\t\t}\r\n\r\n\t\t} catch (JMSException e) {\r\n\t\t\tsession = null;\r\n\t\t\tlogger.error(\"[JMS Exception] \" + e.getMessage());\r\n\t\t}\r\n\t}", "@Override\n public EventType getEventType() {\n return EventType.CONNECTION_CREATED_EVENT;\n }", "@Override\n public void onConnectionInitiated(\n String endpointId, ConnectionInfo connectionInfo) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Connection initiated \" + endpointId);\n Nearby.getConnectionsClient(activity).acceptConnection(endpointId, mPayloadCallback);\n }", "@Override\n protected void connectionEstablished()\n {\n peer.resetConnectionClosed();\n\n // send our handshake directly as it doesn't fit into peer message\n // and there is always space in send buffer on new connection\n //enqueue(pmCache.handshake(torrent.getTorrentId(), torrent.getClientId()));\n }", "public void connectionInitiated(ShellLaunchEvent ev);", "@SubscribeEvent\n public void onClientStarting(final FMLClientSetupEvent event) {\n LOGGER.info(\"client setting up\");\n }", "public synchronized void connectEvent(TCConnectionEvent event) {\n }", "public void initialize(EventExecutorFactory executorFactory) {\n\t\tthis.executorFactory = executorFactory;\n\t}", "public ConnectionMonitorSource() {\n }", "public void init() {\n ContainerProperties containerProperties = buildContainerProperties();\n this.messageListenerContainer = buildMessageListenerContainer( consumerFactory, containerProperties );\n }", "@Override\n public void onCreate() {\n super.onCreate();\n super.setNeedAutoReConnect(NEED_AUTO_RECONNECT);\n super.setNeedConnectStatusBroadcast(NEED_CONNECT_STATUS_BROADCAST);\n Log.e(TAG, \"oncreat\");\n mCommunciation = new CommunciationImp(this);\n mProtocol = new ProtocolConfig(this);\n }", "private void initializeEvents() {\r\n\t}", "@Test\n public void TestConnectionEvent() {\n ConnectionEvent connectionEvent = new ConnectionEvent(ConnectionEvent.ConnectionEventType.Close, new byte[0][0]); // Initialize connection event\n\n assertTrue(\"connection event must not be null\", connectionEvent != null); // Ensure event is not null\n }", "@Override\n\tpublic void initialize() {\n\t\ttransportManager = newServerTransportManager();\n\t\ttransportServer = newTransportServer();\n\t\tserverStateMachine = newTransportServerStateMachine();\n\n\t\tserverStateMachine.setServerTransportComponentFactory(this);\n\t\ttransportManager.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerHostConfig(getServerHostConfig());\n\n\t\tsetInitialized(true);\n\t}", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "private void initialize() throws IOException {\n final Random random;\n if (params.getCustomSeed() == null) {\n random = RandomUtils.getRandomPrintSeed();\n } else {\n System.out.println(\"Using custom seed: \" + params.getCustomSeed());\n random = new Random(params.getCustomSeed());\n }\n\n final EventEmitterFactory factory = new EventEmitterFactory(random, addressBook);\n\n factoryConfig.accept(factory);\n\n caller = callerSupplier.apply(factory);\n listener = listenerSupplier.apply(factory);\n\n final Pair<Connection, Connection> connections =\n connectionFactory.createConnections(caller.getNodeId(), listener.getNodeId());\n caller.setSyncConnection(connections.left());\n listener.setSyncConnection(connections.right());\n\n customInitialization.accept(caller, listener);\n }", "public Client(ClientEvents event) throws UnknownHostException, IOException {\n\t\t// TODO Auto-generated constructor stub\n\t\t//super(\"83.52.33.147\", 3553);\n\t\tmIp = \"85.53.66.42\";\n\t\tmPort = 3553;\n\t\tthis.event = event;\n\t\tmInstance = this;\n\t\t\n\t\t//startConection();\n\t}", "public synchronized void addConnectionEventListener(ConnectionEventListener connectioneventlistener) {\n/* 130 */ if (this.connectionEventListeners != null) {\n/* 131 */ this.connectionEventListeners.put(connectioneventlistener, connectioneventlistener);\n/* */ }\n/* */ }", "@Override\n public ConnectionSetup createConnectionSetup(NetworkContactPoint ncp, String displayName, boolean connnectOnStartup) {\n ConnectionSetupListenerAdapter stateChangeListenerAdapter = new ConnectionSetupListenerAdapter() {\n\n @Override\n public void onStateChanged(final ConnectionSetup setup, final ConnectionSetupState oldState,\n final ConnectionSetupState newState) {\n callbackManager.enqueueCallback(new AsyncCallback<ConnectionSetupListener>() {\n\n @Override\n public void performCallback(ConnectionSetupListener listener) {\n listener.onStateChanged(setup, oldState, newState);\n }\n });\n }\n\n @Override\n public void onConnectionAttemptFailed(final ConnectionSetup setup, final boolean firstConsecutiveFailure,\n final boolean willAutoRetry) {\n callbackManager.enqueueCallback(new AsyncCallback<ConnectionSetupListener>() {\n\n @Override\n public void performCallback(ConnectionSetupListener listener) {\n listener.onConnectionAttemptFailed(setup, firstConsecutiveFailure, willAutoRetry);\n }\n });\n }\n\n @Override\n public void onConnectionClosed(final ConnectionSetup setup, final DisconnectReason disconnectReason,\n final boolean willAutoRetry) {\n callbackManager.enqueueCallback(new AsyncCallback<ConnectionSetupListener>() {\n\n @Override\n public void performCallback(ConnectionSetupListener listener) {\n listener.onConnectionClosed(setup, disconnectReason, willAutoRetry);\n }\n });\n }\n };\n\n long id = lastSetupId.incrementAndGet();\n final ConnectionSetupImpl newSetup =\n new ConnectionSetupImpl(ncp, displayName, id, connnectOnStartup, messageChannelService, stateChangeListenerAdapter);\n\n final List<ConnectionSetup> snapshotOfCollection;\n synchronized (setups) {\n setups.add(newSetup);\n // create a detached snapshot to guard against race conditions\n snapshotOfCollection = createDetachedSnapshotOfCollection();\n\n // trigger callback about new ConnectionSetup\n callbackManager.enqueueCallback(new AsyncCallback<ConnectionSetupListener>() {\n\n @Override\n public void performCallback(ConnectionSetupListener listener) {\n listener.onCreated(newSetup);\n listener.onCollectionChanged(snapshotOfCollection);\n }\n });\n }\n\n return newSetup;\n }", "public GetConnListener() {\n }", "public void initListener() {\n }", "private void initListener() {\n }", "void init() {\n CometUtils.printCometSdkVersion();\n validateInitialParams();\n this.connection = ConnectionInitializer.initConnection(\n this.apiKey, this.baseUrl, this.maxAuthRetries, this.getLogger());\n this.restApiClient = new RestApiClient(this.connection);\n // mark as initialized\n this.alive = true;\n }", "public void connectionEstablished(SctpChannel cnx){\n\thistory (\"connectionEstablished\");\n\t_connecting = false;\n\t_createdTime = System.currentTimeMillis ();\n\tmakeId ();\n\t_channel = _sctpChannel = cnx;\n\t_channel.setSoTimeout (_soTimeout);\n\t_sendOutBufferMonitor = _engine.getSendSctpBufferMonitor ();\n\t_sendMeter = _engine.getIOHMeters ().getSendSctpMeter ();\n\t_readMeter = _engine.getIOHMeters ().getReadSctpMeter ();\n\t_sendDroppedMeter = _engine.getIOHMeters ().getSendDroppedSctpMeter ();\n\tcnx.setWriteBlockedPolicy (AsyncChannel.WriteBlockedPolicy.IGNORE);\n\t_toString = new StringBuilder ()\n\t .append (\"SctpClientChannel[id=\").append (_id).append (\", remote=\").append (_remote).append (\", secure=\").append (_secure).append (']')\n\t .toString ();\n\tif (_logger.isEnabledFor (_engine.sctpConnectedLogLevel ()))\n\t _logger.log (_engine.sctpConnectedLogLevel (), _engine+\" : connected : \"+this);\n\tif (_shared){\n\t _engine.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getSctpChannels ().put (_id, this);\n\t if (_engine.uniqueSctpConnect ()){\n\t\t// we check that all pending agents are still there\n\t\tList<MuxClient> removed = new ArrayList<> (_connectingAgents.size ());\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t if (_engine.getMuxClientList ().contains (agent) == false)\n\t\t\tremoved.add (agent);\n\t\t}\n\t\tfor (MuxClient agent : removed){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+agent);\n\t\t agent.getMuxHandler ().sctpSocketConnected (agent, _id, _connectingAgents.get (agent), null, 0, null, 0, 0, 0, false, _secure, MuxUtils.ERROR_UNDEFINED);\n\t\t agent.getIOHMeters ().getFailedSctpChannelsConnectMeter ().inc (1);\n\t\t _connectingAgents.remove (agent);\n\t\t}\n\t\tif (_connectingAgents.size () == 0){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = new MuxClientList ();\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t MuxClientState state = new MuxClientState ()\n\t\t\t.stopped (_engine.getMuxClientList ().isDeactivated (agent))\n\t\t\t.connectionId (_connectingAgents.get (agent));\n\t\t agentJoined (agent, state); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t\t}\n\t\t_connectingAgents = null; // clean\n\t } else {\n\t\tif (_engine.getMuxClientList ().size () == 0){ // checking for _agent to see if it is open is too costly\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+_agent);\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = _engine.copyMuxClientList ();\n\t\titerateAgentConnected (_agentsList); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t }\n\t _agent = null; // clean\n\t} else {\n\t _agent.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _agent.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t if (_agent.isOpened () == false){\n\t\tclose (false, true); // the socket input exec will remain the agent thread --> monothreaded\n\t\treturn;\n\t }\n\t _agent.getSctpChannels ().put (_id, this);\n\t notifyOpenToAgent (_agent);\n\t}\n\tsetChannelInputExecutor ();\n\t_flowController = new FlowController (_channel, 1000, 10000, _exec); // _exec is set in setChannelInputExecutor\n\n\tif (_reconnect != null)\n\t for (Runnable r: _reconnect) r.run ();\n }", "void connectionActivity(ConnectionEvent ce);", "@Override\n\t\t\tpublic void onOpen(WebSocket conn, ClientHandshake handshake) {\n\t\t\t\tSystem.out.print(\"onOpen\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onOpen\");\n\t\t\t}", "public void addConnectionEventListener(ConnectionEventListener listener) {\n eventListener.addConnectorListener(listener);\n }", "public void init() {\r\n \tconnection = Connect.initConnexion();\r\n \tSystem.out.println(\"connexion :\"+connection);\r\n }", "public interface ConnectionEventListener {\n /** \n * Called on all listeners when a connection is made or broken. \n */\n void connectionActivity(ConnectionEvent ce);\n}", "public void init() {\n cupDataChangeListener = new CupDataChangeListener(dataBroker);\n }", "public static void addOnWebSocketConnectionCreatedListener(WebSocketConnectionCreatedListener listener) {\n\t\tif (instance != null) {\n\t\t\tlistener.onWebSocketConnectionCreated(instance);\n\t\t} else {\n\t\t\twebSocketConnectionCreatedListeners.add(listener);\n\t\t}\n\t}", "@Override\r\n\tpublic void initialize() {\n\t\tDNP3Master dnp3Master = new DNP3Master();\r\n\t\ttry {\r\n\t\t\tdnp3Master.initSerial(configuration.getSourceAddress(),\r\n\t\t\t\t\tconfiguration.getSlaveAddress(), configuration\r\n\t\t\t\t\t\t\t.getCommPortId(), configuration.getBaudRate(),\r\n\t\t\t\t\tconfiguration.getStaticPollPeriods());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\traiseEvent(DATA_SOURCE_EXCEPTION_EVENT, new Date().getTime(), true,\r\n\t\t\t\t\tnew LocalizableMessage(\"event.exception2\", configuration\r\n\t\t\t\t\t\t\t.getName(), e.getMessage()));\r\n\t\t}\r\n\r\n\t\tsuper.initialize(dnp3Master);\r\n\t}", "public void mockNewConnection(IBlaubotConnection connection) {\n\t\tif(acceptorListener != null) {\n\t\t\tacceptorListener.onConnectionEstablished(connection);\n\t\t}\n\t}", "@Override\n public void init() {\n //no initialization, event are only created when car get into intersection\n if (!trafficLights.isEmpty()) {\n getSimEngine().addEvent(new ChangeColorEvent(trafficLights.get(current_traffic_light_index), getSimEngine().getCurrentSimTime()));\n }\n }", "public void initEventsAndProperties() {\r\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\thandler = new ConnectionHandler();\n\t\tmerrQytetet();\n\t\tupdateTable();\n\t}", "public void onStart() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tinitConnection();\n\t\t\t\treceive();\n\t\t\t}\n\t\t}.start();\n\t}", "void handleConnectionOpened();", "private void createConnection() {\n this.callbacks = getCallbacks();\n\n Properties props = new Properties();\n props.putAll(getTestProps());\n props.putAll(getProps());\n this.connection = Connections.create((ConnectionCallbacks) callbacks, props);\n configureConnection(connection);\n }", "public TcpClient(OnMessageReceived listener) {\n\n messageListener = listener;\n }", "public void addConnectionEventListener(OfficeConnectionEventListener connectionEventListener) {\n\t\tconnectionEventListeners.add(connectionEventListener);\n\t}", "public void init() {\r\n setEventType(4);\r\n }", "@Override\n\tpublic void connectionReady() {\n\t}", "@Reference(\n name = \"identity.core.init.event.service\",\n service = IdentityCoreInitializedEvent.class,\n cardinality = ReferenceCardinality.MANDATORY,\n policy = ReferencePolicy.DYNAMIC,\n unbind = \"unsetIdentityCoreInitializedEventService\"\n )\n protected void setIdentityCoreInitializedEventService(IdentityCoreInitializedEvent identityCoreInitializedEvent) {\n }", "@Override\r\n\tprotected void initListener() {\n\t\tsuper.initListener();\r\n\t}", "private void initConnection(ConnectListener taskListener)\n throws PushException {\n boolean isFirstInitialization = packetReader == null\n || packetWriter == null;\n\n // Set the reader and writer instance variables\n initReaderAndWriter();\n LogUtil.LogOut(4, LOGTAG,\n \"initConnection Reader and Writer are created!\");\n\n try {\n if (isFirstInitialization) {\n packetWriter = new PacketWriter(this);\n packetReader = new PacketReader(this);\n } else {\n packetWriter.init();\n packetReader.init();\n }\n\n // Start the packet writer. This will open a XMPP stream to the\n // server\n packetWriter.startup();\n // Start the packet reader. The startup() method will block until we\n // get an opening stream packet back from server.\n packetReader.startup();\n\n LogUtil.LogOut(5, LOGTAG, \"initConnection packetReader=\"\n + packetReader.hashCode() + \", and packetWriter=\"\n + packetWriter.hashCode());\n\n LogUtil.LogOut(3, LOGTAG,\n \"initConnection Reader and Writer are ready!\");\n\n taskListener.onSuccess(this);\n\n } catch (PushException ex) {\n throw ex; // Everything stoppped. Now throw the exception.\n }\n }", "@Override\n\tpublic void onOpen(org.java_websocket.WebSocket conn,\n\t\t\tClientHandshake handshake) {\n\t\t System.out.println(\"有人连接Socket conn:\" + conn);\n\t // l++;\n\t\t logger.info(\"有人连接Socket conn:\" + conn.getRemoteSocketAddress());\n\t\t l++;\n\t\t\n\t}", "@Override\n public void onConnectionInitiated(@NonNull String endpointId, @NonNull ConnectionInfo connectionInfo) {\n Log.e(TAG, SUB_TAG+\"Accepted: \" + endpointId + \"\\n\\t\" + connectionHandler.getDeviceName());\n\n endPointNames.put(endpointId, connectionInfo.getEndpointName());\n// connectedUsers.put(endpointId, connectionInfo.getEndpointName());\n MainActivity.makeLog(\"Accepting connection with \"+endpointId+\"/\"+connectionInfo.getEndpointName());\n connectionHandler.getClient().acceptConnection(endpointId, payloadCallback);\n }", "public Eventd() {\n }", "private Connection() {\n\t\tSystem.out.println(\">> Connection Object Constructed at \"+this);\n\t}", "protected void onConnect() {}", "private void initConnection(Socket cli) {\t\n\tConnection conn = new Connection(this, cli);\n conn.setConnlist(connlist);\n\tThread t = new Thread(conn);\n\tt.start();\n\t\n\tconnlist.add(conn);\n\t\t\n\tsetConnectedStatus(true);\n }", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "public void securityNegotiationStarted(\n\t\tCallPeerSecurityNegotiationStartedEvent securityStartedEvent);", "public void init(int yea)\n {\n try\n {\n InitialContext initialContext = new InitialContext(getProperties());\n //logger.info(\"initial context successful\");\n\n// ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup(\"/ConnectionFactory\");\n// System.out.println(\"lookup successful\");\n// Connection connection = connectionFactory.createConnection();\n//\n// Queue bridgeQueue = (Queue)initialContext.lookup(\"/queue/bridgeQueue\");\n// Queue himsQueue = (Queue)initialContext.lookup(\"/queue/himsQueue\");\n//\n// Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n// consumer = session.createConsumer(bridgeQueue);\n// producer = session.createProducer(himsQueue);\n\n System.out.println(\"connection successful\");\n //logger.info(\"Jms Connection factory and resources created without errors\");\n// connection.start();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n //logger.error(\"error looking up jms connection factory\", e);\n }\n }", "private void initialize() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n } catch (ClassNotFoundException e) {\n LOGGER.error(\"DB: Unable to find sql driver.\", e);\n throw new AppRuntimeException(\"Unable to find sql driver\", e);\n }\n\n DbCred cred = getDbCred();\n this.connection = getConnection(cred);\n this.isInitialized.set(Boolean.TRUE);\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tConnectionDB.getInstance();\n\t}", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "@Override\n public void onCreate() {\n\n Log.v(TAG, \"called onCreate\");\n IntentFilter intentf = new IntentFilter();\n setClientID();\n intentf.addAction(ConnectivityManager.CONNECTIVITY_ACTION);\n registerReceiver(new MQTTBroadcastReceiver(), new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));\n mConnMan = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n }", "@Override\n public boolean init()\n {\n \tFile file = new File(\"err.txt\");\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(file);\n\t\t\tPrintStream ps = new PrintStream(fos);\n\t\t\tSystem.setErr(ps);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n if (connected)\n {\n System.out.println(\"Client connection already initialized.\");\n return true;\n }\n properties = getProperties();\n String driver = properties.getProperty(DRIVER_CLASS, DRIVER_CLASS_DEFAULT);\n String url = properties.getProperty(CONNECTION_URL, CONNECTION_URL_DEFAULT);\n String user = properties.getProperty(CONNECTION_USER, CONNECTION_USER_DEFAULT);\n String passwd = properties.getProperty(CONNECTION_PASSWD, CONNECTION_PASSWD_DEFAULT);\n try\n {\n if (driver != null)\n {\n Class.forName(driver);\n }\n connection = DriverManager.getConnection(url, user, passwd);\n System.out.println(\"Connection established successfully!\");\n connected = true;\n newCachedStatements = new ConcurrentHashMap<>();\n return true;\n }\n catch (ClassNotFoundException | SQLException ex)\n {\n Logger.getLogger(WindowsAzureClientInit.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Error in creating a connection with the database!\");\n return false;\n }\n }", "public Connection() {\n\t\t\n\t}", "@OnOpen\n @SuppressWarnings(\"rawtypes\")\n public void onOpen(WebSocketSession session, HttpRequest request) {\n session.put(HTTP_REQUEST_KEY, request);\n scheduler.schedule(configuration.getConnectionInitWaitTimeout(), () -> {\n if (!connections.contains(session.getId())) {\n session.close(new CloseReason(4408, \"Connection initialisation timeout.\"));\n }\n });\n if (LOG.isTraceEnabled()) {\n LOG.trace(\"Opened websocket connection with id {}\", session.getId());\n }\n }", "@Override\n\tpublic void initialize() {\n\t\tSystem.out.println(\"TestClient initialization\");\n\t\tsubscribe(\"Scalars\");\n\t\tsubscribe(\"Triggers\");\n\t\tsubscribe(\"Alarms\");\n\n\t\t//If I'm a sender, run some tests\n\t\tif (_sender) {\n//\t\t\ttestIntArray();\n//\t\t\ttestSerializedObject();\n//\t\t\ttestStringArray();\n//\t\t\ttestDoubleArray();\n//\t\t\ttestString();\n//\t\t\ttestByteArray();\n//\t\t\ttestStreamedMessage();\n\t\t\tstressTest();\n\t\t}\n\t}", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\t\t\n\t}", "public Event() {\n\t}", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n protected void initializeEventList()\n {\n }", "public static void init() throws Exception {\n String host = \"localhost\";\n ConnectionFactory factory = new ConnectionFactory();\n factory.setHost(host);\n\n Connection connection = factory.newConnection();\n\n controllerChannel = connection.createChannel();\n controllerChannel.queueDeclare(\n CONTROLLER_QUEUE_NAME,\n true,\n false,\n true,\n null);\n }", "public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }", "public interface OnConnectListener {\n\n /**\n * Called when client connects.\n */\n void onConnect( );\n }", "private void initializeConnections() {\n connectionsCB.getItems().clear();\n connectionsCB.valueProperty().addListener(this);\n ConnectionsWrapper connection = (ConnectionsWrapper) XMLFileManager.loadXML(\"connections.xml\", ConnectionsWrapper.class);\n if (connection != null && connection.getConnectionList() != null) {\n fillConnectionItem(connection.getConnectionList());\n }\n }", "public Event() {\r\n\r\n\t}", "@Override\n\tpublic EventMessage initLocalEventMessage() {\n\t\treturn getEventMessage();\n\t}", "public synchronized void start() {\n if (D) Log.d(TAG, \"start\");\n\n // Cancel any thread attempting to make a connection\n if (mConnectThread != null) {mConnectThread.cancel(); mConnectThread = null;}\n\n // Cancel any thread currently running a connection\n if (mConnectedThread != null) {mConnectedThread.cancel(); mConnectedThread = null;}\n\n setState(STATE_LISTEN);\n }", "public void initProtocolEngine(AndesMQTTBridge mqttAndesConnection) throws MQTTException {\n if (null == mqttAndesConnectingBridge) {\n mqttAndesConnectingBridge = mqttAndesConnection;\n log.info(\"MQTT andes connecting bridge initialized successfully\");\n } else {\n final String error = \"Attempting to initialize the bridge more than once, there cannot be more than \" +\n \"one bridge instance\";\n log.error(error);\n throw new MQTTException(error);\n }\n }", "private void handleGroupInitStubEvent(GroupInitStubEvent event) throws AppiaEventException {\n \t\tevent.loadMessage();\n \n \t\tSystem.out.println(\"Received a new client connecting to me for group: \" + event.getGroup().id);\n \n \t\t//Let's get the arguments\n \t\tEndpt clientEndpt = event.getEndpoint();\n \n \n \t\t//Let's create the client\n \t\tVsClient newClient = new VsClient(clientEndpt, \n \t\t\t\tevent.getGroup(), (InetSocketAddress) event.source, listenAddress);\n \n \t\t//Let's warn everybody that a client wishes to Join\n \t\tNewClientProxyEvent newClientProxyEvent = new NewClientProxyEvent(newClient, clientEndpt);\n \t\tsendToOtherServers(newClientProxyEvent);\n \t\tsendToMyself(newClientProxyEvent);\n \t}", "public EventProcessorHost(\n final String hostName,\n final String eventHubPath,\n final String consumerGroupName,\n final String eventHubConnectionString,\n ICheckpointManager checkpointManager,\n ILeaseManager leaseManager) {\n this(hostName, eventHubPath, consumerGroupName, eventHubConnectionString, checkpointManager, leaseManager, null, null);\n }", "@Override\r\n\tpublic void initialize(URL arg0, ResourceBundle arg1)\r\n\t{\r\n\t\t\r\n\t\tSubscriber subscriberA = new Subscriber(LoginController.subscriberResult.getSubscriberDetails());\r\n\t\tMessageCS message = new MessageCS(MessageType.ACTIVITY_LOG,subscriberA);\r\n\t\tMainClient.client.accept(message);\r\n\t\ttry {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tThread.sleep(1500);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//if the subscriber has no activities at all\r\n\t\tif(finalSubscriberActivity.size()==0)\r\n\t\t{\r\n\t\t\tAlert alert1=new Alert(Alert.AlertType.INFORMATION);\r\n\t\t\talert1.setTitle(\"Activities\");\r\n\t\t\talert1.setContentText(\"You dont have any activities\");\r\n\t\t\talert1.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//if the subscriber has activities\r\n\t\telse \r\n\t\t{\r\n\t\t\tcolumnDate.setCellValueFactory(new PropertyValueFactory<ActivityLog,String>(\"Date\"));\r\n\t\t\tcolumnAction.setCellValueFactory(new PropertyValueFactory<ActivityLog,String>(\"Activity\"));\r\n\t\t\tlistOfActivities = FXCollections.observableArrayList(finalSubscriberActivity);\r\n\t\t\tactivityLogTable.setItems(listOfActivities);\r\n\t\t}\r\n\t}", "@PostConstruct\n public void init() {\n eventBus.register(this);\n }", "@Override\n\tpublic void construct() {\n\t\tSystem.out.println(\"Getting a MySQL Database Connection\");\n\n\t}", "public Event() {\n }", "public Event() {\n }", "private void initializeChannelize() {\n ChannelizeConfig channelizeConfig = new ChannelizeConfig.Builder(this)\n .setAPIKey(Config.API_KEY)\n .setLoggingEnabled(true).build();\n Channelize.initialize(channelizeConfig);\n Channelize.getInstance().setCurrentUserId(ChannelizePreferences.getCurrentUserId(getContext()));\n if (Channelize.getInstance().getCurrentUserId() != null\n && !Channelize.getInstance().getCurrentUserId().isEmpty()) {\n Channelize.connect();\n }\n\n ChannelizeUIConfig channelizeUIConfig = new ChannelizeUIConfig.Builder()\n .enableCall(true)\n .build();\n ChannelizeUI.initialize(channelizeUIConfig);\n channelize = Channelize.getInstance();\n\n ChannelizeUtils channelizeUtils = ChannelizeUtils.getInstance();\n channelizeUtils.setOnConversationClickListener(this);\n }", "protected ICEvent() {}", "protected abstract void doInitialize() throws JMSException;", "private void InitiateRelevantActiveTransaction() {\n try {\n /**\n * Create a client socket with the host,\n * port, and timeout information.\n */\n mSocket = new Socket();\n mSocket.bind(null);\n mSocket.connect((new InetSocketAddress(mPeer.mIPAddr, Constants.WELCOME_SOCKET_PORT)), 3000);\n } catch (UnknownHostException e) {\n e.printStackTrace();\n return;\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n if (mSocket == null) {\n return;\n }\n\n switch (mQueryCode) {\n case Constants.CONNECTION_CODE_DISCOVER: {\n ActiveDiscoveryProcedure();\n break;\n }\n }\n\n }", "public RemoteCommitEvent() {\n }", "private void initEvents(){\n ArrayList<Event> en = new ArrayList();\n en.add(new Event_MessangerOfGods(this.village));\n en.add(new Event_PaganPriest(this.village));\n this.events = en;\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n this.eventDelegate.onCreate(bundle);\n }", "public EventProcessorHost(\n final String hostName,\n final String eventHubPath,\n final String consumerGroupName,\n final String eventHubConnectionString,\n final String storageConnectionString,\n final String storageContainerName,\n final String storageBlobPrefix,\n final ScheduledExecutorService executorService) {\n // Would like to check storageConnectionString and storageContainerName here but can't, because Java doesn't allow statements before\n // calling another constructor. storageBlobPrefix is allowed to be null or empty, doesn't need checking.\n this(hostName, eventHubPath, consumerGroupName, eventHubConnectionString,\n new AzureStorageCheckpointLeaseManager(storageConnectionString, storageContainerName, storageBlobPrefix), executorService);\n this.initializeLeaseManager = true;\n this.partitionManagerOptions = new AzureStoragePartitionManagerOptions();\n }", "public void onCreate() {\n super.onCreate();\n isConnected = false;\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "public void onCreation(java.lang.Object init)\n {\n }", "private Connection() {\n\t\tSystem.out.println(\"--Connection Created--\");\n\t}" ]
[ "0.6145692", "0.6144665", "0.60025847", "0.5856653", "0.5673413", "0.5617219", "0.5589475", "0.55713296", "0.54883957", "0.5483745", "0.54184145", "0.5401315", "0.5383925", "0.53347474", "0.5329067", "0.5326161", "0.52484107", "0.5247749", "0.5223674", "0.52066034", "0.51830864", "0.51700497", "0.515612", "0.5142114", "0.5140176", "0.5113729", "0.51067156", "0.50817466", "0.50799906", "0.50592494", "0.50406444", "0.5028945", "0.49993113", "0.49953657", "0.49924433", "0.4979865", "0.497735", "0.49763525", "0.49699083", "0.49682486", "0.49614704", "0.4952539", "0.4952182", "0.49482676", "0.49423125", "0.4940849", "0.4935923", "0.4915249", "0.4911533", "0.48950928", "0.48849714", "0.48804379", "0.48747313", "0.48711395", "0.48706812", "0.48662692", "0.48656958", "0.48651272", "0.48651272", "0.4861406", "0.4853519", "0.48475143", "0.48454112", "0.4840202", "0.48338586", "0.48313248", "0.48296577", "0.48247555", "0.48127878", "0.48084632", "0.4804891", "0.4799001", "0.47905645", "0.47848374", "0.47832987", "0.47797382", "0.47773817", "0.47733754", "0.4768805", "0.47660384", "0.47656393", "0.47612742", "0.47546968", "0.47546563", "0.4751025", "0.47506472", "0.4749649", "0.4749649", "0.4742244", "0.47373527", "0.47341403", "0.473325", "0.47329363", "0.47320637", "0.4732049", "0.47270888", "0.47239417", "0.47155967", "0.47154105", "0.47095492" ]
0.7085792
0
This method is used to select the Option by Value from Select Dropdown
public void selectByValue(WebElement webElement,String value) { Select sel = new Select(webElement); sel.selectByValue(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void selectValue(WebElement element,String value){\n\t\tSelect options = new Select(element);\n\t\toptions.selectByVisibleText(value);\n\t}", "public void setSingleSelectValue(String value){\n WebElement select = driver.findElement(singleSelectLocator);\n Select sele = new Select(select);\n sele.selectByIndex(1);\n /*\n actions.click(select).sendKeys(value).build().perform();\n // WebElement datalist = driver.findElement(By.tagName(\"datalist\"));\n \n List<WebElement> allOptions = select.findElements(By.tagName(\"option\"));\n System.out.println(\"#of datalist options: \" + allOptions.size());\n actions.moveToElement(allOptions.get(1)).click().build().perform();\n */\n //shift + tab\n // actions.sendKeys(Keys.TAB).perform();\n WebElement empidField = driver.findElement(inputTextEmpidLocator); \n actions.click(empidField).perform();\n \n }", "public static void selectValueFromDropDownByValue(WebElement element, String value) {\n \t\n \tselect = new Select(element);\n \tselect.selectByValue(value);\n \t\n }", "public static void select(WebElement select1, String value) {\r\n\r\n\t\tSelect select = new Select(select1);\r\n\t\tselect.selectByVisibleText(value);\r\n\t\tReporter.log(\"Selecting from dropdown value as : \" + value);\r\n\r\n\t}", "public static void selectDropdownByValue(WebElement element,String value){\n Select select = new Select(element);\n select.selectByValue(value);\n }", "public void selectOption(WebElement element,String text) {\nSelect s=new Select(element);\n//List<WebElement> options = s.getOptions();\n//WebElement webElement = options.get(index);\n//String text = webElement.getText();\ns.selectByVisibleText(text);\n\n\n}", "public static void selectFromDropdownByValue(By by,String value)\n {\n Select select = new Select(driver.findElement(by));\n select.selectByValue(value);\n\n }", "public void selectFromDropdown_Using_Value(WebElement element, String value) {\n\t\ttry {\n\t\t\tSelect select = new Select(element);\n\t\t\tselect.selectByValue(value);\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void selectFromList(WebElement select,\n\t\t\tString sValueToBeSelected) {\n\t\ttry {\n\t\t\tlogger.info(\"Inside getElementFromList method\");\n\t\t\tList<WebElement> options = select\n\t\t\t\t\t.findElements(By.tagName(\"option\"));\n\t\t\tlogger.info(\"Total elements having Option TAG :\" + options.size());\n\t\t\tfor (WebElement option : options) {\n\t\t\t\tlogger.info(option.getText());\n\t\t\t\tif (option.getText().trim()\n\t\t\t\t\t\t.equalsIgnoreCase(sValueToBeSelected.trim())) {\n\t\t\t\t\tlogger.info(\"Tag Name matched and will be clicked\");\n\t\t\t\t\toption.click();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error ocurred while selecting the element fron List\"\n\t\t\t\t\t+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void selectByValue(By locator,String value){\n\n\t\tWebElement element = findElementClickable(locator);\n\n try {\n\n Select select=new Select(element);\n select.selectByValue(value);\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"There is an error while selecting the value \"+value+\": with locator \"+locator+\". Exception \"+e);\n\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n }", "public void selectValuefromDropDown(WebElement element, String text) {\n\t\tSelect dropDown = new Select(element);\n\t\tdropDown.selectByVisibleText(text);\n\t}", "public void selectvalueFromDropDown(String xpath,String value){\n\t\tList<WebElement> Options = driver.findElements(By.xpath(xpath));\n\t\tfor(WebElement option : Options){\n\t\t\tif(option.getText().equals(value)){\n\t\t\t\toption.click();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}", "public void selectItemInDropDownByValue(WebElement elementDD, String valueInDD) {\r\n try {\r\n Select optionsFromDD = new Select(elementDD);\r\n optionsFromDD.selectByValue(valueInDD);\r\n logger.info(valueInDD + \" was select in DD\");\r\n\r\n } catch (Exception e) {\r\n logger.error(\"Cannot work with element\");\r\n Assert.fail(\"Cannot work with element\");\r\n }\r\n\r\n }", "public void selectDropDownUsingValue(WebElement ele, String value) {\n\t\tSelect dropdown=new Select(ele);\r\n\t\tdropdown.selectByValue(value);\r\n\t}", "public void Dropdownselection(WebElement ele) {\t\t\n\t\t\n\t Select dropdown = new Select(ele);\n\t//Get all options\n\tList<WebElement> dd = dropdown.getOptions();\n\t int iCnt = dd.size();\n Random num = new Random();\n int iSelect = num.nextInt(iCnt);\n dropdown.selectByIndex(iSelect);\n System.out.println(\"Element Name 1 : \" +ele.getAttribute(\"value\"));\n\t}", "protected void findWebElementAndSelect(By webElementSelector, String value){\n\t\ttry {\n\t\t\tSelect dropdown = new Select(findWebElement(webElementSelector));\n\t\t\tdropdown.selectByVisibleText(value);\n\t\t} catch (UnexpectedTagNameException e) {\n\t\t\tthrow new AssertionError(\"Cannot create select item basing on webElement \" + webElementSelector.toString());\n\t\t}\t\t\n\t}", "public void selectDropdownvalueOnCheckoutOrderPage(String key, String value){\n\t\tselectDropdownvalue(key, value);\n\t}", "public void Click_selectmenu(String val, WebElement eleToClick, ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\tSelect cotentsdropdown = new Select(eleToClick);\n\t\t\tcotentsdropdown.selectByValue(val);\n\t\t\tLog.message(\"Selected menu option: \" + val, extentedReport);\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Selected menu option\" + e);\n\t\t}\n\t}", "public static void jqueryselectdropdown(By locator,String... value) {\n \t List<WebElement> selectchoice=driver.findElements(locator);\n \t\tSystem.out.println(selectchoice.size());\n \t\tif(! value[0].equalsIgnoreCase(\"all\")) {\n \t\t\t\t\n \t\tfor(int i=0;i<selectchoice.size();i++) {\n \t\t\tString text=selectchoice.get(i).getText();\n \t\t\tSystem.out.println(text);\n \t\t\t//if(text.equals(value)) {this is for singele value\n \t\t\t\t//ele.click();\n \t\t\t\t//break;\n \t\t\t//}\n \t\t\t\n \t\t\t\n \t\t\tfor(int j=0;j<value.length;j++) {\n \t\t\t\tif(text.equals(value[j])) {\n \t\t\t\t\tselectchoice.get(i).click();\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t\n \t\t}\n \t\t}\n \t\t\n \t\t\t\n \t\t\n \t\telse {\n \t\t\ttry {\n \t\t\tfor(WebElement e:selectchoice) {\n \t\t\t\te.click();\n \t\t\t\t\n \t\t\t}\n \t\t\t}catch (Exception e) {\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t}", "public Builder setSelect(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n select_ = value;\n onChanged();\n return this;\n }", "public boolean selectDropdownValueByValue(By locator,String valueAttributeText){\r\n\t\t\ttry {\r\n\t\t\t\tthis.waitForVisibilityOfElement(locator);\r\n\t\t\t\tWebElement dropdown = driver.findElement(locator);\r\n\t\t\t\tSelect select = new Select(dropdown);\r\n\t\t\t\tselect.selectByValue(valueAttributeText);\r\n\t\t\t\treturn true;\r\n\t\t\t} catch (NoSuchElementException e) {\r\n\t\t\t\tSystem.out.println(\"No Such Element Exception :\" + e.getMessage());\r\n\t\t\t\treturn false;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public void selectDropDuwn(String dropDownValue) {\n\t\t\n\t\ttry {\n\t\t\tTestLog.log.info(\"check dropdown exist\");\n\t\t\tif (driver.findElement(dropDown).isDisplayed()) {\n\t\t\t\tTestLog.log.info(\"select from dropdown list\");\n\t\t\t\tSelect drpRecords = new Select(driver.findElement(dropDown));\n\t\t\t\tdrpRecords.selectByVisibleText(dropDownValue);\n\t\t\t} else {\n\t\t\t\tTestLog.log.info(\"dropdown does not exist\");\n\t\t\t\tSystem.out.println(\"Table Entry dropdown not visible\");\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tTestLog.log.info(\"Could not find dropdown\" + ex);\n\t\t}\n\n\t}", "@Test(priority = 13)\n public void selectDropdownTest() {\n Select colors = new Select(driver.findElement(By.cssSelector(\"div.colors select\")));\n colors.selectByVisibleText(\"Yellow\");\n }", "public void select(final String value) {\n\t\tif (value == null) {\n\t\t\treturn;\n\t\t}\n\t\twait(action(c -> {\n\t\t\tfor (int i = 0; i < c.getModel().getSize(); i++) {\n\t\t\t\tif (value.equals(c.getModel().getElementAt(i).toString())) {\n\t\t\t\t\tc.setSelectedIndex(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}).withReportText(\"selecting element \" + value));\n\t\tAssertions.assertTrue(getCachedElement().getSelectedIndex() >= 0,\n\t\t\t\t() -> name + \": element must have been selected: \" + value);\n\t}", "public static void dropDownByValue(WebElement element, String value) {\r\n\t\ttry {\r\n\t\t\tSelect dropdown = new Select(element);\r\n\t\t\tdropdown.selectByValue(value);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"WebElement not found : \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void selectTypeSelenium(String seleniumValue) {\n\t\treporterLog(\"select\"+seleniumValue+\"from dropdown\");\n\t\twaitForElementPresent(sdd_selenium);\n\t\tselectByValueDropdown(sdd_selenium, seleniumValue);\n\t\timplicitlyWait(2);\n\n\t}", "public static void selectDropDown(final String selectionType,\n\t\t\tfinal String objLocator, final String value, boolean trimFlg) {\n\t\tlogger.debug(\"Executing Test Step::\" + new Object() {\n\t\t}.getClass().getEnclosingMethod().getName());\n\n\t\tSelect select = new Select(getElementAfterLoaded(objLocator));\n\t\tList<WebElement> list = select.getOptions();\n\t\tboolean notFoundFlg = true;\n\t\tint index = 0;\n\t\tboolean condition;\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tif (trimFlg) {\n\t\t\t\tcondition = list.get(i).getText().trim()\n\t\t\t\t\t\t.equalsIgnoreCase(value.trim());\n\t\t\t} else {\n\t\t\t\tcondition = list.get(i).getText().equalsIgnoreCase(value);\n\t\t\t}\n\t\t\tif (condition) {\n\t\t\t\tlogger.debug(list.get(i).getText() + \"=\" + value);\n\t\t\t\tnotFoundFlg = false;\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notFoundFlg) {\n\t\t\tAssert.fail(\"Given value [\" + value\n\t\t\t\t\t+ \"] is not available in the dropdown\");\n\t\t}\n\t\tif (selectionType.equals(GridpointConstants.DROPDOWN_BYINDEX)) {\n\t\t\tselect.selectByIndex(index);\n\t\t} else if (selectionType.equals(GridpointConstants.DROPDOWN_BYVALUE)) {\n\t\t\tselect.selectByValue(value);\n\t\t} else if (selectionType\n\t\t\t\t.equals(GridpointConstants.DROPDOWN_BYVISIBLETEXT)) {\n\t\t\tselect.selectByVisibleText(value);\n\t\t} else {\n\t\t\tlist.get(index).click();\n\t\t}\n\t}", "public void selectOption(WebDriver driver, String secondaryPartialSelectionListID, String visibleText) throws InterruptedException{\n\t\t\tWebElement dropwDownListBox = driver.findElement(By.xpath(\n\t\t\t\t\t \"//*[contains(@id,'edit-field') and contains(@id,'\" +\n\t\t\t secondaryPartialSelectionListID + \n\t\t\t \"')]\"\n\t\t\t ));\n\t\t\tSelect clickThis = new Select(dropwDownListBox);\n\t\t\tThread.sleep(1000);\n\t\t clickThis.selectByVisibleText(visibleText); \n\t\t\tThread.sleep(1000);\n\t }", "public void selectOption(WebDriver driver, Object selectionListXpath, String visibleText) throws InterruptedException{\n\t\t\tWebElement dropwDownListBox = driver.findElement(By.xpath(String.valueOf(selectionListXpath)));\n\t\t\tSelect clickThis = new Select(dropwDownListBox);\n\t\t\tThread.sleep(1000);\n\t\t clickThis.selectByVisibleText(visibleText); \n\t\t\tThread.sleep(1000);\n\t }", "public boolean selectDropdownValueByVisibleText(By locator, String optionToSelect) {\r\n\t\ttry {\r\n\t\t\tthis.waitForVisibilityOfElement(locator);\r\n\t\t\tWebElement dropdown = driver.findElement(locator);\r\n\t\t\tSelect select = new Select(dropdown);\r\n\t\t\tList<WebElement> allOptions = select.getOptions();\r\n\t\t\tfor (WebElement option : allOptions) {\r\n\t\t\t\tString text = option.getText();\r\n\t\t\t\tif (text.equals(optionToSelect)) {\r\n\t\t\t\t\toption.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.out.println(\"No Such Element Exception :\" + e.getMessage());\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static void selectFromDropdownByValue(By by, String text) {\n Select select = new Select(driver.findElement(by));\n select.selectByValue(text);\n }", "public void selectSource(String selection) {\r\n\t\tList<WebElement> elements = this.source.findElements(By\r\n\t\t\t\t.tagName(\"option\"));\r\n\t\tfor (WebElement element : elements) {\r\n\t\t\tif (element.getText().equalsIgnoreCase(selection)) {\r\n\t\t\t\telement.click();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public void selectSortOrder(String optionValue)\n\t{\n\t\tSystem.out.println(\"Method 'selectSortOrder' running\");\n\t\twait = new WebDriverWait(driver,5);\n\t\tsortMenu = driver.findElement(By.xpath(sortMenuXpath));\n\t\tsortMenu.click();\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.id(optionValue)));\n\t\tsortListItem = driver.findElement(By.id(optionValue));\n\t\tsortListItem.click();\n\t}", "public void selectDropDownUsingVisibleText(WebElement ele, String value) {\n\t\tSelect dropdown=new Select(ele);\r\n\t\tdropdown.selectByVisibleText(value);\r\n\t}", "public void searchFilter(){\n\t\t\n\t\tdriver.findElement(By.xpath(\"//div[@class='_3uDYxP']//select[@class='_2YxCDZ']\")).click();\n\t\tSystem.out.println(\"drop-downselected\");\n\t}", "public boolean selectDropdownValueByIndex(By locator,int index){\r\n\t\ttry {\r\n\t\t\tthis.waitForVisibilityOfElement(locator);\r\n\t\t\tWebElement dropdown = driver.findElement(locator);\r\n\t\t\tSelect select = new Select(dropdown);\r\n\t\t\tselect.selectByIndex(index);\r\n\t\t\treturn true;\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.out.println(\"No Such Element Exception :\" + e.getMessage());\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void selectAccountNo ()\r\n\t{\r\n\t\tWebDriverWait wait = new WebDriverWait (driver, GlobalWaitTime.getIntWaitTime ());\r\n\t\twait.until (ExpectedConditions.elementToBeClickable (orClaimLogPaymentClaimPayment.ddlAccountNoBACS));\r\n\r\n\t\tSelect oAccountNo = new Select (orClaimLogPaymentClaimPayment.ddlAccountNoBACS);\r\n\r\n\t\tList<WebElement> selections = oAccountNo.getOptions ();\r\n\t\tint intIndex = RandomNumbers.randomNumberGenerator (1, selections.size () - 1);\r\n\t\toAccountNo.selectByIndex (intIndex);\r\n\r\n\t\twait.until (ExpectedConditions.invisibilityOf (orControlPanel.barProgress));\r\n\r\n\t}", "public static void getFirstSelectedoption(By by, String text) {\n Select select = new Select(driver.findElement(by));\n select.getFirstSelectedOption();\n }", "public void selectvalueFromList(String xpath,String value){\n\t\tList<WebElement> Options = driver.findElements(By.xpath(xpath));\n\t\tfor(WebElement option : Options){\n\t\t\tif(option.getText().equals(value)){\n\t\t\t\toption.click();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}", "public static void selectByValue(By element, String num)\n {\n new Select(driver.findElement(element)).selectByValue(num);\n }", "public static void dropDownAction(WebDriver driver, String locatorType, String locatorValue, String testdata) throws Exception\r\n{\r\n\tif(locatorType.equalsIgnoreCase(\"xpath\"))\r\n\t{\r\n\t\tint value = Integer.parseInt(testdata);\r\n\t\tWebElement element = driver.findElement(By.xpath(locatorValue));\r\n\t\tSelect select = new Select(element);\r\n\t\tselect.selectByIndex(value);\r\n\t\t\r\n\t}\r\n\tif(locatorType.equalsIgnoreCase(\"id\"))\r\n\t{\r\n\t\tint value = Integer.parseInt(testdata);\r\n\t\tWebElement element = driver.findElement(By.xpath(locatorValue));\r\n\t\tSelect select = new Select(element);\r\n\t\tselect.selectByIndex(value);\r\n\t\t\r\n\t}\r\n}", "static void selectFirstOption(){\r\n\r\n WebDriverWait wait= new WebDriverWait(BrowserInitiation.driver, 5000);\r\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(brandFromListCssSelector)));\r\n\r\n List<WebElement> brandOptionsList= BrowserInitiation.driver.findElements(By.cssSelector(brandFromListCssSelector));\r\n brandOptionsList.get(0).click();\r\n\r\n }", "public void selectDropdownvalueOnCheckoutOrderPage(String key, int index){\n\t\tselectDropdownvalue(key, index);\n\t}", "public void SelectValueByName(String Id, String Value) {\n\t\t\r\n\t}", "public void selectItemInDropDownByVisibleText(WebElement elementDD, String textForSelect) {\r\n try {\r\n Select optionsFromDD = new Select(elementDD);\r\n optionsFromDD.selectByVisibleText(textForSelect);\r\n logger.info(textForSelect + \" was selected in DD\");\r\n\r\n } catch (Exception e) {\r\n logger.error(\"Cannot work with element\");\r\n Assert.fail(\"Cannot work with element\");\r\n }\r\n\r\n }", "public static WebElement drpdwn_selectSortFilterList(String selectVal) throws Exception{\r\n \ttry{\r\n \t\tWebElement dropdown = driver.findElement(By.name(\"SortFiltList\")); \r\n \t\tList<WebElement> allOptions = dropdown.findElements(By.tagName(\"option\")); \r\n \t\tfor(WebElement option : allOptions){ \r\n \r\n \t\t\tif(option.getText().equals(selectVal)){ \r\n \t\t\t\toption.click(); \r\n \t\t\t} \r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public static void select(Combo combo, Object value){\n\t\tfor (int i = 0; i <combo.getItems().length; i++) {\n\t\t\tif (value.equals(combo.getItem(i))){\n\t\t\t\tcombo.select(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "WebElement getStatusSelectField();", "public T getSelectedValueOption() {\r\n return selectedValueOption;\r\n }", "public void selectDropdownValueFromDropdownHeaderTopupMenu(String strDropdownValue) {\r\n\t\tBy locator = By.xpath(\"//ul[@class='dropdown-menu']/li/a[text()='\" + strDropdownValue + \"']\");\r\n\t\tdriver.findElement(locator).click();\r\n\t}", "public static String getSelectedOption(WebElement options) {\n\t\tString sSelectedOption = null;\n\t\ttry {\n\t\t\tlogger.info(\"INTO THE METHOD getSelectedOption\");\n\t\t\tSelect selectedOption = new Select(options);\n\t\t\tsSelectedOption = selectedOption.getFirstSelectedOption().getText();\n\t\t\tlogger.info(\"OUT OF METHOD getSelectedOption\");\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Some error came on function->select->\"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\treturn sSelectedOption;\n\t}", "public void selectDropDownListOptionByLabel(String sObject, String label) throws Exception {\n try {\n if (label != \"\") {\n log.info(\"Starting keyword selectDropDownListOptionByLabel ...\");\n\n Select select = new Select(driver.findElement(By.xpath(sObject)));\n select.selectByVisibleText(label);\n }\n } catch (Exception ex) {\n log.fail(\"[FAILED] - selectDropDownListOptionByLabel - Exception occurred:\\n\" + ex);\n throw ex;\n }\n log.info(\"[PASSED] - selectDropDownListOptionByLabel ran succesfully!\");\n }", "public static void select_AssignedOrderValue(String assignorder) {\n\t\tboolean bstatus;\n\n\t\tbstatus = selectListItem(select_AssignedOrder, assignorder);\n\t\tReporter.log(bstatus, \"Assigned Order is selected from dropdown\", \"Assigned Order is not selected\");\n\n\t\t\n\t}", "@Test\n public void test2_verify_state_dropdown() throws InterruptedException{\n // we need to locate the dropdown\n\n Select stateDropdown = new Select(driver.findElement(By.xpath(\"//select[@id='state']\")));\n //3. Select Illinois --> selecting by visible text\n Thread.sleep(1000);\n stateDropdown.selectByVisibleText(\"Illinois\");\n\n //4. Select Virginia --> selecting by value\n Thread.sleep(1000);\n stateDropdown.selectByValue(\"VA\");\n\n //5. Select California --> select by index\n Thread.sleep(1000);\n stateDropdown.selectByIndex(5);\n //6. Verify final selected option is California.\n String expectedResult = \"California\";\n String actualResult = stateDropdown.getFirstSelectedOption().getText();\n\n Assert.assertEquals(actualResult, expectedResult, \"Actual vs expected is not equal!\");\n //Use all Select options. (visible text, value, index)\n }", "public static void selectFromDropdownByText(By by,String text)\n {\n Select select = new Select(driver.findElement(by));\n select.selectByVisibleText(text);\n }", "public void assertSelectedValue(final String selectLocator, final String valuePattern);", "public static void selectFromDropdownByIndex(By by, int index) {\n Select select = new Select(driver.findElement(by));\n select.selectByIndex(index);\n }", "public String verifyDropdownSelectedValue(String object, String data) {\n\t\tlogger.debug(\"Entered into verifyDropdownSelectedValue()\");\n\t\ttry {\n\t\t\tWebElement select = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object))));\n\t\t\tSelect sel = new Select(select);\n\t\t\tString defSelectedVal = sel.getFirstSelectedOption().getText();\n\t\t\tlogger.debug(defSelectedVal);\n\t\t\tlogger.debug(data);\n\t\t\tif (defSelectedVal.trim().equals(data.trim())) {\n\t\t\t\treturn Constants.KEYWORD_PASS + \" -- Default value present \";\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Default value not present \";\n\t\t\t}\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" - Could not select from list. \" + e.getMessage();\n\t\t}\n\t}", "public SelectType (int _selectType) {\n selectType = _selectType;\n }", "public static void selectByValue(By by, String text) {\n Select select = new Select(driver.findElement(by));\n select.selectByValue(text);\n }", "public void DropdownSelect(WebElement Element,String SelectBy,String Selector,\n\t\t\tString Desc) throws RowsExceededException, WriteException, IOException\n\t{\n\t\tboolean status=true;\n\t\tSelectBy=SelectBy.toUpperCase();\n\t\ttry {\n\t\t\tDesc =Desc+\" Select by locator : \"+SelectBy+\" seleting value: \"+Selector;\n\t\t\tListbox = new Select(Element);\n\t\t\tif(SelectBy.equals(\"VT\"))\n\t\t\t\tListbox.selectByVisibleText(Selector);\n\t\t\telse if(SelectBy.equals(\"VAL\"))\n\t\t\t\t\tListbox.selectByValue(Selector);\n\t\t\telse if(SelectBy.equals(\"INDEX\"))\n\t\t\t\tListbox.selectByIndex(Integer.parseInt(Selector));\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Wrong locator type please verify\");\n\t\t\t\t\tstatus=false;\n\t\t\t\t\t//report.addInLine(Desc, \"fail\", driver);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(status)\n\t\t\t\t{\n\t\t\t\t\t//report.addInLine(Desc, \"pass\", driver);\n\t\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.out.println(\"NumberFormatException\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(Exception e1)\n\t\t{\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Nonnull\n public DelegatedAdminCustomerRequest select(@Nonnull final String value) {\n addSelectOption(value);\n return this;\n }", "public static void select_by_value(By locator, String value) throws CheetahException {\n\t\ttry {\n\t\t\twait_for_element(locator);\n\t\t\tSelect element = new Select(CheetahEngine.getDriverInstance().findElement(locator));\n\n\t\t\tWebElement elem = CheetahEngine.getDriverInstance().findElement(locator);\n\t\t\tdriverUtils.highlightElement(elem);\n\t\t\tdriverUtils.unHighlightElement(elem);\n\n\t\t\telement.selectByVisibleText(value);\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "private void selectOptionByLinkText(int optionsListCode, String optionsLinkText) {\r\n\t\ttry {\r\n\t\t\tboolean OptionFound = false;\r\n\t\t\tList<WebElement> options = driver.findElements(By.cssSelector(\r\n\t\t\t\t\t\"#nav-flyout-shopAll > div.nav-subcats > div:nth-child(\" + optionsListCode + \") a>span.nav-text\"));\r\n\t\t\tfor (WebElement givenOption : options) {\r\n\t\t\t\tif (givenOption.getText().equals(optionsLinkText)) {\r\n\t\t\t\t\tseHoverOnElement(givenOption, optionsLinkText);\r\n\t\t\t\t\tseClickOnElement(givenOption, optionsLinkText);\r\n\t\t\t\t\tOptionFound = true;\r\n\t\t\t\t\tLog.info(\"Successfully selected option: \" + optionsLinkText);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (OptionFound == false) {\r\n\t\t\t\tLog.info(\"Unable of find given option: \" + optionsLinkText\r\n\t\t\t\t\t\t+ \". Please check the LinkText of given option\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.error(\r\n\t\t\t\t\t\"Exception occured while selecting the SubDepartment : \" + optionsLinkText + \" \" + e.getMessage());\r\n\t\t}\r\n\t}", "public static void selectDropDown(WebElement obj, String selectItem, String objname) throws Exception{\r\n\t\tif(obj.isDisplayed()){\r\n\t\t\tSelect options = new Select(obj);\r\n\t\t\toptions.selectByVisibleText(selectItem);\r\n\t\t\tUpdate_Report(\"Pass\", \"selectFromDropDown\", \"Menu item \" +selectItem+ \" is Selected\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tUpdate_Report(\"Fail\", \"selectFromDropDown\", objname + \" DropDown menu is not displayed please check your application\");\r\n\t\t}\r\n\t}", "@Nonnull\n public UserSettingsRequest select(@Nonnull final String value) {\n addSelectOption(value);\n return this;\n }", "public static boolean selectSingleValueFromDropdown(WebElement dropdown, String value) throws InterruptedException {\n \n\t\tThread.sleep(2000);\n\t\tif (dropdown.isDisplayed() && dropdown.isEnabled()) {\n\t\t\tSelect select = new Select(dropdown);\n\n\t\t\t// checking for presence of value\n\n\t\t\tList<WebElement> allAvailableOptions = select.getOptions();\n\t\t\tList<String> allValues = new ArrayList<String>();\n\t\t\tif (allAvailableOptions.size() > 0) {\n\t\t\t\tfor (WebElement optn : allAvailableOptions) {\n\t\t\t\t\tallValues.add(optn.getText());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Dropdown with no option found.\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// checking if desire option is already selected\n\t\t\tif (allValues.contains(value)) {\n\t\t\t\tif (select.getAllSelectedOptions().size() > 0) {\n\t\t\t\t\tList<WebElement> allSelectedOptions = select.getAllSelectedOptions();\n\t\t\t\t\tList<String> allSelectedvalues = new ArrayList<String>();\n\t\t\t\t\tfor (WebElement e : allSelectedOptions) {\n\t\t\t\t\t\tallSelectedvalues.add(e.getText());\n\t\t\t\t\t}\n\t\t\t\t\tif (allSelectedvalues.contains(value)) {\n\t\t\t\t\t\tSystem.out.println(value + \" is already selected.\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselect.selectByVisibleText(value);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tselect.selectByVisibleText(value);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Desired \" + value + \" is not available in dropdown.\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"Dropdown is either not enabled or displayed. \");\n\t\t\treturn false;\n\t\t}\n\n\t}", "public static void dropdownText(WebElement element, String value) {\n\t\ts = new Select(element);\n\t\ts.selectByVisibleText(value);\n\t}", "void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }", "public static void firstSelectedOption(WebElement element) {\n\t\tSelect s = new Select(element);\n\t\tString text = s.getFirstSelectedOption().getText();\n\t\tSystem.out.println(text);\n\t}", "public static void dropdownIndex(WebElement element, String value) {\n\t\ts = new Select(element);\n\t\tInteger index = Integer.valueOf(value);\n\t\ts.selectByIndex(index);\n\t}", "@Override\n protected void processSelect() {\n \n }", "public void selectFromDropdown_Using_Text(WebElement element, String text) {\n\t\ttry {\n\t\t\tSelect select = new Select(element);\n\t\t\tselect.selectByVisibleText(text);\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void category1() {\r\n\t\tmySelect1.click();\r\n\t}", "@Nonnull\n public ExternalMeetingRegistrantRequest select(@Nonnull final String value) {\n addSelectOption(value);\n return this;\n }", "public void selectDropDownOptionByName(final String optionName) {\n By dropDownOption = By.xpath(String.format(optionTeamSelect, optionName));\n WebDriverHelper.clickElement(dropDownOption);\n }", "public void selectFromDropdown_Using_index(WebElement element, int index) {\n\t\ttry {\n\t\t\tSelect select = new Select(element);\n\t\t\tselect.selectByIndex(index);\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void librarianSelectsDramaBookCategory(){\n driver.get(\"https://library2.cybertekschool.com/\");\n //locate and send valid email to email input bar\n driver.findElement(By.id(\"inputEmail\")).sendKeys(\"librarian21@library\");\n //locate and send valid email to password input bar\n driver.findElement(By.xpath(\"//*[@id=\\\"inputPassword\\\"]\")).sendKeys(\"Sdet2022*\");\n //press sign in button\n driver.findElement(By.cssSelector(\"button.btn.btn-lg.btn-primary.btn-block\")).click();\n //sign in complete, librarian is on homepage\n\n //librarian clicks books module\n driver.findElement(By.linkText(\"Books\")).click();\n\n WebElement bookCategories = driver.findElement(By.cssSelector(\"select#book_categories\"));\n WebElement dramaCategory = driver.findElement(By.cssSelector(\"select#book_categories>option[value='6']\"));\n Select bookCategoriesDropDown = new Select(bookCategories);\n bookCategoriesDropDown.selectByVisibleText(\"Drama\");\n assertTrue(dramaCategory.isSelected());\n\n }", "public void selectVenue() {\n\t\t\r\n\t}", "SelectAlternative getSelectAlternative();", "public void setSelectMethod(Selection s){\n selectType = s;\n }", "protected Select selecionarOpcao(WebElement elemento) {\n\t\taguardaElemento(ExpectedConditions.elementToBeClickable(elemento));\n\t\treturn new Select(elemento);\n\t}", "private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {\n/* 393 */ SisMultiValoresDAO ob = new SisMultiValoresDAO();\n/* 394 */ Collection<SisMultiValoresDTO> arr = ob.cargarTabla(tabla);\n/* 395 */ ob.close();\n/* 396 */ if (dejarBlanco) {\n/* 397 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 398 */ op.setValue(\"\");\n/* 399 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 400 */ combo.appendChild(op);\n/* */ } \n/* 402 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();\n/* 403 */ while (iterator.hasNext()) {\n/* 404 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();\n/* 405 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 406 */ op.setValue(\"\" + reg.getCodigo());\n/* 407 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));\n/* 408 */ if (defecto.equals(reg.getCodigo())) {\n/* 409 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 410 */ escogida.setValue(\"on\");\n/* 411 */ op.setAttributeNode(escogida);\n/* */ } \n/* 413 */ combo.appendChild(op);\n/* */ } \n/* 415 */ arr.clear();\n/* */ }", "public void setSelectedValue(String selectedValue) {\r\n\t\tthis.selectedValue = selectedValue;\r\n\t}", "protected void onSelect() {\n\n }", "public void selectByindex(By locator,int index) {\n\n\t\tWebElement element = findElementClickable(locator);\n\n try {\n\n Select select=new Select(element);\n select.selectByIndex(index);\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"Exception \"+ e +\" thrown while selecting the value by index \"+index+\" using locator \"+locator);\n\t\n }\n\n\n }", "public static void selectByVisibleText(WebElement element,String strValue) {\n\t\tSelect slc;\n\t\ttry {\n\t\t\twaitForElementVisibility(element);\n\t\t\tslc = new Select(element);\n\t\t\tslc.selectByVisibleText(strValue);\n\t\t}catch(Exception e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t}", "public void select(int id) {\n selectedId = id;\n }", "String getSelect();", "String getSelect();", "public void select() {}", "public int getValue(){\n return selectedValue;\n }", "private void ComboUserActionPerformed(java.awt.event.ActionEvent evt) {\n if(ComboUser.getSelectedItem().equals(\"title\")){\n \n selected=1;\n }\n else if(ComboUser.getSelectedItem().equals(\"author\"))\n {\n selected=2;\n }\n else if(ComboUser.getSelectedItem().equals(\"subject\"))\n {\n selected=3;\n }\n }", "public void SelectDropdownByIndex(WebElement wb, int index) {\n\t\tSelect sel = new Select(wb);\n\t\tsel.selectByIndex(index);\n\t}", "public static void main(String[] args) throws Exception {\n\t\tSystem.setProperty(\"brower.type\", \"firefox\");\r\n\t\tWebDriver driver = DriverUtils.getDriver();\r\n\t\tdriver.get(\"http://localhost:5555/demo/survey/cybbbk/qdjcqk\");\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tSelect select= new Select(driver.findElement(By.name(\"vcZy\")));\r\n\t\tselect.selectByVisibleText(\"学生\");\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tselect.selectByIndex(4);//index是从0往下数的\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tselect.selectByValue(\"10\");\r\n\t\t//判断哪个被选中\r\n\t\tfor(int i=0; i<select.getOptions().size();i++) {\r\n\t\t\tif(select.getOptions().get(i).getAttribute(\"selected\")!=null){\r\n\t\t\t\tSystem.out.println(select.getOptions().get(i).getText());//打印显示的文本\r\n\t\t\t\tSystem.out.println(select.getOptions().get(i).getAttribute(\"value\"));//打印Value的值\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tThread.sleep(2000);\r\n\t\tselect.selectByIndex(0);;\r\n\t\t\r\n\t\tfor(int i=0; i<select.getOptions().size();i++) {\r\n\t\t\tThread.sleep(500);\r\n\t\t\tselect.selectByIndex(i);\r\n\t\t}\t\r\n\t\t\r\n\t\tdriver.findElement(By.partialLinkText(\"检查情况\")).click();\r\n\t\tSelect select1= new Select(driver.findElement(By.name(\"vcZy1\")));\r\n\t\tselect1.selectByVisibleText(\"学生\");\r\n\t\tselect1.selectByIndex(4);\r\n\t\tselect1.selectByValue(\"05\");\r\n\t\tSystem.out.println(select.getFirstSelectedOption().getText());\r\n\t\tselect1.deselectByIndex(4);//只能适用于多选下拉式列表框\r\n\t\t\r\n\t\tfor(int i=0; i<select1.getOptions().size();i++) {\r\n\t\t\tif(select1.getOptions().get(i).getAttribute(\"selected\")!=null){\r\n\t\t\t\tSystem.out.println(select1.getOptions().get(i).getText());//打印显示的文本\r\n\t\t\t\tSystem.out.println(select1.getOptions().get(i).getAttribute(\"value\"));//打印Value的值\r\n\t\t\t}\r\n\t\t}\r\n\t\tThread.sleep(1000);\r\n\t\tselect1.deselectAll();\r\n\t\t\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.quit();\r\n\t}", "@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }", "@Then(\"^Select value from dropdown, select check box & radio button$\")\n\t public void J() throws InterruptedException {\n\t\t Select s= new Select(driver.findElement(By.xpath(\"//*[@id=\\\"input_3\\\"]\")));\n\t\t s.selectByIndex(5);\n\t\t\n\t\t// Select check box\n\t\tWebElement Checkbox = driver.findElement(By.xpath(\"//*[@id=\\\"input_8_0\\\"]\"));\n\t\tJavascriptExecutor executor = (JavascriptExecutor)driver;\n\t\texecutor.executeScript(\"arguments[0].click();\", Checkbox);\n\t\t\n\t\t//Select radio button\n\t\t\n\t\tWebElement RadioButton = driver.findElement(By.xpath(\"//*[@id=\\\"input_13_1\\\"]\"));\n\t\t\n\t\texecutor.executeScript(\"arguments[0].click();\", RadioButton);\n\t\t\n\t\tif(RadioButton.isSelected()) {\n\t\t\tSystem.out.println(\"Radio button is selected\");\n\t\t}\n\t\tThread.sleep(2000);\n\t\t\n\t\t }", "public void selectDropDownUsingIndex(WebElement ele, int index) {\n\t\tSelect dropdown=new Select(ele);\r\n\t\tdropdown.selectByIndex(index);\r\n\t}", "protected void select() {\n\t\tcleanValues();\n\t\tint row = m_table.getSelectedRow();\n\t\tboolean enabled = row != -1;\n\t\tif (enabled)\n\t\t{\n\t\t\tInteger ID = m_table.getSelectedRowKey();\n\t\t\tif (ID != null)\n\t\t\t{\n\t\t\t\tm_C_Order_ID = ID.intValue();\n\t\t\t}\n\t\t}\n\t\tlog.info(\"ID=\" + m_C_Order_ID); \n\t}", "private void applySelectedValue(JComboBox comboBox, Object value) {\r\n comboBox.removeItemListener(this);\r\n ValueLabelItem currentItem;\r\n for (int i = 0; i < comboBox.getItemCount(); i++) {\r\n currentItem = (ValueLabelItem) comboBox.getItemAt(i);\r\n if (currentItem.getValue().equals(value)) {\r\n comboBox.setSelectedIndex(i);\r\n break;\r\n }\r\n }\r\n comboBox.addItemListener(this);\r\n }" ]
[ "0.71800566", "0.7120178", "0.70736945", "0.7042331", "0.7010594", "0.69060314", "0.6892334", "0.6881217", "0.6851053", "0.6835097", "0.6673998", "0.65907043", "0.65584654", "0.653555", "0.6525933", "0.6462014", "0.64422005", "0.6411085", "0.6386519", "0.6383082", "0.637079", "0.6360321", "0.63332105", "0.63242", "0.6320498", "0.6297627", "0.6179275", "0.61523956", "0.61406344", "0.61292565", "0.6115658", "0.61022854", "0.6089745", "0.6088176", "0.6060916", "0.60484535", "0.60396075", "0.6027606", "0.600691", "0.5996448", "0.5972314", "0.5971684", "0.5969267", "0.59626466", "0.59605354", "0.5946056", "0.59409505", "0.59177005", "0.5883803", "0.5882862", "0.5840921", "0.5830017", "0.5825929", "0.5813691", "0.58126146", "0.57914984", "0.57636696", "0.5758712", "0.57422864", "0.57370824", "0.57325345", "0.57286614", "0.57235795", "0.5710785", "0.5704502", "0.5702078", "0.5697617", "0.5680618", "0.5668235", "0.56557965", "0.5655176", "0.56527793", "0.56505376", "0.5644291", "0.56404513", "0.56284636", "0.5624865", "0.5620693", "0.5620185", "0.56136316", "0.56076777", "0.5599896", "0.5593251", "0.55842173", "0.556298", "0.5561342", "0.55562407", "0.5555153", "0.5552754", "0.5552754", "0.5540722", "0.5538186", "0.5537872", "0.55238926", "0.5521564", "0.5518913", "0.5515869", "0.55112845", "0.5511115", "0.5509224" ]
0.681643
10
This method is used to switch the driver control to new window
public String switchToNewWindow(WebDriver driver) { Set<String> ids = driver.getWindowHandles(); Iterator<String> it = ids.iterator(); String pid = it.next(); String cid = it.next(); driver.switchTo().window(cid); return pid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void switchToNewlyOpenedWindow(){\n\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t\tdriver.getWindowHandles();\n\t\t\tfor(String handle : driver.getWindowHandles())\n\t\t\t{\n\t\t\t\tdriver.switchTo().window(handle);\n\t\t\t}\n\t\t\tLOGGER.info(\"Step : Switching to New Window : Pass\");\n\t\t} catch (InterruptedException e) {\n\t\t\tLOGGER.error(\"Step : Switching to New Window : Fail\");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while switching to newly opened window\");\n\t\t}\n\t}", "@Test(groups=\"swithorAlert\")\n\tpublic void switchWindow() {\n\t\t\n\t\tWebElement newtabButton = driver.findElement(By.id(\"new-tab-button\"));\n\t\tAssert.assertNotNull(newtabButton, \"New tab button not present\");\n\t\tnewtabButton.click();\n\t\t\n\t\t\n\t\tString orgHandle = driver.getWindowHandle();\n\t\tfor (String handle: driver.getWindowHandles())\n\t\t{\n\t\t\tif(!handle.equals(orgHandle)) {\n\t\t\t\tdriver.switchTo().window(handle);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Switched window Url=\"+driver.getCurrentUrl());\n\t\t\n\t\t// Click on Alert\n\t\t\n\t}", "public void SwitchToWindow(String handle)\n\t{\n\t}", "public void switchToDefaultWindow() {\n\n\t}", "public void switchToWindow(int index) {\n\t\ttry {\r\n\t\t\tSet<String> allWindows = getter().getWindowHandles();\r\n\t\t\tList<String> allhandles = new ArrayList<String>(allWindows);\r\n\t\t\tString windowIndex = allhandles.get(index);\r\n\t\t\tgetter().switchTo().window(windowIndex);\r\n\t\t\tSystem.out.println(\"The Window With index: \"+index+\r\n\t\t\t\t\t\" switched successfully\");\r\n\t\t} catch (NoSuchWindowException e) {\r\n\t\t\tSystem.err.println(\"The Window With index: \"+index+ \" not found\");\t\r\n\t\t}\t\r\n\t}", "public void switchToWindow(String handle)\n\t{\n\t\ttry {\n\t\t\tdriver.switchTo().window(handle);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Step : Switching to New Window : Fail\");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while switching to window\");\n\n\t\t}\n\t}", "public void switchToLastWindow() {\n\t\tSet<String> windowHandles = getDriver().getWindowHandles();\n\t\tfor (String str : windowHandles) {\n\t\t\tgetDriver().switchTo().window(str);\n\t\t}\n\t}", "public static void main(String[] args) {\nWebDriverManager.chromedriver().setup();\r\nChromeDriver driver = new ChromeDriver();\r\ndriver.manage().window().maximize();\r\ndriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(0));\r\n\r\ndriver.get(\"http://www.leafground.com/pages/Window.html\");\r\n\r\ndriver.findElement(By.id(\"home\")).click();\r\n\r\n//WindowHanldes\r\n//it returns set, so we cant access it with index so convert it into list\r\nSet<String> winSet = driver.getWindowHandles();\r\n\r\n//cnvert set to list\r\n\r\nList<String> name = new ArrayList<String>(winSet);\r\nSystem.out.println(\"before switiching control:\" + driver.getTitle());\r\n// control is goven to second window\r\ndriver.switchTo().window(name.get(1));\r\nSystem.out.println(\"after switiching control:\" + driver.getTitle());\r\n\r\n\r\n// switching back again to main window by passsing index 0 \r\ndriver.switchTo().window(name.get(0));\r\nSystem.out.println(\"switiching control back to main:\" + driver.getTitle());\r\n\r\n\r\n//number of window opened \r\n\r\nSystem.out.println(\"Number of windows: \"+ winSet.size());\r\n\r\n//driver.close(); // closes the current window\r\n//driver.quit();//all the open windows will close\r\n\r\n\t\r\n\t}", "@Test(priority = 3)\r\n\t//@BeforeMethod\r\n\tpublic void NavigateToPDPPage() throws Exception\r\n\t{\r\n\t\tthis.driver=driver;\r\n Click_Action.Btn_Click(PageObjectModal.WISE_HomePage_Page.WISE_SearchPDPLink, 6, 6,\"Xpath\");\r\n Thread.sleep(1000);\r\n \r\n //**\r\n Set<String> AllWindowHandles = driver.getWindowHandles();\r\n String window1 = (String) AllWindowHandles.toArray()[0];\r\n System.out.print(\"window1 handle code = \"+AllWindowHandles.toArray()[0]);\r\n String window2 = (String) AllWindowHandles.toArray()[1];\r\n System.out.print(\"\\nwindow2 handle code = \"+AllWindowHandles.toArray()[1]);\r\n driver.switchTo().window(window2);\r\n \r\n //**\r\n AssertCls.AssertText(PageObjectModal.WISE_HomePage_Page.WISE_PDPProdName, 6, 6, 6, 5,\"Xpath\");\r\n //AssertCls.AssertText(PageObjectModal.WISE_HomePage_Page.WISE_SearchPDPLink, 1, 2, 5, 5);\r\n //driver.close();\r\n //driver.switchTo().window(window1);\r\n driver.switchTo().window(window1).close();\r\n driver.switchTo().window(window2);\r\n //driver.close();\r\n\t\t\r\n\t\t\t\t\r\n\t}", "public void switchToParentWindow() throws InterruptedException {\n\t\tSet<String>windowid=driver.getWindowHandles();\n\t\tIterator<String>itr=windowid.iterator();\n\t\tString mainwindow=itr.next();\n\t\tString childwindow=itr.next();\n\t\tdriver.close();\n\t\tdriver.switchTo().window(mainwindow);\n\t\tdriver.switchTo().defaultContent();\n\t\tThread.sleep(5000);\n\t\t\n\t}", "public static void switchToChildWindow() {\n\t\tString mainWindow = driver.getWindowHandle();\n\t\tSet<String> windows = driver.getWindowHandles();\n\t\tfor (String window : windows) {\n\t\t\tif (!window.equals(mainWindow)) {\n\t\t\t\tdriver.switchTo().window(window);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void switchWindow(String windowName, WebDriver driver)\n\t{\n\t\tdriver.switchTo().window(windowName);\n\t}", "public void switchToAnotherWindowHandle(String winHandleBefore) {\n\t\t\r\n\t\t\r\n\t\tfor (String winHandle : driver.getWindowHandles()) {\r\n\t\t\tif (!winHandle.equals(winHandleBefore))\r\n\t\t\t\tdriver.switchTo().window(winHandle);\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// driver.manage().window().maximize();\r\n\t}", "@Override\n\tpublic void afterSwitchToWindow(String arg0, WebDriver arg1) {\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Driver/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"http://toolsqa.com/automation-practice-switch-windows/\");\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\".//*[@id='button1']\")).click();\r\n\t\tdriver.findElement(By.xpath(\".//*[@id='content']/p[3]/button\")).click();\r\n\t\tdriver.findElement(By.xpath(\".//*[@id='content']/p[4]/button\")).click();\r\n\t\t\r\n\t\tSet<String> winids =driver.getWindowHandles();\r\n\t\tIterator<String> itr = winids.iterator();\r\n\t\t\r\n\t\tString mainwindow= itr.next();\r\n\t\tString childwindow = itr.next();\r\n\t\t\r\n\t\tSystem.out.println(\"title main window\" + driver.getTitle());\r\n\t\t\r\n\t\tdriver.switchTo().window(childwindow);\r\n\t\t\r\n\t\tSystem.out.println(\"title main window1\" + driver.getTitle());\r\n\t\t\r\n\t\tchildwindow = itr.next();\r\n\t\tdriver.switchTo().window(childwindow);\r\n\t\t\r\n\t\tSystem.out.println(\"title main window2\" + driver.getTitle());\r\n\t\t\r\n\r\n\t}", "public static void windowspwcw() {\n\t\tString windowHandle = driver.getWindowHandle();\n\t\tSystem.out.println(\"parent window is: \"+windowHandle);\n\t\tSet<String> windowHandles = driver.getWindowHandles();\n\t\tSystem.out.println(\"child window is \"+windowHandles);\n\t\tfor(String eachWindowId:windowHandles)\n\t\t{\n\t\t\tif(!windowHandle.equals(eachWindowId))\n\t\t\t{\n\t\t\t\tdriver.switchTo().window(eachWindowId);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "private void openClientManagementWindow() {\r\n\t\tnew JFrameClient();\r\n\t}", "public void switchLastWindow() {\n\n Set<String> allwindow = driver.getWindowHandles();\n\n for (String next : allwindow) {\n driver.switchTo().window(next);\n\n }\n }", "@And(\"^I pass control to another window$\")\n\tpublic void switchControl(){\n\t\tString result = selenium.switchControl();\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "public void selectWindow(int index) {\n\t\tList<String> listOfWindows = new ArrayList<>(SharedSD.getDriver().getWindowHandles());\n\t\tSharedSD.getDriver().switchTo().window(listOfWindows.get(index));\n\t}", "public void afterSwitchToWindow(String windowName, WebDriver driver) {\n\t\t\r\n\t}", "public void newWindow() {\n\t\tJMenuTest frame1 = new JMenuTest();\n\t\tframe1.setBounds(100, 100, 400, 400);\n\t\tframe1.setVisible(true);\n\t}", "public static void switchToWindow(WebDriver driver, String window) {\r\n\r\n\t\tdriver.switchTo().window(window);\r\n\t}", "public String moveToNewWindow(String object, String data) throws InterruptedException {\n\t\tlogger.debug(\"move to new window....\");\n\t\ttry {\n\t\t\tString mainwindow = \"\";\n\t\t\tString newwindow = \"\";\n\t\t\tSet<String> windowids = driver.getWindowHandles();\n\t\t\tIterator<String> ite = windowids.iterator();\n\t\t\tmainwindow = ite.next();\n\t\t\tnewwindow = ite.next();\n\t\t\tdriver.switchTo().window(newwindow);\n\n\t\t} catch (Exception e) {\n\n\t\t\treturn Constants.KEYWORD_FAIL + e.getLocalizedMessage();\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}", "public void handleWindow() throws InterruptedException {\n\t\tSet<String> windHandles = GlobalVars.Web_Driver.getWindowHandles();\n\t\tSystem.out.println(\"Total window handles are:--\" + windHandles);\n\t\tparentwindow = windHandles.iterator().next();\n\t\tSystem.out.println(\"Parent window handles is:-\" + parentwindow);\n\n\t\tList<String> list = new ArrayList<String>(windHandles);\n\t\twaitForElement(3);\n\t\tGlobalVars.Web_Driver.switchTo().window((list.get(list.size() - 1)));\n\t\tSystem.out.println(\"current window title is:-\" + GlobalVars.Web_Driver.getTitle());\n\t\treturn;\n\t}", "public void beforeSwitchToWindow(String windowName, WebDriver driver) {\n\t\t\r\n\t}", "public void switchToTheCurrentWindow(WebDriver driver) {\n\n\t\tfor (String winHandle : driver.getWindowHandles()) {\n\t\t\tdriver.switchTo().window(winHandle);\n\t\t\tlogger.info(\"Switched to child widnow\");\n\t\t}\n\t}", "public static void switchtoWindows() throws CheetahException {\n\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\", \"Attempting to Switch to Window\", Constants.LOG_INFO);\n\t\ttry {\n\t\t\tThread.sleep(3000);\n\t\t\tString winHandleBefore = CheetahEngine.getDriverInstance().getWindowHandle();\n\t\t\tCheetahEngine.cheetahForm.setParentHandle(winHandleBefore);\n\t\t\tCheetahEngine.handleStack.push(winHandleBefore);\n\t\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\", \"Parent Window Handle: \" + winHandleBefore,\n\t\t\t\t\tConstants.LOG_INFO);\n\t\t\tSet<String> handles = CheetahEngine.getDriverInstance().getWindowHandles();\n\t\t\tfor (String handle : handles) {\n\t\t\t\tif (!handle.equalsIgnoreCase(winHandleBefore) && !checkHandleInStack(handle)) {\n\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\",\n\t\t\t\t\t\t\t\"Switching to Child Windows Handle: \" + handle, Constants.LOG_INFO);\n\t\t\t\t\tCheetahEngine.getDriverInstance().switchTo().window(handle);\n\t\t\t\t\tString winHandleChild = handle;\n\t\t\t\t\tCheetahEngine.cheetahForm.setChildHandle(winHandleChild);\n\t\t\t\t}\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tthrow new CheetahException(e);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "@Override\n\tpublic void beforeSwitchToWindow(String arg0, WebDriver arg1) {\n\n\t}", "public void selectRootWindow() {\n\t\tList<String> listOfWindows = new ArrayList<>(SharedSD.getDriver().getWindowHandles());\n\t\tSharedSD.getDriver().switchTo().window(listOfWindows.get(0));\n\t}", "private void switchToFrame() {\n\t\tdriver.switchTo().frame(\"mainpanel\");\n\t}", "public static void switchToWindowHandle1(WebDriver driver, String wndHandle) {\n\t\tdriver.switchTo().window(wndHandle);\n\t}", "public void switchToMainWindowHandleAndCloseCurrentOne(String winHandleBefore) {\n\t\tdriver.close();\r\n\t\t// Switch back to original browser (first window)\r\n\t\tdriver.switchTo().window(winHandleBefore);\r\n\r\n\t}", "public void switchToChildWindow(String parent) {\r\n\t\t//get ra tat ca cac tab hoac cua so dang co -->ID duy nhat. Neu dung List thi no se lay ca ID trung\r\n Set<String> allWindows = driver.getWindowHandles();\r\n //for each\r\n for (String ChildWindow : allWindows) {\r\n \t//duyet qua trung\r\n if (!ChildWindow.equals(parent)) {\r\n driver.switchTo().window(ChildWindow);\r\n break;\r\n }\r\n }\r\n \r\n \r\n}", "public static void goToPlaylistChooserWindow()\n {\n PlaylistChooser playlistChooser = new PlaylistChooser();\n playlistChooser.setVisible(true);\n playlistChooser.setFatherWindow(actualWindow, false);\n }", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public static void switchToChildWindow() {\t\t\n\t\tString parent = Constants.driver.getWindowHandle();\n\t\tLOG.info(\"Parent window handle: \" +parent);\n\t\tSet <String> windows = Constants.driver.getWindowHandles();\n\t\tIterator <String> itr = windows.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tString child = itr.next();\n\t\t\tif (!child.equals(parent)) {\n\t\t\t\tLOG.info(\"Child window handle: \" +child);\n\t\t\t\tConstants.driver.switchTo().window(child);\n\t\t\t} else {\n\t\t\t\tLOG.error(\"Parent(main) and child window hanldles are same.\");\n\t\t\t}\n\t\t}\n\n\t}", "private void openManagementWindow() {\n\n\t\tWindowManager.getInstance().openManagementWindow();\n\t\t// Close the current window\n\t\tthis.close();\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\" ,\"C:\\\\Users\\\\anuanand\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"https://the-internet.herokuapp.com/\");\r\n\t\tdriver.findElement(By.linkText(\"Multiple Windows\")).click();\r\n\t\tSet<String> wh= driver.getWindowHandles();\r\n\t\tIterator<String> it= wh.iterator();\r\n\t\tString parentid= it.next();\r\n\t\tString childid= driver.getWindowHandle();\r\n\t\tdriver.switchTo().window(childid);\r\n\t\tSystem.out.print(driver.getTitle());\r\n\t\r\n\t\t\r\n\t\tdriver.findElement(By.linkText(\"Click Here\")).click();\r\n\t\tString newhandle= driver.getWindowHandle();\r\n\t\tdriver.switchTo().window(newhandle);\r\n\t\tSystem.out.print(driver.getTitle());\r\n\t\tdriver.switchTo().window(childid);\r\n\t\tSystem.out.print(driver.findElement(By.xpath(\"//h3[contains(text(),'Opening a new window')]\")).getText());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public abstract void newWindow(ReFrame newFrame);", "public void switchToWindow(String title) {\n\t\tSet<String> windowHandles = getDriver().getWindowHandles();\n\t\tfor (String str : windowHandles) {\n\t\t\tgetDriver().switchTo().window(str);\n\t\t\tSystem.out.println(\"window title: \" + getDriver().getTitle());\n\t\t\tif (getDriver().getTitle().contains(title))\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Test(priority = 4)\r\n\tpublic void PDPPage_TabsDIsplay() throws Exception\r\n\t{\r\n\t\tthis.driver=driver;\r\n Click_Action.Btn_Click(PageObjectModal.WISE_PDPPage_Page.PDP_TroubleShoot_CSS, 7, 6,\"CSS\");\r\n \r\n //Thread.sleep(1000);\r\n AssertCls.AssertText(PageObjectModal.WISE_PDPPage_Page.PDP_TroubleShootTitle_CSS, 7, 6, 7, 5,\"CSS\");\r\n\r\n Click_Action.Btn_Click(PageObjectModal.WISE_PDPPage_Page.PDP_HowTo_CSS, 8, 6,\"CSS\");\r\n \r\n Thread.sleep(1000);\r\n AssertCls.AssertText(PageObjectModal.WISE_PDPPage_Page.PDP_HowToTitle_CSS, 8, 6, 8, 5,\"CSS\");\r\nClick_Action.Btn_Click(PageObjectModal.WISE_PDPPage_Page.PDP_ProdInfo_CSS, 9, 6,\"CSS\");\r\n \r\n Thread.sleep(1000);\r\n AssertCls.AssertText(PageObjectModal.WISE_PDPPage_Page.PDP_ProdInfoTitle_CSS, 9, 6, 9, 5,\"CSS\");\r\n /*\r\n //**\r\n Set<String> AllWindowHandles = driver.getWindowHandles();\r\n String window1 = (String) AllWindowHandles.toArray()[0];\r\n System.out.print(\"window1 handle code = \"+AllWindowHandles.toArray()[0]);\r\n String window2 = (String) AllWindowHandles.toArray()[1];\r\n System.out.print(\"\\nwindow2 handle code = \"+AllWindowHandles.toArray()[1]);\r\n driver.switchTo().window(window2);\r\n \r\n //**\r\n */\r\n \r\n // driver.close();\r\n //driver.switchTo().window(window1);\r\n //driver.close();\r\n\t\t\r\n\t\t\t\t\r\n\t}", "public static void openPCCompSCRBtnPressed() {\r\n PCNMClientStart.switchPanels(new PCCompSCR());\r\n }", "@Test\n\tpublic void switchWindows() throws InterruptedException{\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"/chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.get(\"https://www.google.com/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.findElement(By.xpath(\"(//input[@class='gLFyf gsfi'])[1]\")).sendKeys(\"cricbuzz\");\n\t\tdriver.findElement(By.xpath(\"(//input[@aria-label='Google Search'])[1]\")).click();;\n\t\tThread.sleep(3000);\n\n}", "protected void switchTab(int index) {\n\t\tCapabilities.getDriver().switchTo().window(new ArrayList<String>(Capabilities.getDriver().getWindowHandles()).get(index));\n\t}", "public static void switchToChildWindow(WebDriver driver) {\r\n\r\n\t\tString mainWindow = driver.getWindowHandle();\r\n\r\n\t\tfor (String window : driver.getWindowHandles()) {\r\n\r\n\t\t\tif (!window.equalsIgnoreCase(mainWindow)) {\r\n\t\t\t\tdriver.switchTo().window(window);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdriver.switchTo().defaultContent();\r\n\t}", "public void createNewWindow(String winType) {\n if (!SwingUtilities.isEventDispatchThread()) {\n throw new RuntimeException(\"createNewWindow: called on non-event thread\");\n }\n\n final Parameters params = (Parameters)parameters.clone();\n if (!windowName.equals(\"\")) params.setWindowName(windowName);\n if (!winType.equals(\"\")) params.setWindowName(winType);\n\n manager.showDisplayUI(params);\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver.exe\");\r\n ChromeDriver driver = new ChromeDriver();\r\n driver.get(\"https://www.naukri.com/\");\r\n //get all the window id's \r\n Set<String> allwindows = driver.getWindowHandles();\r\n //copy the same collections to arraylist \r\n ArrayList<String> List = new ArrayList<String>(allwindows);\r\n \r\n String secondWindowId = List.get(2);\r\n driver.switchTo().window(secondWindowId);\r\n driver.close();\r\n\r\n\t}", "public void switchToWindow(String title) {\n\t\ttry {\r\n\t\t\tSet<String> allWindows = getter().getWindowHandles();\r\n\t\t\tfor (String eachWindow : allWindows) {\r\n\t\t\t\tgetter().switchTo().window(eachWindow);\r\n\t\t\t\tif (getter().getTitle().equals(title)) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"The Window Title: \"+title+\r\n\t\t\t\t\t\"is switched \");\r\n\t\t} catch (NoSuchWindowException e) {\r\n\t\t\tSystem.err.println(\"The Window Title: \"+title+\r\n\t\t\t\t\t\" not found\");\r\n\t\t}\r\n\t}", "private void winScreen() {\n timer.stop();\n gameModel.setState(\"Win Screen\");\n WinScreen screen = new WinScreen(width, height);\n Button replayButton = screen.getReplayButton();\n replayButton.setOnAction(e -> {\n try {\n Controller newGame = new Controller();\n newGame.start(mainWindow);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n Button exitButton = screen.getExitButton();\n exitButton.setOnAction(e -> {\n System.exit(0);\n });\n Scene scene = screen.getScene();\n mainWindow.setScene(scene);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\twin.change(\"jpanel01\");\n\t\t\t}", "public void switchToChildWindow(String parent) throws Exception {\r\n\t\t// get ra tat ca cac tab dang co\r\n\t\tSet<String> allWindows = driver.getWindowHandles();\r\n\t\tThread.sleep(3000);\r\n\t\tfor (String runWindow : allWindows) {\r\n\t\t\tif (!runWindow.equals(parent)) {\r\n\t\t\t\tdriver.switchTo().window(runWindow);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void goToEditSongWindow()\n {\n EditSongWindow editSongWindow = new EditSongWindow();\n editSongWindow.setVisible(true);\n editSongWindow.setFatherWindow(actualWindow, false);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontrolleur.executeFirstWindow();\n\t\t\t\tdispose();\n\t\t\t}", "public static void switchTo_Window_with_title(String Exp_title)\r\n\t{\n\t\tSet<String> All_Window_IDS=driver.getWindowHandles();\r\n\t\t\r\n\t\t//Applying foreach window to iterator for all windows\r\n\t\tfor (String EachWindowID : All_Window_IDS) \r\n\t\t{\r\n\t\t\tdriver.switchTo().window(EachWindowID);\r\n\t\t\t//After switch get window title\r\n\t\t\tString Runtime_Title=driver.getTitle();\r\n\t\t\tSystem.out.println(Runtime_Title);\r\n\t\t\t\r\n\t\t\tif(Runtime_Title.contains(Exp_title))\r\n\t\t\t{\r\n\t\t\t\tbreak; //At what window it break , It keep browser controls at same window\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public static void windowHandle(WebDriver driver,String eTitle)\r\n\t{\r\n\t\tSet<String>winHandle =driver.getWindowHandles();\r\n\t\tIterator <String> itr=winHandle.iterator();\r\n\t\twhile(itr.hasNext())\r\n\t\t{\r\n\t\t\tString wh=itr.next();\r\n\t\t\tdriver.switchTo().window(wh);\r\n\t\t\tif(driver.getTitle().equals(eTitle))\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private void openUserManagementWindow() {\r\n\t\tnew JFrameUser();\r\n\t}", "public static void switchWindow(WebDriver driver, String firstWindow, String secondWindow) {\n\t \n\t Set<String> windowHandles = driver.getWindowHandles();\n\t \n\t for(String windows : windowHandles) {\n\t\t \n\t\t if(!windows.equals(firstWindow) && !windows.equals(secondWindow)) {\n\t\t\t \n\t\t\t driver.switchTo().window(windows);\n\t\t }\n\t\t \n\t }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"F:\\\\Selenium\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\t\r\n\t\tdriver.get(\"http://seleniumpractise.blogspot.com/2017/07/multiple-window-examples.html\");\r\n\t\t\t\r\n\t\tWebElement r =driver.findElement(By.cssSelector(\"#post-body-6170641642826198246 > a:nth-child(2)\"));\r\n\t\t//Storing the window id in parent (note getwindow can store only one window value i.e parent class window)\r\n\t\tString parent = driver.getWindowHandle();\r\n \t\t\tSystem.out.println(parent);\r\n \t\t\t\r\n\t\t\tr.click();\r\n \t\t// storing the multiple value of window id in array name called Set with data type String.\t\r\n \t\t\tSet<String> allclass = \tdriver.getWindowHandles();\r\n \t\t\tSystem.out.println(allclass);\r\n \t\t\t\r\n \t\t// Printing the no of window id present in Set in integer form\t\r\n \t\t\tint noofelement = allclass.size();\r\n \t\t\tSystem.out.println(noofelement);\r\n \t\t\r\n \t\t//below code proof us that still a new tab is open but the control is still in parent class i.e first class\r\n \t\t\t\r\n \t\t\tSystem.out.println(driver.getCurrentUrl());\r\n \t\t//\tdriver.findElement(By.className(\"gb_d\")).click(); // error noelementfound\r\n \t\t\t\r\n \t\t\tfor (String child : allclass) {\r\n\t\t\t\t\r\n \t\t\t\tif(! child.equals(parent)){\r\n \t\t\t\t\t\r\n \t\t\t\t\tdriver.switchTo().window(child);\r\n \t\t\t\t// now control is over the child class or new tab\r\n \t\t \t\t\tSystem.out.println(driver.getCurrentUrl()); // print google website\r\n \t\t\t\t}\r\n\t\t\t}\r\n \t\t\t\r\n \t\t\t\r\n \t\t//\tdriver.switchTo().window(parent);\r\n \t\t\tSystem.out.println(driver.getCurrentUrl()); // print selenium practise website\r\n \t\t\t\r\n \t\t\t\r\n \t\t\t\r\n \t\t\t\r\n \r\n\t}", "public ICurrentPage openNewWindow(String url);", "public static void goToAboutWindow()\n {\n AboutWindow aboutWindow = new AboutWindow();\n aboutWindow.setVisible(true);\n aboutWindow.setFatherWindow(actualWindow, false);\n }", "public NewJFrame1(NewJFrame n) {\n main = n;\n initComponents();\n winOpen();\n setLocationFrame();\n this.setVisible(true);\n }", "public boolean newTabOpener() {\n\t\tString selectLinkOpeninNewTab = Keys.chord(Keys.CONTROL, \"t\");\n\t\tdriver.findElement(By.tagName(\"html\")).sendKeys(selectLinkOpeninNewTab);\n\t\treturn true;\n\t}", "public void open() {\n setWebDriver();\n }", "public static void switchToParentWindow(String s) {\n\t\tdriver.switchTo().window(s);\n\t}", "public String handleWindows(String object, String data) throws InterruptedException {\n\t\tlogger.debug(\"Handling the windows....\");\n\t\ttry {\n\t\t\tString mainwindow = \"\";\n\t\t\tString newwindow = \"\";\n\t\t\tSet<String> windowids = driver.getWindowHandles();\n\t\t\tIterator<String> ite = windowids.iterator();\n\t\t\tmainwindow = ite.next();\n\t\t\tnewwindow = ite.next();\n\t\t\tdriver.switchTo().window(newwindow);\n\t\t\t//Thread.sleep(2000);\n\t\t\tdriver.close();\n\t\t\tdriver.switchTo().window(mainwindow);\n\t\t\treturn Constants.KEYWORD_PASS;\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + e.getLocalizedMessage();\n\t\t}\n\n\t}", "public void switchToTheMultipleWindow(WebDriver driver, String title) {\n\n\t\tSet<String> windowHandles = driver.getWindowHandles();\n\t\tIterator<String> iterator = windowHandles.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString window = iterator.next();\n\t\t\tdriver.switchTo().window(window);\n\t\t\tif (driver.getTitle().equals(\"Test\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void openHistoryManagementWindow() {\r\n\t\tnew JFrameHistory(this.jFrameMainWindow.getUser());\r\n\t}", "protected void openNewTab(WebElement el) {\n\t\taguardaElemento(ExpectedConditions.visibilityOf(el));\n\t\taguardaElemento(ExpectedConditions.elementToBeClickable(el));\n\t\tActions actions = new Actions(Capabilities.getDriver()); \n\t\tactions.moveToElement(el);\n\t\tactions.keyDown(Keys.CONTROL).click(el).keyUp(Keys.CONTROL).build().perform();\n\t}", "@Override\n public void windowOpened(WindowEvent we) {\n }", "public void setupWindowButtons(){\n focusPropertyButton(btnExitProgramPlannerPlanPane);\n focusPropertyButton(btnExitProgramPlannerShoppingListPane);\n focusPropertyButton(btnExitProgramPlannerCupboardPane);\n focusPropertyButton(btnMinimiseProgramPlannerPlanPlane);\n focusPropertyButton(btnMinimiseProgramPlannerShoppingListPane);\n focusPropertyButton(btnMinimiseProgramPlannerCupboardPane);\n focusPropertyButton(btnExitProgramMealsBrowsePane);\n focusPropertyButton(btnMinimiseProgramMealsBrowsePane);\n focusPropertyButton(btnExitProgramMealsAddPane);\n focusPropertyButton(btnMinimiseProgramMealsAddPane);\n focusPropertyButton(btnExitProgramIngredBrowse);\n focusPropertyButton(btnMinimiseProgramIngredBrowse);\n focusPropertyButton(btnExitProgramIngredAdd);\n focusPropertyButton(btnMinimiseProgramIngredAdd);\n\n }", "public void verifyCourseInfoPageSuccessfullyDisplayedInNewWindow(){\n\t\tgetDriver().navigate().refresh();\n\t\tAssert.assertTrue(enrollNowButton.isDisplayed());\n\t\t\n\t}", "public void switchTo(WebDriver grimlockDriver, String tabName) {\n grimlockDriver.switchTo().window(tabName);\n }", "public static void windowsHandlingSet(WebDriver drive) {\n\t\tString thisWindow = drive.getWindowHandle();\n\t\tSet<String> AllWindow = drive.getWindowHandles();\n\t\tfor (String childWindow : AllWindow) {\n\t\t\tif (!(thisWindow.equals(childWindow))) {\n\t\t\t\tdriver.switchTo().window(childWindow);\n\t\t\t}\n\t\t}\n\n\t}", "public String moveToMainWindow(String object, String data) {\n\t\tlogger.debug(\"move To MainWindow\");\n\t\ttry {\n\n\t\t\tString mainwindow = driver.getWindowHandle();\n\t\t\tdriver.switchTo().window(mainwindow);\n\t\t\tThread.sleep(2000);\n\t\t} catch (Exception e) {\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Not able to move To MainWindow\" + e.getMessage();\n\t\t}\n\n\t\treturn Constants.KEYWORD_PASS;\n\t}", "public void launchTrainingAndCloseAsset()\n {\n \ttry {\n\t\t\tif (LaunchTrainingbtn.isDisplayed()) {\n\t\t\t\tclickOn(LaunchTrainingbtn);\n\t\t\t\twaitUntillFinishProcessSpinnerDisable();\n\t\t\t\tSet<String> windows = driver.getWindowHandles();\n\t\t\t\tIterator<String> iterator = windows.iterator();\n\t\t\t\tString parent = iterator.next();\n\t\t\t\tString child = iterator.next();\n\t\t\t\tgetDriver().switchTo().window(child);\n\t\t\t\tdriver.close();\n\t\t\t\tgetDriver().switchTo().window(parent);\n\t\t \treportInfo();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t}\n \t\n }", "public void switchToChildTab() {\n for (String child : driver.getWindowHandles()) {\n try {\n driver.switchTo().window(child);\n } catch (NoSuchWindowException e) {\n log.error(\"Window is not found\");\n log.error(e.toString());\n }\n }\n }", "public void launchExplorer() {\n SimulatedEnvironment env = new SimulatedEnvironment(this.domain, this.initialState);\n VisualExplorer exp = new VisualExplorer(this.domain, env, this.v, 800, 800);\n exp.addKeyAction(\"w\", GridWorldDomain.ACTION_NORTH, \"\");\n exp.addKeyAction(\"s\", GridWorldDomain.ACTION_SOUTH, \"\");\n exp.addKeyAction(\"d\", GridWorldDomain.ACTION_EAST, \"\");\n exp.addKeyAction(\"a\", GridWorldDomain.ACTION_WEST, \"\");\n\n //exp.enableEpisodeRecording(\"r\", \"f\", \"irlDemo\");\n\n exp.initGUI();\n }", "public void launchNewSession(){\r\n framework.launchNewMAV(getArrayMappedToData(), this.experiment, \"Multiple Experiment Viewer - Cluster Viewer\", Cluster.GENE_CLUSTER);\r\n }", "public static void main(String[] args) throws Exception{\n\n WebDriverManager.chromedriver().setup();\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"http://practice.cybertekschool.com/open_new_tab\");\n\n Thread.sleep(4000);\n\n //driver.close(); //expected to close the original one\n driver.quit(); //all window will be closed\n\n\n\n\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t public void run() {\r\n\t\t\t try {\r\n\t\t\t NewLogin window = new NewLogin();\r\n\t\t\t window.setVisible(true);\r\n\t\t\t } catch (Exception e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t });\r\n\t\t\t\t\r\n \t\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void windowActivated(WindowEvent we) {\n }", "public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}", "public void otherWin\n (String name);", "private void choseNetwork(java.awt.event.MouseEvent evt) { \n\t\t//new NetworkGameBrowser().setVisible(true);\n\t\t//this.setVisible(false);\n\t\t//this.dispose();\n\t}", "public void openMMUModeSelect(){\n\t\tmodeFrame = new JFrame(\"MMU Simulator\");\n\t\tmodeFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tselectModePane = new SelectModePane(this);\n\t\tselectModePane.setBackground(new Color(238,255,255));\n\t\tmodeFrame.setResizable(false);\n\t\tselectModePane.setOpaque(true); \n\t\tmodeFrame.setContentPane(selectModePane);\n\t\tImageIcon icon=new ImageIcon(\"docs/mmuIcon.jpg\");\n\t\tmodeFrame.setIconImage(icon.getImage());\n\t\tmodeFrame.pack();\n\t\tmodeFrame.setVisible(true);\n\t}", "void createWindow();", "public void refreshWindowsMenu() {\r\n Window.removeAll();\r\n for(JInternalFrame cf: circuitwindows){\r\n final JInternalFrame cf2 = cf;\r\n javax.swing.JMenuItem windowItem = new javax.swing.JMenuItem();\r\n windowItem.setText(cf.getTitle()); \r\n windowItem.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n try { cf2.setSelected(true);\r\n } catch (PropertyVetoException ex) {\r\n ErrorHandler.newError(\"Editor Error\",\"Cannot select circuit \" + cf2.getTitle() + \".\", ex);\r\n }\r\n }\r\n });\r\n Window.add(windowItem); \r\n }\r\n if(circuitwindows.size()==0){\r\n Window.setEnabled(false);\r\n } else {\r\n Window.setEnabled(true);\r\n }\r\n }", "public synchronized void goToWindow(String key)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tThread.sleep(1000);\r\n\t\t\taniWin.goToWindow(key);\r\n\t\t}\r\n\t\tcatch (InterruptedException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void start() {\r\n\t\tif (FormsContext.isFormsServicesApp()) {\r\n\t\t\tinitialOpenLWWindows = new LWWindowOperator().getWindowTitles();\r\n\t\t} else {\r\n\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Selenium\\\\drivers\\\\chromedriver.exe\");\r\n\t\tChromeDriver driver =new ChromeDriver();\r\n\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.get(\"https://www.irctc.co.in/eticketing/loginHome.jsf\");\r\n\t\t\r\n\t\t\r\n\t\tdriver.findElementByLinkText(\"Contact Us\").click();\r\n\t\t\r\n\t\tSet<String>allwindows= driver.getWindowHandles();\r\n\t\tSystem.out.println(allwindows.size());\r\n\t\t\r\n\t\tSystem.out.println(driver.getTitle());\r\n\t\t\r\n\t\tList<String> everywindow = new ArrayList<String>();\r\n\t\teverywindow.addAll(allwindows);\r\n\t\t\r\n\t\t\r\n\t\tString nextwindow =everywindow.get(1);\r\n\t\tdriver.switchTo().window(nextwindow);\r\n\t\tSystem.out.println(driver.getTitle());\r\n\t\tdriver.quit();\r\n\t}", "public void switchTotab(String showName) {\n\t\tArrayList<String> tabs = new ArrayList<String>(_eventFiringDriver.getWindowHandles());\n\t\tfor (String tab : tabs) {\n\t\t\t_eventFiringDriver.switchTo().window(tab);\n\t\t\tif (_eventFiringDriver.getTitle().contains(showName))\n\t\t\t\tbreak;\n\t\t}\n\t\tsleep(5);\n\t}", "public void windowActivated(WindowEvent e) {\n adaptee.this_windowActivated();\n }", "public void closeWindow() {\n\t\tdriver.close();\n\t\tdriver.switchTo().window(winHandleBefore);\n\t}", "public static void switchToWindowHandle(WebDriver driver, String wndHandle) {\n\n\t\tlogger.info(\"inside switchtowindowhandle Method\");\n\t\tSet<String> handler = driver.getWindowHandles();\n\t\tfor (String handlesname : handler) {\n\t\t\tdriver.switchTo().window(handlesname);\n\t\t\tString var = driver.getTitle();\n\t\t\tlogger.info(\"window Handle --> \" + var);\n\t\t\tif (var.equalsIgnoreCase(wndHandle)) {\n\t\t\t\tlogger.info(\"Title matched hence switching to handle \"\n\t\t\t\t\t\t+ wndHandle);\n\t\t\t\tdriver.switchTo().window(handlesname);\n\t\t\t} else {\n\t\t\t\tdriver.switchTo().defaultContent();\n\t\t\t}\n\t\t}\n\n\t}", "public WebWindow createNewWindow(String URL) {\n\t\tString prev = driver.getWindowHandle();\n\t\tSet<String> oldSet = driver.getWindowHandles();\n\t\tdriver.switchTo().window(newPageHandle);\n\t\tnewPage.click();\n\t\t\n\t\tSet<String> newSet = driver.getWindowHandles();\n\t\tnewSet.removeAll(oldSet);\n\t\tString handle = newSet.iterator().next();\n\t\tdriver.switchTo().window(handle);\n\t\tdriver.get(URL);\n\t\tWebWindow w = new WebWindow(driver, handle);\n\t\t\n\t\tif(domainName != null && !domainName.equals(w.getDomainName())) {\n\t\t\tdriver.close();\n\t\t\tdriver.switchTo().window(prev);\n\t\t\treturn null;\n\t\t}\n\n\t\tallWindows.add(w);\n\t\tnewWindows.add(w);\n\t\tdriver.switchTo().window(prev);\n\t\treturn w;\n\t}", "private void control()\r\n\t\t{\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\t}", "private void control()\r\n\t\t{\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\t}", "@Override public void windowOpened(WindowEvent evt) { }", "@Override public void windowOpened(WindowEvent evt) { }" ]
[ "0.78532225", "0.7248622", "0.7124546", "0.69914496", "0.68951756", "0.6888953", "0.68020666", "0.6722485", "0.67199165", "0.67155737", "0.6694742", "0.66619563", "0.66506094", "0.6631207", "0.65884066", "0.65872675", "0.6547319", "0.6536381", "0.6530998", "0.65294707", "0.6527013", "0.6423389", "0.6408538", "0.63738734", "0.63439447", "0.6323523", "0.63221943", "0.631471", "0.6285941", "0.6276081", "0.6271354", "0.62700164", "0.6262199", "0.6258162", "0.62355334", "0.6232366", "0.623135", "0.61824787", "0.61821324", "0.61575025", "0.61545974", "0.6139959", "0.61348474", "0.61278206", "0.6127136", "0.612047", "0.6116235", "0.6111412", "0.60979927", "0.6061573", "0.6046817", "0.60426396", "0.60360277", "0.6015257", "0.60077006", "0.60063714", "0.60001534", "0.5989122", "0.5982044", "0.59812355", "0.5966071", "0.5945237", "0.5939346", "0.59334356", "0.5911605", "0.588614", "0.58645505", "0.58621186", "0.5856967", "0.5844647", "0.5833645", "0.58133805", "0.57921183", "0.57868683", "0.5782142", "0.57773674", "0.5773369", "0.57715017", "0.5766987", "0.57647467", "0.5763024", "0.57578075", "0.5754961", "0.5731974", "0.5727402", "0.57216495", "0.5717263", "0.5717105", "0.57166487", "0.57082963", "0.57034695", "0.5699141", "0.56922776", "0.56796926", "0.56793785", "0.5673172", "0.56518483", "0.56518483", "0.5640631", "0.5640631" ]
0.73981065
1
Extend a partial isomorphism p between two graphs g and h
static boolean extend(LinkedList<Integer> p, boolean [ ][ ]g, boolean [ ][ ]h ) { if(p.size() == g.length){ return true; } for(int i = 0; i < g.length; i++){ if(compatible(p,i,g,h)){ p.add(p.size(),i); if(extend(p,g,h)){ return true; } } } p.removeLast(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DynamicInducedSubgraph(Graph g) {\n\t\tsuper();\n\t\tGraphTools.copyGraph(g, this);\n\t\tllVertices = new LinkedHashSet<AdjListVertex>(vertices);\n\t\tllEdges = new LinkedHashSet<AdjListEdge>(edges);\n\t}", "private static void handlePolymorphismAlt() {\n for(Transition t : petrinet.getTransitions()) {\n Stack<Place> inputs = new Stack<>();\n Set<Flow> inEdges = t.getPresetEdges();\n for(Flow f : inEdges) {\n for(int i = 0; i < f.getWeight(); i++) {\n inputs.push(f.getPlace());\n }\n }\n Stack<Place> trueInputs = new Stack<>();\n generatePolymophism(t, 0, inputs, trueInputs);\n }\n }", "public Population(Graph graph)\r\n/* 13: */ {\r\n/* 14:36 */ g = graph.cloneGraph();\r\n/* 15: */ }", "public PlainGraph mergeGraphs(PlainGraph g1, PlainGraph g2){\n // check if g1 subset g2 or g2 subset g1\n // only in the first case g1 should be replaced with g2\n // else glue the two graphs together\n if (subsetGraphs(g1, g2)) {\n // make sure that the name does not change, in the root case of the tree the g1 contains the name of the invariant\n g2.setName(g1.getName());\n return g2;\n } else if (!subsetGraphs(g2, g1)) {\n return mergeGraphsInternal(g1, g2);\n }\n return g1;\n }", "private void transPose(graph g) {\n\t\tIterator it = g.getV().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tnode_data temp = (node_data) it.next();\n\t\t\tif(g.getE(temp.getKey())!=null) {\n\t\t\t\tIterator it1 = g.getE(temp.getKey()).iterator();\n\t\t\t\twhile (it1.hasNext()) {\n\t\t\t\t\tedge_data temp1 = (edge_data) it1.next();\n\t\t\t\t\tif (temp1 != null && temp1.getTag() == 0) {\n\t\t\t\t\t\tif (g.getEdge(temp1.getDest(), temp1.getSrc()) != null) {\n\t\t\t\t\t\t\tEdge temps = new Edge((Edge)g.getEdge(temp1.getSrc(),temp1.getDest()));\n\t\t\t\t\t\t\tdouble weight1 = g.getEdge(temp1.getSrc(),temp1.getDest()).getWeight();\n\t\t\t\t\t\t\tdouble weight2 = g.getEdge(temp1.getDest(),temp1.getSrc()).getWeight();\n\t\t\t\t\t\t\tg.connect(temp1.getSrc(),temp1.getDest(),weight2);\n\t\t\t\t\t\t\tg.connect(temps.getDest(),temps.getSrc(),weight1);\n\t\t\t\t\t\t\tg.getEdge(temps.getDest(), temps.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.getEdge(temps.getSrc(),temps.getDest()).setTag(1);\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tg.connect(temp1.getDest(), temp1.getSrc(), temp1.getWeight());\n\t\t\t\t\t\t\tg.getEdge(temp1.getDest(), temp1.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.removeEdge(temp1.getSrc(), temp1.getDest());\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void reduce(PDG graph);", "private PlainGraph mergeGraphsInternal(PlainGraph g1, PlainGraph g2) {\n // Create all nodes of g2 in g1\n // AddNode does check if the node does exist already, if so it doesn't create a new one\n for (Map.Entry<String, PlainNode> entry: graphNodeMap.get(g2).entrySet()){\n addNode(g1, entry.getKey(), null);\n }\n\n // create all edges of g2 in g1\n for (PlainEdge edge: g2.edgeSet()) {\n // check if the edge exists in g1, if so check if the variable names of the source and the target are also the same and not just the node names\n // Since the node names are numbered in each graph starting with 0, collisions could exists without the 2nd and 3rd check\n // Inverse the whole such that if this edge doesn't exist create it in g1\n if (! (g1.containsEdge(edge) && getVarName(g2, edge.source()).equals(getVarName(g1, edge.source())) && getVarName(g2, edge.target()).equals(getVarName(g1, edge.target())))) {\n addEdge(g1, getVarName(g2, edge.source()), edge.label().text(), getVarName(g2, edge.target()));\n }\n }\n return g1;\n }", "@Override\n protected DataSet<GraphHead> computeNewGraphHeads() {\n return firstCollection.getGraphHeads()\n .union(secondCollection.getGraphHeads())\n .groupBy(new Id<GraphHead>())\n .reduceGroup(new GroupCountEquals<GraphHead>(2));\n }", "private void attachAndEval(Node c, Node p) {\n\t\tc.parent = p;\n\t\tc.g = p.g + arcCost(p,c);\n\t\tcalculateH(c);\n\t\tc.f = c.g + c.h;\n\t}", "public interface IGraphElement extends IDotElement {\r\n}", "public void updatePolgyon(Polygon p) {\n List<Edge> curr = getEfficientEdges(p.getVertices());\n p.setInternalEdges(curr);\n p.setInternalEdgeSum(edgeSum(curr));\n }", "public ApproximationOne(Graph g)\n\t{\n\t\tsets = new DisjointSets(g.getNumNodes());\n\t\tneighborhoodArray = new int[getSetsArray().length];\n\t}", "public void joinGraph(IGraph graph);", "public interface Pie {\n Pie accept(PieVisitor visitor);\n\n public static void main(String[] args) {\n Pie p = new Top(new Integer(3), new Top(new Integer(2), new Top(new Integer(3), new Bot())));\n System.out.println(p);//Top{t=3, p=Top{t=2, p=Top{t=3, p=Bot{}}}}\n System.out.println(p.accept(new Rem(new Integer(2))));//Top{t=3, p=Top{t=3, p=Bot{}}}\n System.out.println(p.accept(new Subst(new Integer(5), new Integer(3))));//Top{t=5, p=Top{t=2, p=Top{t=5, p=Bot{}}}}\n System.out.println(\"--------------\");\n p = new Top(new Anchovy(), new Top(new Integer(3), new Top(new Zero(), new Bot())));\n System.out.println(p);//Top{t=Anchovy{}, p=Top{t=3, p=Top{t=Zero{}, p=Bot{}}}}\n System.out.println(p.accept(new Rem(new Zero())));//Top{t=Anchovy{}, p=Top{t=3, p=Bot{}}}\n System.out.println(\"--------------\");\n p = new Top(new Anchovy(), new Top(new Tuna(), new Top(new Anchovy(), new Top(new Tuna(), new Top(new Anchovy(), new Bot())))));\n System.out.println(p);//Top{t=Anchovy{}, p=Top{t=Tuna{}, p=Top{t=Anchovy{}, p=Top{t=Tuna{}, p=Top{t=Anchovy{}, p=Bot{}}}}}}\n System.out.println(p.accept(new LtdSubst(new Integer(2), new Salmon(), new Anchovy())));//Top{t=Salmon{}, p=Top{t=Tuna{}, p=Top{t=Salmon{}, p=Top{t=Tuna{}, p=Top{t=Anchovy{}, p=Bot{}}}}}}\n System.out.println(\"--------------\");\n }\n}", "static void injectIdentityMap( AbstractGraph graph )\n {\n Object specifics = Util.returnInstanceFieldIfExistsSafe( graph, \"specifics\" );\n\n if( specifics == null )\n {\n LOG.warn( \"unable to get jgrapht Specifics for identity map injection, may be using an incompatible jgrapht version\" );\n return;\n }\n\n boolean success = Util.setInstanceFieldIfExistsSafe( specifics, \"vertexMapDirected\", new IdentityHashMap<>() );\n\n if( !success )\n LOG.warn( \"unable to set IdentityHashMap on jgrapht Specifics, may be using an incompatible jgrapht version\" );\n }", "interface HiPlus extends Hi {\n void Wow(String m);\n}", "public abstract Multigraph buildMatchedGraph();", "public interface IHyperEdge<V extends IVertex> extends IGObject {\n /**\n * Add vertex to the edge\n *\n * @param v Vertex to add\n * @return Vertex added to the edge, <code>null</code> upon failure\n */\n public V addVertex(V v);\n\n /**\n * Add collection of vertices to the edge\n *\n * @param vs Collection of vertices to add\n * @return Collection of vertices added to the edge, <code>null</code> if no vertex was added\n */\n public Collection<V> addVertices(Collection<V> vs);\n\n /**\n * Remove vertex from the edge\n *\n * @param v Vertex to remove\n * @return Vertex that was removed, <code>null</code> upon failure\n */\n public V removeVertex(V v);\n\n /**\n * Remove collection of vertices from the edge\n *\n * @param vs Collection of vertices to remove\n * @return Collection of vertices removed from the edge, <code>null</code> if no vertex was removed\n */\n public Collection<V> removeVertices(Collection<V> vs);\n\n /**\n * Check if the edge connects vertex\n *\n * @param v Vertex to check\n * @return <code>true</code> if the edge connects vertex, <code>false<code> otherwise\n */\n public boolean connectsVertex(V v);\n\n /**\n * Check if the edge connects vertices\n *\n * @param v Collection of vertices to check\n * @return <code>true</code> if the edge connects all the vertices, <code>false<code> otherwise\n */\n public boolean connectsVertices(Collection<V> vs);\n\n /**\n * Get other vertices than the one proposed\n *\n * @param v Vertex proposed\n * @return Collection of other vertices of the edge\n */\n public Collection<V> getOtherVertices(V v);\n\n /**\n * Get other vertices than the ones in the collection proposed\n *\n * @param vs Collection of vertices proposed\n * @return Collection of other vertices of the edge\n */\n public Collection<V> getOtherVertices(Collection<V> vs);\n\n\n /**\n * Get vertices of the edge\n *\n * @return Collection of the edge vertices\n */\n public Collection<V> getVertices();\n\n /**\n * Destroy the edge, unlink from the graph\n */\n public void destroy();\n}", "public abstract Graphomat getGraphomat(Fraction f);", "public interface Star extends Element {\n\n /**\n * The arity of this span, i.e. the number of components.\n */\n int size();\n\n /**\n * The apex of the span, which contains relation witnesses.\n */\n Sketch apex();\n\n /**\n * Returns the i'th component of this relation.\n */\n Optional<Sketch> component(int i);\n\n /**\n * Returns the i'th projection in this span.\n */\n Optional<GraphMorphism> projection(int i);\n\n\n /**\n * Returns all components of this relation in form of a stream.\n */\n default Stream<Sketch> components() {\n return StreamExt.iterate(1, size(), 1).mapToObj(this::component).map(Optional::get);\n }\n\n /**\n * Returns all projections in this span in form of a stream.\n */\n default Stream<GraphMorphism> projections() {\n return StreamExt.iterate(1, size(), 1).mapToObj(this::projection).map(Optional::get);\n }\n\n /**\n * Given a tuple of elements from different graphs, this method\n * returns all elements in the apex graph that witness a relation between\n * the elements in the given tuple.\n */\n 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 }\n\n default Stream<Triple> imagesIn(int component, Triple of) {\n OptionalInt source = StreamExt.iterate(1, size(), 1)\n .filter(i -> component(i).map(sketch -> sketch.carrier().contains(of)).orElse(false))\n .findFirst();\n if (source.isPresent()) {\n GraphMorphism m = projection(source.getAsInt()).get();\n return m.allInstances(of).flatMap(edge -> {\n if (projection(component).map(m2 -> m2.definedAt(edge)).orElse(false)) {\n return Stream.of(projection(component).get().apply(edge).get());\n } else {\n return Stream.empty();\n }\n });\n }\n return Stream.empty();\n }\n\n\n @Override\n default boolean verify() {\n return projections().allMatch(GraphMorphism::verify);\n }\n\n /**\n * Returns true if the elements in the given tuple are related somehow.\n */\n default boolean areRelated(Triple... elements) {\n return witnesses(elements).anyMatch(x -> true);\n }\n\n @Override\n default void accept(Visitor visitor) {\n visitor.beginSpan();\n visitor.handleElementName(getName());\n this.apex().accept(visitor);\n this.projections().forEach(m -> m.accept(visitor));\n visitor.endSpan();\n }\n}", "protected abstract HingeJoint newHingeJointImpl( Body body1, Body body2 );", "public void setGraph(Graph<V,E> graph);", "public static void main(String[] args) {\n\t\tString[][] graph = new String[][] { { \"a\", \"b\", \"1\" }, { \"a\", \"c\", \"6\" }, { \"b\", \"c\", \"2\" }, { \"b\", \"d\", \"5\" },\r\n\t\t\t\t{ \"b\", \"e\", \"4\" }, { \"c\", \"d\", \"2\" }, { \"c\", \"e\", \"3\" }, { \"d\", \"e\", \"1\" }, { \"d\", \"f\", \"4\" },\r\n\t\t\t\t{ \"e\", \"f\", \"7\" } };\r\n\t\tPrimAlgorithm pa = new PrimAlgorithm();\r\n\t\tpa.prim(graph, \"a\");\r\n\t\tSystem.out.println();\r\n\t\tString[][]\tgraph2 = new String[][] { { \"a\", \"b\", \"8\" }, { \"a\", \"c\", \"1\" }, { \"a\", \"d\", \"7\" }, { \"b\", \"c\", \"5\" },\r\n\t\t\t{ \"b\", \"e\", \"3\" }, { \"c\", \"d\", \"6\" }, { \"c\", \"e\", \"4\" }, { \"c\", \"f\", \"3\" }, { \"d\", \"f\", \"2\" },\r\n\t\t\t{ \"e\", \"f\", \"5\" } };\r\n\t\t\tpa.prim(graph2, \"a\");\r\n\t\t\tSystem.out.println();\r\n\t\tString[][]\tgraph3 = new String[][] { { \"a\", \"b\", \"5\" }, { \"a\", \"c\", \"3\" }, { \"a\", \"d\", \"7\" }, \r\n\t\t\t{ \"b\", \"e\", \"2\" }, { \"c\", \"e\", \"1\" }, { \"d\", \"f\", \"4\" },\r\n\t\t\t{ \"e\", \"f\", \"6\" } };\r\n\t\t\tpa.prim(graph3, \"a\");\r\n\t\t\tSystem.out.println();\r\n\r\n\t}", "public ImagePlus morph(ImagePlus imp_old,int proc, int rad){\nImageProcessor img = imp_old.getProcessor();\nImagePlus morphImg;\nif (proc==0){\nImageProcessor dil = Morphology.dilation(img,Strel.Shape.OCTAGON.fromDiameter(rad));\nmorphImg = new ImagePlus(\"dilation\",dil);\nmorphImg.updateAndDraw();\nreturn morphImg;\n} else if (proc==1){\nImageProcessor dil = Morphology.erosion(img,Strel.Shape.OCTAGON.fromDiameter(rad));\nmorphImg = new ImagePlus(\"erosion\",dil);\nmorphImg.updateAndDraw();\nreturn morphImg;\n} else{\nImageProcessor dil = Morphology.closing(img,Strel.Shape.OCTAGON.fromDiameter(rad));\nmorphImg = new ImagePlus(\"closing\",dil);\nmorphImg.updateAndDraw();\nreturn morphImg;\n}\n}", "public void extend(){\n\t\tsolenoid1.set(true);\n\t\tsolenoid2.set(true);\n\t}", "public interface ProgramDependenceGraph extends MutableEdgeLabelledDirectedGraph {\n\n\t/**\n\t * @return A List of weak regions, generated by RegionAnalysis for the corresponding\n\t * control flow graph (These are Regions and not PDGRegions.)\n\t */\n\tpublic List<Region> getWeakRegions();\n\t/**\n\t * @return A List of strong regions, generated when constructing the program dependence graph\n\t * (These are Regions and not PDGRegions.)\n\t */\n\tpublic List<Region> getStrongRegions();\n\t/**\n\t * This method returns the list of PDGRegions computed by the construction method.\n\t * @return The list of PDGRegions\n\t */\n\tpublic List<PDGRegion> getPDGRegions();\n\t/**\n\t * @return The root region of the PDG.\n\t */\n\tpublic IRegion GetStartRegion();\n\n\t/**\n\t * @return The root node of the PDG, which is essentially the same as the start region\n\t * but packaged in its PDGNode, which can be used to traverse the graph, etc.\n\t */\n\tpublic PDGNode GetStartNode();\n\n\t/**\n\t * This method determines if node1 is control-dependent on node2 in this PDG.\n\t * @param node1\n\t * @param node2\n\t * @return returns true if node1 is dependent on node2\n\t */\n\tpublic boolean dependentOn(PDGNode node1, PDGNode node2);\n\t/**\n\t * This method returns the list of all dependents of a node in the PDG.\n\t * @param node is the PDG node whose dependents are desired.\n\t * @return a list of dependent nodes\n\t */\n\t@SuppressWarnings(\"unchecked\")\n\tpublic List getDependents(PDGNode node);\n\n\n\t/**\n\t * This method returns the PDGNode in the PDG corresponding to the given\n\t * CFG node. Note that currently the CFG node has to be a Block.\n\t * @param cfgNode is expected to be a node in CFG (currently only Block).\n\t * @return The node in PDG corresponding to cfgNode.\n\t */\n\n\tpublic PDGNode getPDGNode(Object cfgNode);\n\n\t/**\n\t *\n\t * @return A human readable description of the PDG.\n\t */\n\tpublic String toString();\n\n}", "public void mergeDisjoint(UFPartition<T> p2){\r\n\t\tp2 = p2.clone();\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tassert !nodes.containsKey(n.getE());\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tNode<T> newNode = getNode(n.getE());\r\n\t\t\tNode<T> newNodeRoot = getNode(n.getRoot().getE());\r\n\t\t\tnewNode.setParent(newNodeRoot);\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\t\r\n\t}", "public interface InterfaceReplacement {\n\n /** The ever present clone method\n */\n public Object clone(); \n\n /** This method will insert the given individual into the population\n * by replacing a individual either from the population or the given\n * subset\n * @param indy The individual to insert\n * @param pop The population\n * @param sub The subset\n */\n public void insertIndividual(AbstractEAIndividual indy, Population pop, Population sub);\n}", "public TheoremCongruenceClosureImpl(TypeGraph g, PExp p) {\n m_typeGraph = g;\n m_theorem = p;\n m_theoremString = p.toString();\n isEquality = p.getTopLevelOperation().equals(\"=\");\n m_theoremRegistry = new Registry(g);\n m_matchConj =\n new ConjunctionOfNormalizedAtomicExpressions(m_theoremRegistry);\n\n if (isEquality) {\n m_matchConj.addFormula(p.getSubExpressions().get(0));\n m_insertExpr = p;\n }\n else if (p.getTopLevelOperation().equals(\"implies\")) {\n m_matchConj.addExpression(p.getSubExpressions().get(0));\n m_insertExpr = p.getSubExpressions().get(1);\n }\n else {\n /* experimental\n \n Is_Permutation((S o T), (T o S)) for example,\n should go into matchConj as itself, but equal to a boolean variable.\n .\n */\n m_matchConj.addFormula(p);\n m_insertExpr = p; // this will add \"= true\"\n }\n\n }", "protected abstract void narisi(Graphics2D g, double wPlatno, double hPlatno);", "public static Graph<Integer,String> InducedSubgraph(Graph<Integer,String> g, int[] v){\r\n\t\t// takes a graph g and an array of integers for vertices\r\n\t\t// and returns a graph h which is the induced subgraph of g on the given vertices\r\n\t\t\r\n\t\t// Note: runtime on order of the size of the induced subgraph\r\n\t\t// IF induced subgraphs of g are obtained from removing 1 or 2 vertices\r\n\t\t// could be better to copy g to h and delete the unwanted vertices\r\n\t\t\r\n\t\tGraph<Integer,String> h = new SparseGraph<Integer,String>();\r\n\t\t\r\n\t\t// add the vertex set to h\r\n\r\n\t\tfor (int i=0; i<v.length; i++) {\r\n\t\t\th.addVertex(v[i]);\r\n\t\t\tSystem.out.print(\"added vertex \"+ v[i]+\"\\n\");\r\n\t\t}\r\n\r\n\t\t// test the edges in g amongst the given vertices, add to h when necessary\r\n\t\tfor (int i=0; i<v.length; i++){\r\n\t\t\tfor (int j=i+1; j<v.length; j++) {\r\n\t\t\t\t//System.out.print(\"testing edge \" + v[i] + v[j]+\"\\n\");\r\n\t\t\t\tif (g.isNeighbor(v[i],v[j]) == true) {\r\n\t\t\t\t\th.addEdge(\"edge:\" + v[i] + \"-\" + v[j], v[i],v[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn h;\r\n\t}", "public abstract void map(Edge queryEdge, Edge graphEdge);", "private boolean routine2(Graph<V, E> g)\n {\n return containsPyramid(g) || containsJewel(g) || hasConfigurationType1(g)\n || hasConfigurationType2(g) || hasConfigurationType3(g);\n }", "public IonJoeModifications(List<Graph> pags) {\n for (Graph pag : pags) {\n this.input.add(pag);\n\n }\n for (Graph pag : input) {\n for (Node node : pag.getNodes()) {\n if (!variables.contains(node.getName())) {\n this.variables.add(node.getName());\n }\n }\n for (Triple triple : getAllTriples(pag)) {\n if (pag.isDefNoncollider(triple.getX(), triple.getY(), triple.getZ())) {\n pag.addUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n }\n }\n }", "public interface ExtenderInterface {\r\n\r\n\t/**\r\n\t * Extends the diagram for new generated elements.\r\n\t */\r\n\tvoid extend();\r\n\t\r\n}", "LogicalGraph callForGraph(GraphsToGraphOperator operator, LogicalGraph... otherGraphs);", "public void polygone (Graphics g){\n\t}", "protected abstract Graph filterGraph();", "public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}", "protected abstract Hinge2Joint newHinge2JointImpl( Body body1, Body body2 );", "private Graph<Node, DefaultEdge> addNodes(Graph<Node, DefaultEdge> g) {\n List<Node> nodes = nodeRepository.findAll();\n nodes.forEach(g::addVertex);\n return g;\n }", "void addIsVertexOf(Subdomain_group newIsVertexOf);", "public weighted_graph copy();", "public interface ConflictRegionStrategy extends AlgStrategy {}", "protected void addGraph(IGraph graph) {\n\n if (graph != null) {\n\n this.ids.add(graph.getID());\n this.graphMap.put(graph.getID(), graph);\n }\n }", "void setPropertiedGraphView(final PropertiedGraphView<O> propertiedGraphView);", "public PollutedVarsPointsToAnalysis(DirectedGraph<Unit> graph) {\n super(graph);\n emptyMap = new HashMap<>();\n initialMap = new HashMap<>();\n\n }", "private GraphPath<V, E> P(\n Graph<V, E> g, GraphPath<V, E> S, GraphPath<V, E> T, V m, V b1, V b2, V b3, V s1, V s2,\n V s3)\n {\n if (s1 == b1) {\n if (b1 == m) {\n List<E> edgeList = new LinkedList<>();\n return new GraphWalk<>(g, s1, b1, edgeList, 0);\n } else\n return null;\n } else {\n if (b1 == m)\n return null;\n if (g.containsEdge(m, b2) || g.containsEdge(m, b3) || g.containsEdge(m, s2)\n || g.containsEdge(m, s3) || S == null || T == null)\n return null;\n if (S.getVertexList().stream().anyMatch(\n t -> g.containsEdge(t, b2) || g.containsEdge(t, b3) || g.containsEdge(t, s2)\n || g.containsEdge(t, s3))\n || T.getVertexList().stream().anyMatch(\n t -> t != b1 && (g.containsEdge(t, b2) || g.containsEdge(t, b3)\n || g.containsEdge(t, s2) || g.containsEdge(t, s3))))\n return null;\n List<V> intersection = intersectGraphPaths(S, T);\n if (intersection.size() != 1 || !intersection.contains(m))\n return null;\n if (S.getVertexList().stream().anyMatch(\n s -> s != m\n && T.getVertexList().stream().anyMatch(t -> t != m && g.containsEdge(s, t))))\n return null;\n List<E> edgeList = new LinkedList<>();\n edgeList.addAll(T.getEdgeList());\n edgeList.addAll(S.getEdgeList());\n double weight = edgeList.stream().mapToDouble(g::getEdgeWeight).sum();\n return new GraphWalk<>(g, b1, s1, edgeList, weight);\n\n }\n }", "public interface Particle extends VisualValue, Point\n{\n}", "public interface Graph<V> {\n /**\n * F??gt neuen Knoten zum Graph dazu.\n * @param v Knoten\n * @return true, falls Knoten noch nicht vorhanden war.\n */\n boolean addVertex(V v);\n\n /**\n * F??gt neue Kante (mit Gewicht 1) zum Graph dazu.\n * @param v Startknoten\n * @param w Zielknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist oder Knoten identisch sind.\n * @return true, falls Kante noch nicht vorhanden war.\n */\n boolean addEdge(V v, V w);\n\n /**\n * F??gt neue Kante mit Gewicht weight zum Graph dazu.\n * @param v Startknoten\n * @param w Zielknoten\n * @param weight Gewicht\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist oder Knoten identisch sind.\n * @return true, falls Kante noch nicht vorhanden war.\n */\n boolean addEdge(V v, V w, double weight);\n\n /**\n * Pr??ft ob Knoten v im Graph vorhanden ist.\n * @param v Knoten\n * @return true, falls Knoten vorhanden ist.\n */\n boolean containsVertex(V v);\n\n /**\n * Pr??ft ob Kante im Graph vorhanden ist.\n * @param v Startknoten\n * @param w Endknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist.\n * @return true, falls Kante vorhanden ist.\n */\n boolean containsEdge(V v, V w);\n \n /**\n * Liefert Gewicht der Kante zur??ck.\n * @param v Startknoten\n * @param w Endknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist.\n * @return Gewicht, falls Kante existiert, sonst 0.\n */\n double getWeight(V v, V w);\n\n /**\n * Liefert Anzahl der Knoten im Graph zur??ck.\n * @return Knotenzahl.\n */\n int getNumberOfVertexes();\n\n /**\n * Liefert Anzahl der Kanten im Graph zur??ck.\n * @return Kantenzahl.\n */\n int getNumberOfEdges();\n\n /**\n * Liefert Liste aller Knoten im Graph zur??ck.\n * @return Knotenliste\n */\n List<V> getVertexList();\n \n /**\n * Liefert Liste aller Kanten im Graph zur??ck.\n * @return Kantenliste.\n */\n List<Edge<V>> getEdgeList();\n\n /**\n * Liefert eine Liste aller adjazenter Knoten zu v.\n * Genauer: g.getAdjacentVertexList(v) liefert eine Liste aller Knoten w,\n * wobei (v, w) eine Kante des Graphen g ist.\n * @param v Knoten\n * @throws IllegalArgumentException falls Knoten v\n * nicht im Graph vorhanden ist.\n * @return Knotenliste\n */\n List<V> getAdjacentVertexList(V v);\n\n /**\n * Liefert eine Liste aller inzidenten Kanten.\n * Genauer: g.getIncidentEdgeList(v) liefert\n * eine Liste aller Kanten im Graphen g mit v als Startknoten.\n * @param v Knoten\n * @throws IllegalArgumentException falls Knoten v\n * nicht im Graph vorhanden ist.\n * @return Kantenliste\n */\n List<Edge<V>> getIncidentEdgeList(V v);\n}", "public interface One extends RelationQuantifier\n{\n}", "public interface BiGULReplace extends BiGULStatement\n{\n}", "extendedPetriNetsFactory getextendedPetriNetsFactory();", "public void draw(Graphics2D g)\r\n\t{\r\n\t\t//Draw this Pedestrian\r\n\t\tsuper.draw(g);\r\n\t}", "private TBMFocalElement extend(TBMFocalElement focalElement, TBMVarDomain domain) {\n\n TBMModel m = TBMModelFactory.createTBMModel(null);\n\n TBMFocalElement result = m.createFocalElement();\n\n result.setMass(focalElement.getMass());\n result.setDomain(domain);\n // Get from domain the variables that are not in focalElement \n try (ExtendedIterator<Resource> diff = domain.listVariables().filterDrop(r -> focalElement.getDomain().hasVariable(r))) {\n\n if (!diff.hasNext()) { //there are no differences, clone the focalElement and it's configurations\n // Clone focal element\n try (ExtendedIterator<TBMConfiguration> iterConfs = focalElement.listAllConfigurations()) {\n while (iterConfs.hasNext()) {\n //Create empty conf\n TBMConfiguration newConfig = m.createConfiguration();\n //Add variables of config\n //configuration.listAllElements().forEachRemaining(res -> newConfig.addElement(res)); \n iterConfs.next().listAllElements().forEachRemaining(elem -> newConfig.addElement(elem));\n //newConfig.addElement(iterElements.next());\n\n //Add config to result\n result.addConfiguration(newConfig);\n }\n }\n\n } else { //there are differences\n\n Set<TBMConfiguration> resultConfigurations = new HashSet<>();\n\n try (ExtendedIterator<TBMConfiguration> origConfigurations = focalElement.listAllConfigurations()) {\n while (origConfigurations.hasNext()) {\n resultConfigurations.add(origConfigurations.next());\n }\n }\n\n // For each of the different variables\n while (diff.hasNext()) {\n\n Resource var = diff.next();\n\n Set<TBMConfiguration> newConfigurations = new HashSet<>();\n\n // For each of the instances of the variable\n try (ExtendedIterator<Resource> instance = this.listSubjectsWithProperty(RDF.type, var)) {\n while (instance.hasNext()) {\n Resource newVar = instance.next();\n for (TBMConfiguration resultConfiguration : resultConfigurations) {\n //Create empty conf\n TBMConfiguration currentConfig = m.createConfiguration();\n //Add variables of current config\n resultConfiguration.listAllElements().forEachRemaining(c -> currentConfig.addElement(c));\n /*try (ExtendedIterator<Resource> res = resultConfiguration.listAllElements()) {\n while (res.hasNext()) {\n currentConfig.addElement(res.next());\n }\n }*/\n //resultConfiguration.listAllElements().forEachRemaining(res -> currentConfig.addElement(res));\n //Add new variable\n currentConfig.addElement(newVar);\n //Add result to current congig\n newConfigurations.add(currentConfig);\n }\n }\n }\n\n //replace old configs with new configs\n resultConfigurations = newConfigurations;\n }\n\n //add resulting configs to result FE\n resultConfigurations.forEach(conf -> result.addConfiguration(conf));\n\n }\n }\n return result;\n\n }", "private void modifyFringe(int v, int w) {\n\t\tgetEdge(v, w).setSelected(true);\n\t\tgetEdge(getVertex(w).getParent(), w).setSelected(false);\n\t\tdouble cost = newCost(v, w);\n\t\tGreedyVertex vertex = getVertex(w);\n\t\tvertex.setParent(v);\n\t\tvertex.setCost(cost);\n\t\tp.promote(vertex);\n\t}", "public static Graph makeMeAGraph(Set<Operation> operations, State init){\n Graph graph = new implementGraph(operations , init) ;\n return graph;\n\n\t //\t throw new NotImplementedException();\n }", "public void paint(java.awt.Graphics g) {\n super.paint(g);\n // only update the quadrants if pond has a value\n if( pond != null) {\n pond.updateQuads(canvas);\n }\n }", "public static void example3() {\n String[] vars = {\"v3\", \"v2\", \"v1\"};\n\n ModIntegerRing z2 = new ModIntegerRing(2);\n GenPolynomialRing<ModInteger> z2p = new GenPolynomialRing<ModInteger>(z2, vars.length, new TermOrder(\n TermOrder.INVLEX), vars);\n List<GenPolynomial<ModInteger>> fieldPolynomials = new ArrayList<GenPolynomial<ModInteger>>();\n\n //add v1^2 + v1, v2^2 + v2, v3^2 + v3 to fieldPolynomials\n for (int i = 0; i < vars.length; i++) {\n GenPolynomial<ModInteger> var = z2p.univariate(i);\n fieldPolynomials.add(var.multiply(var).sum(var));\n }\n\n\n List<GenPolynomial<ModInteger>> polynomials = new ArrayList<GenPolynomial<ModInteger>>();\n\n GenPolynomial<ModInteger> v1 = z2p.univariate(0);\n GenPolynomial<ModInteger> v2 = z2p.univariate(1);\n GenPolynomial<ModInteger> v3 = z2p.univariate(2);\n GenPolynomial<ModInteger> notV1 = v1.sum(z2p.ONE);\n GenPolynomial<ModInteger> notV2 = v2.sum(z2p.ONE);\n GenPolynomial<ModInteger> notV3 = v3.sum(z2p.ONE);\n\n //v1*v2\n GenPolynomial<ModInteger> p1 = v1.multiply(v2);\n\n //v1*v2 + v1 + v2 + 1\n GenPolynomial<ModInteger> p2 = notV1.multiply(notV2);\n\n //v1*v3 + v1 + v3 + 1\n GenPolynomial<ModInteger> p3 = notV1.multiply(notV3);\n\n polynomials.add(p1);\n polynomials.add(p2);\n polynomials.add(p3);\n\n polynomials.addAll(fieldPolynomials);\n\n //GroebnerBase<ModInteger> gb = new GroebnerBaseSeq<ModInteger>();\n GroebnerBase<ModInteger> gb = GBFactory.getImplementation(z2);\n\n List<GenPolynomial<ModInteger>> G = gb.GB(polynomials);\n\n System.out.println(G);\n }", "public AddPatchGraphGenerator(GraphGenerator gen) {\n super(gen, \"AddPatch\");\n this.addedElem = null;\n \n if(gen.isIntraPatchDist()) {\n throw new IllegalArgumentException(\"Intra patch distance is not supported\");\n }\n \n graph = gen.dupGraphWithout(Collections.EMPTY_LIST, Collections.EMPTY_LIST);\n }", "@Test\n public void testComplexGraph() {\n CFGCreator<Character> cfgCreator = new CFGCreator<>();\n CharGrammarParser parser = new CharGrammarParser(cfgCreator);\n SLPOp<Character> slpOp = new SLPOp();\n CFGOp<Character> cfgOp = new CFGOp<>();\n\n // L(G) = {(ab)^1 : i >= 1}\n String text =\n \"S -> bAs \\n\" +\n \"A -> iBa \\n\" +\n \"B -> aCi \\n\" +\n \"C -> sd \\n\" +\n \"D -> SSESS \\n\" +\n \"E -> zSSESSr \\n\" +\n \"E -> uu \\n\";\n\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> f = new HashMap<>();\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> g = new HashMap<>();\n\n IJezSymbol<Character> a = cfgCreator.lookupSymbol('a', true);\n IJezSymbol<Character> b = cfgCreator.lookupSymbol('b', true);\n IJezSymbol<Character> d = cfgCreator.lookupSymbol('d', true);\n IJezSymbol<Character> i = cfgCreator.lookupSymbol('i', true);\n IJezSymbol<Character> s = cfgCreator.lookupSymbol('s', true);\n IJezSymbol<Character> r = cfgCreator.lookupSymbol('r', true);\n IJezSymbol<Character> u = cfgCreator.lookupSymbol('u', true);\n IJezSymbol<Character> z = cfgCreator.lookupSymbol('z', true);\n\n IJezSymbol<Character> one = cfgCreator.lookupSymbol('1', true);\n IJezSymbol<Character> two = cfgCreator.lookupSymbol('2', true);\n IJezSymbol<Character> three = cfgCreator.lookupSymbol('3', true);\n\n f.put(a, Arrays.asList(one, two));\n f.put(b, Arrays.asList(three, two));\n f.put(d, Arrays.asList(one, one, one, two));\n f.put(i, Arrays.asList(two));\n f.put(s, Arrays.asList(one, one, two));\n f.put(r, Arrays.asList(r));\n f.put(u, Arrays.asList(u));\n f.put(z, Arrays.asList(z));\n\n\n g.put(a, Arrays.asList(one, two, one));\n g.put(b, Arrays.asList(three));\n g.put(d, Arrays.asList(one, one, one));\n g.put(i, Arrays.asList(two, two));\n g.put(s, Arrays.asList(one, two));\n g.put(r, Arrays.asList(r));\n g.put(u, Arrays.asList(u));\n g.put(z, Arrays.asList(z));\n\n\n Set<Production<Character>> productions = parser.createProductions(text);\n Set<IJezSymbol<Character>> axiom = new HashSet<>();\n axiom.add(cfgCreator.lookupSymbol('D', false));\n\n\n Set<Production<Character>> wCNFProductions = cfgOp.toWeakCNF(productions, axiom, cfgCreator);\n MorphismEQSolver<Character, Character> morphismEQSolver = new MorphismEQSolver<>(cfgCreator.createCFG(wCNFProductions, axiom), cfgCreator, new CFGCreatorFactory<>(), new CFGCreatorFactory<>());\n\n GenDefaultMorphism<Character> morphism1 = new GenDefaultMorphism<>(f::get);\n GenDefaultMorphism<Character> morphism2 = new GenDefaultMorphism<>(g::get);\n long ms = System.currentTimeMillis();\n assertTrue(morphismEQSolver.equivalentOnMorphisms(morphism1, morphism2));\n logger.info(\"Running time: \" + (System.currentTimeMillis() - ms) + \"[ms]\");\n }", "public interface IfcFaceOuterBound extends IfcFaceBound {\n}", "@Test\n\tpublic final void testPartialInstantiation() throws Exception {\n\t\tfinal IPRProof proof = prRoot.createChild(IPRProof.ELEMENT_TYPE, null, null);\n\n\t\tfinal IProverSequent seq = TestLib.genSeq(factory,\n\t\t\t\t\" x ∈ ℕ\" + \";; y ∈ ℕ\" + \";; (∀a,b· a ∈ ℕ ∧ b ∈ ℕ ⇒ a+b ∈ ℕ)\" + \"|- x+y ∈ ℕ\");\n\t\tfinal IProofTree proofTree = ProverFactory.makeProofTree(seq, null);\n\t\tfinal Predicate univ = getFirstUnivHyp(seq);\n\t\tITactic tactic;\n\n\t\t// Apply AllD with a full instantiation\n\t\ttactic = Tactics.allD(univ, \"x\", \"y\");\n\t\ttactic.apply(proofTree.getRoot(), null);\n\t\tcheckProofTreeSerialization(proof, proofTree, true);\n\t\tproofTree.getRoot().pruneChildren();\n\n\t\t// Apply AllD with a partial instantiation (only \"a\")\n\t\ttactic = Tactics.allD(univ, \"x\", null);\n\t\ttactic.apply(proofTree.getRoot(), null);\n\t\tcheckProofTreeSerialization(proof, proofTree, true);\n\t\tproofTree.getRoot().pruneChildren();\n\n\t\t// Apply AllD with a partial instantiation (only \"b\")\n\t\ttactic = Tactics.allD(univ, null, \"y\");\n\t\ttactic.apply(proofTree.getRoot(), null);\n\t\tcheckProofTreeSerialization(proof, proofTree, true);\n\t\tproofTree.getRoot().pruneChildren();\n\t}", "private void drawComponentsInverse(Chart chart, Point p, Size s) {\n Node n = this; // current node in the level\n boolean samelevel = true; // next node in same level?\n Point p1 = new Point(0, 0);\n while (n != null && samelevel) {\n p.x -= n.size.getWidth();\n if (n.typ.matches(NodeType.TERM, NodeType.NONTERM, NodeType.EXCEPTION, NodeType.PREDICATE)) {\n drawDefaultInverse(chart, p, n);\n } else if (n.typ == NodeType.EPS) {\n drawEpsilon(chart, p, n);\n } else if(n.typ == NodeType.PREDICATE) {\n } else if (n.typ == NodeType.OPT) {\n drawOptionInverse(chart, p, n, p1);\n } else if (n.typ == NodeType.RERUN) {\n drawRerunInverse(chart, p, n, p1);\n } else if (n.typ == NodeType.ITER) {\n drawIterationReverse(chart, p, n, p1);\n } else if (n.typ == NodeType.ALT) {\n drawAltInverse(chart, p, n, p1);\n }\n if (n.up) {\n samelevel = false;\n }\n n = n.next;\n }\n }", "public interface Wall extends Product {\n}", "public static <L, R, G, H> CompositeBinaryPredicate<L, R> predicate(\n BinaryPredicate<? super G, ? super H> p, Function<? super L, ? extends G> g,\n Function<? super R, ? extends H> h) {\n return new CompositeBinaryPredicate<L, R>(p, g, h);\n }", "public interface BaseGraphCollection<\n G extends GraphHead,\n V extends Vertex,\n E extends Edge,\n LG extends BaseGraph<G, V, E, LG, GC>,\n GC extends BaseGraphCollection<G, V, E, LG, GC>>\n extends GraphCollectionLayout<G, V, E>, BaseGraphCollectionOperators<G, V, E, LG, GC> {\n\n /**\n * Returns the Gradoop Flink configuration.\n *\n * @return the Gradoop Flink configuration\n */\n GradoopFlinkConfig getConfig();\n\n /**\n * Get the factory that is responsible for creating an instance of {@link GC}.\n *\n * @return a factory that can be used to create a {@link GC} instance\n */\n BaseGraphCollectionFactory<G, V, E, LG, GC> getFactory();\n\n /**\n * Get the factory that is responsible for creating an instance of {@link LG}.\n *\n * @return a factory that can be used to create a {@link LG} instance\n */\n BaseGraphFactory<G, V, E, LG, GC> getGraphFactory();\n\n //----------------------------------------------------------------------------\n // Base Graph / Graph Head Getters\n //----------------------------------------------------------------------------\n\n @Override\n default LG getGraph(final GradoopId graphID) {\n // filter vertices and edges based on given graph id\n DataSet<G> graphHead = getGraphHeads()\n .filter(new BySameId<>(graphID));\n DataSet<V> vertices = getVertices()\n .filter(new InGraph<>(graphID));\n DataSet<E> edges = getEdges()\n .filter(new InGraph<>(graphID));\n\n return getGraphFactory().fromDataSets(graphHead, vertices, edges);\n }\n\n @Override\n default GC getGraphs(final GradoopIdSet identifiers) {\n DataSet<G> newGraphHeads = this.getGraphHeads()\n .filter((FilterFunction<G>) graphHead -> identifiers.contains(graphHead.getId()));\n\n // build new vertex set\n DataSet<V> vertices = getVertices()\n .filter(new InAnyGraph<>(identifiers));\n\n // build new edge set\n DataSet<E> edges = getEdges()\n .filter(new InAnyGraph<>(identifiers));\n\n return getFactory().fromDataSets(newGraphHeads, vertices, edges);\n }\n\n //----------------------------------------------------------------------------\n // Utility methods\n //----------------------------------------------------------------------------\n\n @Override\n default DataSet<Boolean> isEmpty() {\n return getGraphHeads()\n .map(new True<>())\n .distinct()\n .union(getConfig().getExecutionEnvironment().fromElements(false))\n .reduce(new Or())\n .map(new Not());\n }\n}", "@Test\n public void shouldNotAddDuplicateDependents() {\n String currentPipeline = \"p5\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n Node p4 = graph.addUpstreamNode(new PipelineDependencyNode(\"p4\", \"p4\"), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(\"p4\", \"p4\"), null, currentPipeline);\n\n assertThat(p4.getChildren().size(), is(1));\n VSMTestHelper.assertThatNodeHasChildren(graph, \"p4\", 0, \"p5\");\n }", "protected abstract void composeHats(final Phrase hats);", "@Override\n\tpublic void updatePanierMerge(Panier p) {\n\t\tSessionFactory factory = DBConnexion.getSessionFactory();\n\t\tSession session = factory.getCurrentSession();\n\t\ttry {\n\t\t\tsession.beginTransaction();\n\t\t\tPanier p1 = (Panier) session.merge(p);\n\t\t\tsession.getTransaction().commit();\n\t\t} finally {\n\t\t\tfactory.close();\n\t\t}\n\t}", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "public void init(weighted_graph g);", "public interface IUndirectedGraph extends IGraph{\n\n /**\n * Check the presence of an edge between two nodes.\n *\n * @param x the source node\n * @param y the destination node\n * @return true if there is an edge between x and y\n */\n default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }\n\n /**\n * Remove the edge between two nodes if exist.\n * @param x the source node\n * @param y the destination node\n */\n void removeEdge(int x, int y);\n\n /**\n * Add an edge between two nodes, if not already present.\n * The two nodes must be distincts.\n * @param x the source node\n * @param y the destination node\n */\n void addEdge(int x, int y);\n\n /**\n * Get the neighboors of a node\n * @param x the node\n * @return a new int array representing the neighbors\n */\n List<Integer> getNeighbors(int x);\n\n @Override\n default int[][] getGraph() {\n int order = getOrder();\n int[][] adjencyMatrix = new int[order][order];\n for (int i = 0; i < order; i++) {\n List<Integer> succ = getNeighbors(i);\n for (Integer s : succ) {\n adjencyMatrix[i][s] = 1;\n }\n }\n return adjencyMatrix;\n }\n\n @Override\n default boolean isDirected(){\n return false;\n }\n}", "private void propagatePathImprovements(Node p) {\n\t\tfor (Node c : p.kids) {\n\t\t\tif(p.g + arcCost(p, c) < c.g){\n\t\t\t\tc.parent = p;\n\t\t\t\tc.g = p.g + arcCost(p, c);\n\t\t\t\tc.f = c.g + c.h;\n\t\t\t\tpropagatePathImprovements(c);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void addToSubBindingsIfNeeded(PropertyGenerator pg) {\n\t\tif (pg.hasSubBindings()) {\n\t\t\tthis.foundSubBindings.add(pg.getPropertyName());\n\t\t}\n\t}", "ConvertHamilPathToSat(Graph g) {\n this.g = g;\n g.updateNonEdges();\n //hamilPath with v vertices has v paths\n variables = new Integer[g.vertexCount][g.vertexCount];\n vertexCount = variables.length;\n positionCount = variables[0].length;\n variableCount = vertexCount * positionCount;\n initVariables();\n clauses = new ArrayList<>();\n computeSat();\n }", "public interface HadithSanad extends WrappedIndividual {\r\n\r\n /* ***************************************************\r\n * Property http://purl.org/dc/terms/hasPart\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasPart property.<p>\r\n * \r\n * @returns a collection of values for the hasPart property.\r\n */\r\n Collection<? extends WrappedIndividual> getHasPart();\r\n\r\n /**\r\n * Checks if the class has a hasPart property value.<p>\r\n * \r\n * @return true if there is a hasPart property value.\r\n */\r\n boolean hasHasPart();\r\n\r\n /**\r\n * Adds a hasPart property value.<p>\r\n * \r\n * @param newHasPart the hasPart property value to be added\r\n */\r\n void addHasPart(WrappedIndividual newHasPart);\r\n\r\n /**\r\n * Removes a hasPart property value.<p>\r\n * \r\n * @param oldHasPart the hasPart property value to be removed.\r\n */\r\n void removeHasPart(WrappedIndividual oldHasPart);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://purl.org/dc/terms/isPartOf\r\n */\r\n \r\n /**\r\n * Gets all property values for the isPartOf property.<p>\r\n * \r\n * @returns a collection of values for the isPartOf property.\r\n */\r\n Collection<? extends WrappedIndividual> getIsPartOf();\r\n\r\n /**\r\n * Checks if the class has a isPartOf property value.<p>\r\n * \r\n * @return true if there is a isPartOf property value.\r\n */\r\n boolean hasIsPartOf();\r\n\r\n /**\r\n * Adds a isPartOf property value.<p>\r\n * \r\n * @param newIsPartOf the isPartOf property value to be added\r\n */\r\n void addIsPartOf(WrappedIndividual newIsPartOf);\r\n\r\n /**\r\n * Removes a isPartOf property value.<p>\r\n * \r\n * @param oldIsPartOf the isPartOf property value to be removed.\r\n */\r\n void removeIsPartOf(WrappedIndividual oldIsPartOf);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://quranontology.com/Resource/MentionedIn\r\n */\r\n \r\n /**\r\n * Gets all property values for the MentionedIn property.<p>\r\n * \r\n * @returns a collection of values for the MentionedIn property.\r\n */\r\n Collection<? extends Hadith> getMentionedIn();\r\n\r\n /**\r\n * Checks if the class has a MentionedIn property value.<p>\r\n * \r\n * @return true if there is a MentionedIn property value.\r\n */\r\n boolean hasMentionedIn();\r\n\r\n /**\r\n * Adds a MentionedIn property value.<p>\r\n * \r\n * @param newMentionedIn the MentionedIn property value to be added\r\n */\r\n void addMentionedIn(Hadith newMentionedIn);\r\n\r\n /**\r\n * Removes a MentionedIn property value.<p>\r\n * \r\n * @param oldMentionedIn the MentionedIn property value to be removed.\r\n */\r\n void removeMentionedIn(Hadith oldMentionedIn);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#collectionName\r\n */\r\n \r\n /**\r\n * Gets all property values for the collectionName property.<p>\r\n * \r\n * @returns a collection of values for the collectionName property.\r\n */\r\n Collection<? extends Object> getCollectionName();\r\n\r\n /**\r\n * Checks if the class has a collectionName property value.<p>\r\n * \r\n * @return true if there is a collectionName property value.\r\n */\r\n boolean hasCollectionName();\r\n\r\n /**\r\n * Adds a collectionName property value.<p>\r\n * \r\n * @param newCollectionName the collectionName property value to be added\r\n */\r\n void addCollectionName(Object newCollectionName);\r\n\r\n /**\r\n * Removes a collectionName property value.<p>\r\n * \r\n * @param oldCollectionName the collectionName property value to be removed.\r\n */\r\n void removeCollectionName(Object oldCollectionName);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#deprecatedBookNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the deprecatedBookNo property.<p>\r\n * \r\n * @returns a collection of values for the deprecatedBookNo property.\r\n */\r\n Collection<? extends Object> getDeprecatedBookNo();\r\n\r\n /**\r\n * Checks if the class has a deprecatedBookNo property value.<p>\r\n * \r\n * @return true if there is a deprecatedBookNo property value.\r\n */\r\n boolean hasDeprecatedBookNo();\r\n\r\n /**\r\n * Adds a deprecatedBookNo property value.<p>\r\n * \r\n * @param newDeprecatedBookNo the deprecatedBookNo property value to be added\r\n */\r\n void addDeprecatedBookNo(Object newDeprecatedBookNo);\r\n\r\n /**\r\n * Removes a deprecatedBookNo property value.<p>\r\n * \r\n * @param oldDeprecatedBookNo the deprecatedBookNo property value to be removed.\r\n */\r\n void removeDeprecatedBookNo(Object oldDeprecatedBookNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#deprecatedHadithNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the deprecatedHadithNo property.<p>\r\n * \r\n * @returns a collection of values for the deprecatedHadithNo property.\r\n */\r\n Collection<? extends Object> getDeprecatedHadithNo();\r\n\r\n /**\r\n * Checks if the class has a deprecatedHadithNo property value.<p>\r\n * \r\n * @return true if there is a deprecatedHadithNo property value.\r\n */\r\n boolean hasDeprecatedHadithNo();\r\n\r\n /**\r\n * Adds a deprecatedHadithNo property value.<p>\r\n * \r\n * @param newDeprecatedHadithNo the deprecatedHadithNo property value to be added\r\n */\r\n void addDeprecatedHadithNo(Object newDeprecatedHadithNo);\r\n\r\n /**\r\n * Removes a deprecatedHadithNo property value.<p>\r\n * \r\n * @param oldDeprecatedHadithNo the deprecatedHadithNo property value to be removed.\r\n */\r\n void removeDeprecatedHadithNo(Object oldDeprecatedHadithNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#endingHadithNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the endingHadithNo property.<p>\r\n * \r\n * @returns a collection of values for the endingHadithNo property.\r\n */\r\n Collection<? extends Object> getEndingHadithNo();\r\n\r\n /**\r\n * Checks if the class has a endingHadithNo property value.<p>\r\n * \r\n * @return true if there is a endingHadithNo property value.\r\n */\r\n boolean hasEndingHadithNo();\r\n\r\n /**\r\n * Adds a endingHadithNo property value.<p>\r\n * \r\n * @param newEndingHadithNo the endingHadithNo property value to be added\r\n */\r\n void addEndingHadithNo(Object newEndingHadithNo);\r\n\r\n /**\r\n * Removes a endingHadithNo property value.<p>\r\n * \r\n * @param oldEndingHadithNo the endingHadithNo property value to be removed.\r\n */\r\n void removeEndingHadithNo(Object oldEndingHadithNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#fullHadith\r\n */\r\n \r\n /**\r\n * Gets all property values for the fullHadith property.<p>\r\n * \r\n * @returns a collection of values for the fullHadith property.\r\n */\r\n Collection<? extends Object> getFullHadith();\r\n\r\n /**\r\n * Checks if the class has a fullHadith property value.<p>\r\n * \r\n * @return true if there is a fullHadith property value.\r\n */\r\n boolean hasFullHadith();\r\n\r\n /**\r\n * Adds a fullHadith property value.<p>\r\n * \r\n * @param newFullHadith the fullHadith property value to be added\r\n */\r\n void addFullHadith(Object newFullHadith);\r\n\r\n /**\r\n * Removes a fullHadith property value.<p>\r\n * \r\n * @param oldFullHadith the fullHadith property value to be removed.\r\n */\r\n void removeFullHadith(Object oldFullHadith);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithBookNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithBookNo property.<p>\r\n * \r\n * @returns a collection of values for the hadithBookNo property.\r\n */\r\n Collection<? extends Object> getHadithBookNo();\r\n\r\n /**\r\n * Checks if the class has a hadithBookNo property value.<p>\r\n * \r\n * @return true if there is a hadithBookNo property value.\r\n */\r\n boolean hasHadithBookNo();\r\n\r\n /**\r\n * Adds a hadithBookNo property value.<p>\r\n * \r\n * @param newHadithBookNo the hadithBookNo property value to be added\r\n */\r\n void addHadithBookNo(Object newHadithBookNo);\r\n\r\n /**\r\n * Removes a hadithBookNo property value.<p>\r\n * \r\n * @param oldHadithBookNo the hadithBookNo property value to be removed.\r\n */\r\n void removeHadithBookNo(Object oldHadithBookNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithBookUrl\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithBookUrl property.<p>\r\n * \r\n * @returns a collection of values for the hadithBookUrl property.\r\n */\r\n Collection<? extends Object> getHadithBookUrl();\r\n\r\n /**\r\n * Checks if the class has a hadithBookUrl property value.<p>\r\n * \r\n * @return true if there is a hadithBookUrl property value.\r\n */\r\n boolean hasHadithBookUrl();\r\n\r\n /**\r\n * Adds a hadithBookUrl property value.<p>\r\n * \r\n * @param newHadithBookUrl the hadithBookUrl property value to be added\r\n */\r\n void addHadithBookUrl(Object newHadithBookUrl);\r\n\r\n /**\r\n * Removes a hadithBookUrl property value.<p>\r\n * \r\n * @param oldHadithBookUrl the hadithBookUrl property value to be removed.\r\n */\r\n void removeHadithBookUrl(Object oldHadithBookUrl);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithChapterIntro\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithChapterIntro property.<p>\r\n * \r\n * @returns a collection of values for the hadithChapterIntro property.\r\n */\r\n Collection<? extends Object> getHadithChapterIntro();\r\n\r\n /**\r\n * Checks if the class has a hadithChapterIntro property value.<p>\r\n * \r\n * @return true if there is a hadithChapterIntro property value.\r\n */\r\n boolean hasHadithChapterIntro();\r\n\r\n /**\r\n * Adds a hadithChapterIntro property value.<p>\r\n * \r\n * @param newHadithChapterIntro the hadithChapterIntro property value to be added\r\n */\r\n void addHadithChapterIntro(Object newHadithChapterIntro);\r\n\r\n /**\r\n * Removes a hadithChapterIntro property value.<p>\r\n * \r\n * @param oldHadithChapterIntro the hadithChapterIntro property value to be removed.\r\n */\r\n void removeHadithChapterIntro(Object oldHadithChapterIntro);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithChapterNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithChapterNo property.<p>\r\n * \r\n * @returns a collection of values for the hadithChapterNo property.\r\n */\r\n Collection<? extends Object> getHadithChapterNo();\r\n\r\n /**\r\n * Checks if the class has a hadithChapterNo property value.<p>\r\n * \r\n * @return true if there is a hadithChapterNo property value.\r\n */\r\n boolean hasHadithChapterNo();\r\n\r\n /**\r\n * Adds a hadithChapterNo property value.<p>\r\n * \r\n * @param newHadithChapterNo the hadithChapterNo property value to be added\r\n */\r\n void addHadithChapterNo(Object newHadithChapterNo);\r\n\r\n /**\r\n * Removes a hadithChapterNo property value.<p>\r\n * \r\n * @param oldHadithChapterNo the hadithChapterNo property value to be removed.\r\n */\r\n void removeHadithChapterNo(Object oldHadithChapterNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithNo property.<p>\r\n * \r\n * @returns a collection of values for the hadithNo property.\r\n */\r\n Collection<? extends Object> getHadithNo();\r\n\r\n /**\r\n * Checks if the class has a hadithNo property value.<p>\r\n * \r\n * @return true if there is a hadithNo property value.\r\n */\r\n boolean hasHadithNo();\r\n\r\n /**\r\n * Adds a hadithNo property value.<p>\r\n * \r\n * @param newHadithNo the hadithNo property value to be added\r\n */\r\n void addHadithNo(Object newHadithNo);\r\n\r\n /**\r\n * Removes a hadithNo property value.<p>\r\n * \r\n * @param oldHadithNo the hadithNo property value to be removed.\r\n */\r\n void removeHadithNo(Object oldHadithNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithReferenceNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithReferenceNo property.<p>\r\n * \r\n * @returns a collection of values for the hadithReferenceNo property.\r\n */\r\n Collection<? extends Object> getHadithReferenceNo();\r\n\r\n /**\r\n * Checks if the class has a hadithReferenceNo property value.<p>\r\n * \r\n * @return true if there is a hadithReferenceNo property value.\r\n */\r\n boolean hasHadithReferenceNo();\r\n\r\n /**\r\n * Adds a hadithReferenceNo property value.<p>\r\n * \r\n * @param newHadithReferenceNo the hadithReferenceNo property value to be added\r\n */\r\n void addHadithReferenceNo(Object newHadithReferenceNo);\r\n\r\n /**\r\n * Removes a hadithReferenceNo property value.<p>\r\n * \r\n * @param oldHadithReferenceNo the hadithReferenceNo property value to be removed.\r\n */\r\n void removeHadithReferenceNo(Object oldHadithReferenceNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithText\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithText property.<p>\r\n * \r\n * @returns a collection of values for the hadithText property.\r\n */\r\n Collection<? extends Object> getHadithText();\r\n\r\n /**\r\n * Checks if the class has a hadithText property value.<p>\r\n * \r\n * @return true if there is a hadithText property value.\r\n */\r\n boolean hasHadithText();\r\n\r\n /**\r\n * Adds a hadithText property value.<p>\r\n * \r\n * @param newHadithText the hadithText property value to be added\r\n */\r\n void addHadithText(Object newHadithText);\r\n\r\n /**\r\n * Removes a hadithText property value.<p>\r\n * \r\n * @param oldHadithText the hadithText property value to be removed.\r\n */\r\n void removeHadithText(Object oldHadithText);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithUrl\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithUrl property.<p>\r\n * \r\n * @returns a collection of values for the hadithUrl property.\r\n */\r\n Collection<? extends Object> getHadithUrl();\r\n\r\n /**\r\n * Checks if the class has a hadithUrl property value.<p>\r\n * \r\n * @return true if there is a hadithUrl property value.\r\n */\r\n boolean hasHadithUrl();\r\n\r\n /**\r\n * Adds a hadithUrl property value.<p>\r\n * \r\n * @param newHadithUrl the hadithUrl property value to be added\r\n */\r\n void addHadithUrl(Object newHadithUrl);\r\n\r\n /**\r\n * Removes a hadithUrl property value.<p>\r\n * \r\n * @param oldHadithUrl the hadithUrl property value to be removed.\r\n */\r\n void removeHadithUrl(Object oldHadithUrl);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#hadithVolumeNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the hadithVolumeNo property.<p>\r\n * \r\n * @returns a collection of values for the hadithVolumeNo property.\r\n */\r\n Collection<? extends Object> getHadithVolumeNo();\r\n\r\n /**\r\n * Checks if the class has a hadithVolumeNo property value.<p>\r\n * \r\n * @return true if there is a hadithVolumeNo property value.\r\n */\r\n boolean hasHadithVolumeNo();\r\n\r\n /**\r\n * Adds a hadithVolumeNo property value.<p>\r\n * \r\n * @param newHadithVolumeNo the hadithVolumeNo property value to be added\r\n */\r\n void addHadithVolumeNo(Object newHadithVolumeNo);\r\n\r\n /**\r\n * Removes a hadithVolumeNo property value.<p>\r\n * \r\n * @param oldHadithVolumeNo the hadithVolumeNo property value to be removed.\r\n */\r\n void removeHadithVolumeNo(Object oldHadithVolumeNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#inBookNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the inBookNo property.<p>\r\n * \r\n * @returns a collection of values for the inBookNo property.\r\n */\r\n Collection<? extends Object> getInBookNo();\r\n\r\n /**\r\n * Checks if the class has a inBookNo property value.<p>\r\n * \r\n * @return true if there is a inBookNo property value.\r\n */\r\n boolean hasInBookNo();\r\n\r\n /**\r\n * Adds a inBookNo property value.<p>\r\n * \r\n * @param newInBookNo the inBookNo property value to be added\r\n */\r\n void addInBookNo(Object newInBookNo);\r\n\r\n /**\r\n * Removes a inBookNo property value.<p>\r\n * \r\n * @param oldInBookNo the inBookNo property value to be removed.\r\n */\r\n void removeInBookNo(Object oldInBookNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#narratorChain\r\n */\r\n \r\n /**\r\n * Gets all property values for the narratorChain property.<p>\r\n * \r\n * @returns a collection of values for the narratorChain property.\r\n */\r\n Collection<? extends Object> getNarratorChain();\r\n\r\n /**\r\n * Checks if the class has a narratorChain property value.<p>\r\n * \r\n * @return true if there is a narratorChain property value.\r\n */\r\n boolean hasNarratorChain();\r\n\r\n /**\r\n * Adds a narratorChain property value.<p>\r\n * \r\n * @param newNarratorChain the narratorChain property value to be added\r\n */\r\n void addNarratorChain(Object newNarratorChain);\r\n\r\n /**\r\n * Removes a narratorChain property value.<p>\r\n * \r\n * @param oldNarratorChain the narratorChain property value to be removed.\r\n */\r\n void removeNarratorChain(Object oldNarratorChain);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#sameAs\r\n */\r\n \r\n /**\r\n * Gets all property values for the sameAs property.<p>\r\n * \r\n * @returns a collection of values for the sameAs property.\r\n */\r\n Collection<? extends Object> getSameAs();\r\n\r\n /**\r\n * Checks if the class has a sameAs property value.<p>\r\n * \r\n * @return true if there is a sameAs property value.\r\n */\r\n boolean hasSameAs();\r\n\r\n /**\r\n * Adds a sameAs property value.<p>\r\n * \r\n * @param newSameAs the sameAs property value to be added\r\n */\r\n void addSameAs(Object newSameAs);\r\n\r\n /**\r\n * Removes a sameAs property value.<p>\r\n * \r\n * @param oldSameAs the sameAs property value to be removed.\r\n */\r\n void removeSameAs(Object oldSameAs);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.lodislamica.me/ontology/hadithVoc#startingHadithNo\r\n */\r\n \r\n /**\r\n * Gets all property values for the startingHadithNo property.<p>\r\n * \r\n * @returns a collection of values for the startingHadithNo property.\r\n */\r\n Collection<? extends Object> getStartingHadithNo();\r\n\r\n /**\r\n * Checks if the class has a startingHadithNo property value.<p>\r\n * \r\n * @return true if there is a startingHadithNo property value.\r\n */\r\n boolean hasStartingHadithNo();\r\n\r\n /**\r\n * Adds a startingHadithNo property value.<p>\r\n * \r\n * @param newStartingHadithNo the startingHadithNo property value to be added\r\n */\r\n void addStartingHadithNo(Object newStartingHadithNo);\r\n\r\n /**\r\n * Removes a startingHadithNo property value.<p>\r\n * \r\n * @param oldStartingHadithNo the startingHadithNo property value to be removed.\r\n */\r\n void removeStartingHadithNo(Object oldStartingHadithNo);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property https://www.w3.org/2000/01/rdf-schema#label\r\n */\r\n \r\n /**\r\n * Gets all property values for the label property.<p>\r\n * \r\n * @returns a collection of values for the label property.\r\n */\r\n Collection<? extends Object> getLabel();\r\n\r\n /**\r\n * Checks if the class has a label property value.<p>\r\n * \r\n * @return true if there is a label property value.\r\n */\r\n boolean hasLabel();\r\n\r\n /**\r\n * Adds a label property value.<p>\r\n * \r\n * @param newLabel the label property value to be added\r\n */\r\n void addLabel(Object newLabel);\r\n\r\n /**\r\n * Removes a label property value.<p>\r\n * \r\n * @param oldLabel the label property value to be removed.\r\n */\r\n void removeLabel(Object oldLabel);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Common interfaces\r\n */\r\n\r\n OWLNamedIndividual getOwlIndividual();\r\n\r\n OWLOntology getOwlOntology();\r\n\r\n void delete();\r\n\r\n}", "@Override\n\tpublic void visitXon(Xon p) {\n\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 }", "public GraphImpl(int[][] g) {\n\t\tanzKnoten = g.length;\n\t\tgraph = g;\n\t}", "Philosopher(int id, Fork l, Fork r, int s) { //constructor\n identity = id; //arxikopoihsh ari8mou tou filosofou\n left = l; //arxikopoihsh pirouniwn\n right = r;\n scale = s;\n }", "public interface XoverOpIntf {\r\n /**\r\n * the operation accepts 2 chromosomes (not DGAIndividual objects, not\r\n * FunctionIntf() arguments), and combines them so as to produce two new\r\n * such chromosomes that are returned in a Pair object. The operation may\r\n * throw if any of the produced children are infeasible, assuming the operator\r\n * has enough knowledge of that fact.\r\n * @param chromosome1 Object\r\n * @param chromosome2 Object\r\n * @param params HashMap \r\n * @throws OptimizerException\r\n * @return Pair\r\n */\r\n public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;\r\n}", "private void addOrUpdatePropertiesVertex(GraphTraversalSource g, Vertex vertex, LineageEntity lineageEntity) {\n Map<String, Object> properties = getProperties(lineageEntity);\n g.inject(properties)\n .unfold()\n .as(PROPERTIES)\n .V(vertex.id())\n .as(V)\n .sideEffect(__.select(PROPERTIES)\n .unfold()\n .as(KV)\n .select(V)\n .property(__.select(KV).by(Column.keys), __.select(KV).by(Column.values))).iterate();\n }", "public void merge(Component p) {\r\n\t\tsize += p.size();\r\n\r\n\t\tfor (int i = 0; i < features.length; i++) {\r\n\t\t\tfeatures[i].merge(p.features[i]);\r\n\t\t}\r\n\t}", "public void compute2() {\n\n ILineString lsInitiale = this.geom;\n ILineString lsLisse = Operateurs.resampling(lsInitiale, 1);\n // ILineString lsLisse = GaussianFilter.gaussianFilter(lsInitiale, 10, 1);\n // ILineString\n // lsLisse=LissageGaussian.AppliquerLissageGaussien((GM_LineString)\n // lsInitiale, 10, 1, false);\n\n logger.debug(\"Gaussian Smoothing of : \" + lsInitiale);\n\n // On determine les séquences de virages\n List<Integer> listSequence = determineSequences(lsLisse);\n\n // On applique le filtre gaussien\n\n // On crée une collection de points qui servira à découper tous les\n // virages\n\n if (listSequence.size() > 0) {\n List<Integer> listSequenceFiltre = filtrageSequences(listSequence, 1);\n DirectPositionList dplPointsInflexionLsLissee = determinePointsInflexion(\n lsInitiale, listSequenceFiltre);\n\n for (IDirectPosition directPosition : dplPointsInflexionLsLissee) {\n this.jddPtsInflexion.add(directPosition.toGM_Point().getPosition());\n // dplPtsInflexionVirages.add(directPosition);\n }\n\n // jddPtsInflexion.addAll(jddPtsInflexionLsInitiale);\n\n }\n // dplPtsInflexionVirages.add(lsInitiale.coord().get(lsInitiale.coord().size()-1));\n\n }", "@Test\n\tpublic void PrimTest() {\n\t\tConfiguration.MSTPRIM=true;\n\t\tConfiguration.UNDIRECTED=true;\n\t\tConfiguration.WEIGHTED=true;\n\t\t\n\t\tif (Configuration.MSTPRIM && Configuration.UNDIRECTED && Configuration.WEIGHTED) {\n\n\t\t\t// Preparing Variables\n\t\t\tVertex v1 = new Vertex();\n\t\t\tVertex v2 = new Vertex();\n\t\t\tVertex v3 = new Vertex();\n\t\t\tGraph g = new Graph();\n\t\t\tg.addVertex(v1);\n\t\t\tg.addVertex(v2);\n\t\t\tg.addVertex(v3);\n\t\t\tg.addEdge(v1, v2, 3);\n\t\t\tg.addEdge(v1, v3, 2);\n\t\t\tg.addEdge(v2, v3, 1);\n\n\t\t\tGraph testman = g.Prim(v1);\n\t\t\tassertNotSame(testman, g);\n\t\t}\n\t}", "@Override\n public void paint(Graphics g1){\n\n try{\n super.paint(g1);\n\n drawSymbols_Rel( g1 );\n drawSymbols_Att( g1 );\n /**\n //==== only for test ====\n this.setComplexRelationsCoordinates(20, 28, 33, 38);\n this.setComplexRelationsCoordinates_extraEnds(400, 404);\n */\n\n drawComplexRelationship(g1);\n drawPath(g1);\n \n \n \n }catch(Exception ex){\n }\n }", "void extend();", "@Override\n\tpublic void visitXis(Xis p) {\n\n\t}", "private void replaceMatchingParameters() {\r\n\t\tDisplay.getDefault().asyncExec(()->{\r\n\t\t\tif(mwt == null) return;\r\n\t\t\tmwt.pack();\r\n\t\t\r\n\t\t//\tCompositionBriques composition = mwt.getCompositionBriques();\r\n\t\t\t\r\n\t\t//\tList<Equation> eqn = composition.getEquation();\t\r\n\t\t//\tMatchIdenticalParameters.matchIdenticalBriqueParameters(eqn);\r\n\t\t});\r\n\r\n\t}", "public void commandOver(Graphics g) {\n\t}", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "public static int CographEditHeuristic1 (Graph<Integer,String> h) {\n\t\tboolean isCograph = false;\r\n\t\t//h = Copy(g);\r\n\t\t\r\n\t\tIterator<Integer> a;\r\n\t\tIterator<Integer> b;\r\n\t\tIterator<Integer> c;\r\n\t\tIterator<Integer> d;\r\n\r\n\t\twhile (isCograph == false) {\r\n\t\t\tisCograph = true;\r\n\t\t\ta= h.getVertices().iterator();\r\n\t\t\twhile(a.hasNext()){\r\n\t\t\t\tInteger A = a.next();\r\n\t\t\t\t//System.out.print(\"\"+A+\" \");\r\n\t\t\t\tb = h.getNeighbors(A).iterator();\r\n\t\t\t\twhile(b.hasNext()){\r\n\t\t\t\t\tInteger B = b.next();\r\n\t\t\t\t\tc = h.getNeighbors(B).iterator();\r\n\t\t\t\t\twhile (c.hasNext()){\r\n\t\t\t\t\t\tInteger C = c.next();\r\n\t\t\t\t\t\tif (h.isNeighbor(C, A) || C==A) continue;\r\n\t\t\t\t\t\td = h.getNeighbors(C).iterator();\r\n\t\t\t\t\t\twhile (d.hasNext()){\r\n\t\t\t\t\t\t\tInteger D = d.next();\r\n\t\t\t\t\t\t\tif (D==B) continue; \r\n\t\t\t\t\t\t\tif (h.isNeighbor(D,B)) continue;\r\n\t\t\t\t\t\t\tif (h.isNeighbor(D, A)) continue;\r\n\t\t\t\t\t\t\t//otherwise, we have a P4\r\n\r\n\t\t\t\t\t\t\tisCograph = false;\r\n\t\t\t\t\t\t\t//System.out.print(\"Found P4: \"+A+\"-\"+B+\"-\"+C+\"-\"+D+\"... not a cograph\\n\");\r\n\r\n\t\t\t\t\t\t\t// else D is NOT adjacent to A. Then we have P4=abcd\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\th.removeVertex(A);\r\n\t\t\t\t\t\t\th.removeVertex(B);\r\n\t\t\t\t\t\t\th.removeVertex(C);\r\n\t\t\t\t\t\t\treturn 1 + CographEditHeuristic1(h);\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\t\r\n\t\t\t\t\t} // end d.hasNext()\r\n\t\t\t\t} // end c.hasNext()\r\n\t\t\t} // end b.hasNext() \r\n\t\t} // end a.hasNext()\r\n\r\n\t\t// if it reaches here, no P4s exist\r\n\t\treturn 0;\t\t\r\n\t}", "public interface NerdMartGraph {\n void inject(NerdMartAbstractFragment fragment);\n}", "protected void merge(FlowGraph graph){\r\n for(FlowGraphNode node : this.from){\r\n node.addTo(graph.start);\r\n node.to.remove(this);\r\n }\r\n for(FlowGraphNode node : this.to){\r\n graph.end.addTo(node);\r\n node.from.remove(this);\r\n }\r\n }", "public static void findIndependent(GraphPattern graphPattern) {\n\t\tfor (DependencyNode dependency : graphPattern.getDependencyGraph().getNodes()) {\r\n\t\t\tif (dependency.getOutgoings().isEmpty()) {\r\n\t\t\t\tgraphPattern.getDependencyGraph().getIndependent().add(dependency);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public MinMatchingAlg(WeightedDigraph g) {\r\n\t\tint graphSzWithMaxBlossoms = g.numVertices() * 2;\r\n\t\t// mate = new int[graphSzWithMaxBlossoms];\r\n\t\tmatching = new Matching(g.numVertices());\r\n\t\texposed = new int[graphSzWithMaxBlossoms];\r\n\t\tseen = new boolean[graphSzWithMaxBlossoms];\r\n\t\tlabel = new int[graphSzWithMaxBlossoms];\r\n\t\t// blossom = new int[graphSzWithMaxBlossoms];\r\n\t\tmarked = new boolean[graphSzWithMaxBlossoms];\r\n\t\tA = new ArrayList<Edge>(graphSzWithMaxBlossoms);\r\n\t\t// blossoms = new HashMap<Integer,LinkedList<Integer>>(graphSzWithMaxBlossoms);\r\n\t\tblossoms = new HashMap<Integer, Blossom>(graphSzWithMaxBlossoms);\r\n\t\tlargestBlossom = g.numVertices() - 1;\r\n\t\t\r\n\t\t// A = new HashSet<Edge>(g.numVertices());\r\n\t\tQ = new LinkedList<Integer>();\r\n\t\tgOrig = g;\r\n\t}", "public static Graph<Integer,String> Copy(Graph<Integer,String> g){\n\t\r\n\t\tGraph<Integer,String> h = new SparseGraph<Integer,String>();\r\n\t\t\r\n\t\t// copy the vertex set\r\n\t\tIterator<Integer> a = g.getVertices().iterator();\r\n\t\twhile (a.hasNext()) {\r\n\t\t\th.addVertex(a.next());\r\n\t\t}\r\n\r\n\t\t// copy the edges\r\n\t\tIterator<Integer> c = g.getVertices().iterator();\r\n\t\twhile (c.hasNext()){\r\n\t\t\tInteger C = c.next();\r\n\t\t\tIterator<Integer> b = g.getVertices().iterator();\r\n\t\t\twhile (b.hasNext()) {\r\n\t\t\t\tInteger B = b.next();\r\n\t\t\t\tif (C < B) { // so it doesn't test duplicates\r\n\t\t\t\t\tif (g.isNeighbor(C, B)) h.addEdge(\"e\"+C+\"-\"+B, C, B);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn h;\r\n\t}", "public interface Graphing<T> {\n\n void paint(T shape);\n}", "private GraphPattern translateToGP(){\r\n\r\n\t\t//Generate the graph pattern object\r\n\t\tGraphPattern gp = new GraphPattern();\r\n\r\n\r\n\t\t//For each Node object, create an associated MyNode object\r\n\t\tint nodeCount = 0;\r\n\t\tfor (Node n : allNodes){\r\n\t\t\tMyNode myNode = new MyNode(nodeCount, \"PERSON\");\r\n\t\t\tnodesMap.put(n, myNode);\r\n\t\t\tgp.addNode(myNode);\r\n\r\n\t\t\tnodeCount++;\r\n\t\t}\r\n\r\n\t\t//For k random MyNodes add the id as an attribute/property.\r\n\t\t//This id is used for cypher queries.\r\n\t\t//This process uses simple random sampling\r\n\t\tif (rooted > allNodes.size()){\r\n\t\t\trooted = allNodes.size();\r\n\t\t}\r\n\r\n\t\tList<Node> allNodesClone = new ArrayList<Node>();\r\n\t\tallNodesClone.addAll(allNodes);\r\n\r\n\t\tfor (int i = 0; i < rooted; i++){\r\n\t\t\t//Pick a random node from allNodes and get it's corresponding MyNode\r\n\t\t\tint idx = random.nextInt(allNodesClone.size());\r\n\t\t\tNode node = allNodesClone.get(idx);\r\n\t\t\tMyNode myNode = nodesMap.get(node);\r\n\r\n\t\t\t//Add the property to myNode\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tmyNode.addAttribute(\"id\", node.getProperty(\"id\")+\"\");\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t\t//Remove the node from allNodesClone list.\r\n\t\t\tallNodesClone.remove(idx);\r\n\t\t}\r\n\r\n\t\t//Process the relationships\r\n\t\tint relCount = 0;\r\n\t\tString relPrefix = \"rel\";\r\n\r\n\t\tfor (Relationship r : rels){\r\n\r\n\t\t\tMyNode source = null, target = null;\r\n\t\t\tRelType type = null;\r\n\r\n\t\t\t//For each relationship in rels, create a corresponding relationship in gp.\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tsource = nodesMap.get(r.getStartNode());\r\n\t\t\t\ttarget = nodesMap.get(r.getEndNode());\r\n\t\t\t\ttype = GPUtil.translateRelType(r.getType());\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\r\n\t\t\tMyRelationship rel = new MyRelationship(source, target, type, relCount);\r\n\t\t\trelCount++;\r\n\r\n\t\t\tif (relCount >= 25){\r\n\t\t\t\trelCount = 0;\r\n\t\t\t\trelPrefix = relPrefix + \"l\";\r\n\t\t\t}\r\n\r\n\t\t\tgp.addRelationship(rel);\r\n\t\t\trelsMap.put(r, rel);\r\n\t\t}\r\n\r\n\t\t//Set the attribute requirements\r\n\t\tattrsReq(gp, true);\r\n\t\tattrsReq(gp, false);\r\n\t\treturn gp;\r\n\t}" ]
[ "0.5656938", "0.55794525", "0.5536063", "0.5267724", "0.5128911", "0.5112278", "0.50875145", "0.507589", "0.5043489", "0.5034376", "0.50182986", "0.50130695", "0.49737138", "0.49731046", "0.49512392", "0.49183172", "0.48968908", "0.48469037", "0.48438582", "0.48421225", "0.48398685", "0.483955", "0.48266047", "0.48265085", "0.47924885", "0.47912973", "0.47286028", "0.47187167", "0.47168612", "0.47110042", "0.4710836", "0.46959892", "0.4691291", "0.46848214", "0.46780384", "0.4676073", "0.46545038", "0.46451735", "0.4611205", "0.46017423", "0.45960432", "0.45945957", "0.4591785", "0.45800975", "0.45786047", "0.4573503", "0.45664594", "0.4566372", "0.45661852", "0.45542657", "0.45394638", "0.453879", "0.45320633", "0.4530615", "0.4530587", "0.45302114", "0.45190015", "0.4518842", "0.45173734", "0.45097736", "0.45057985", "0.45026872", "0.44997722", "0.44960812", "0.44874182", "0.4480266", "0.44789547", "0.44771925", "0.44771862", "0.44738254", "0.44698185", "0.4469717", "0.44604534", "0.44569448", "0.44528547", "0.44436252", "0.44433588", "0.44414347", "0.4431924", "0.44312295", "0.4431147", "0.44301283", "0.44300163", "0.44268012", "0.44198784", "0.4418952", "0.4416262", "0.44151363", "0.44125038", "0.44102353", "0.44087026", "0.44085786", "0.4406628", "0.4406312", "0.4403157", "0.4402422", "0.4400627", "0.43997502", "0.43992946", "0.4393704" ]
0.5625398
1
Constructor Takes and keeps a reference of the passed context in order to access to the application assets and resources.
ReligionHelper(Context context) { super(context, DB_NAME, null, DB_VERSION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MediaWSDemoApplication(BundleContext context) {\n\t\ttheContext = context ;\n\t}", "public static synchronized void initialize(Context context) {\n instance.context = context;\n initInternal();\n }", "public void initializeContext(Context context) {\n this.context = context;\n }", "public S3Helper(Context context) {\n\n this.mContext = context;\n\n init();\n\n }", "public ImageLoader(Context contextSet)\n\t{\n\t\topts = new BitmapFactory.Options();\n\t\topts.inDither = false;\n\t\topts.inPurgeable = true;\n\t\topts.inInputShareable = true;\n\t\topts.inTempStorage = new byte[16 * 1024];\n\t\tpackageName = contextSet.getPackageName();\n\t\tres = contextSet.getResources();\n\t}", "protected void initialize(ExternalContext context)\n {\n }", "public void init(MailetContext context);", "public FileController(Context context){\n this.context=context;\n }", "public Builder(Activity context) {\n this.context = new WeakReference<>(context);\n this.imageConfig = new ImageConfig();\n }", "public static void init(@NonNull final Context context) {\n BlankjUtils.sApplication = (Application) context.getApplicationContext();\n }", "public MyApp() {\n sContext = this;\n }", "AndroidAppInterface(Context context) {\n this.mContext = context;\n }", "public ResourceController(final Context context) {\n this.context = context;\n //Subscribes to the listener so that the resources are redrawn whenever the player changes.\n context.getGameLogic().getPlayerManager().subscribePlayerChanged(new PlayerChangedListener() {\n @Override\n public void changed() {\n drawPlayerResources(Game.getInstance().getPlayerManager().getCurrentPlayer());\n }\n });\n }", "public Context() {\n }", "public ImageLoader(Context context) {\r\n this(context, false);\r\n }", "@Override\n public void start(BundleContext context) throws Exception {\n super.start(context);\n\n this.ctx = context;\n }", "void init(@NotNull ExecutionContext context);", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n context=getContext();\n\n }", "public SplashScreenModule(Context context) {\n super(context);\n Intrinsics.checkNotNullParameter(context, \"context\");\n }", "void init(HandlerContext context);", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\n mContext = c;\n }", "public void setContext(Context context) {\n this.contextMain = context;\n }", "public abstract ApplicationLoader.Context context();", "public static void initializeApp(Context context) {\n }", "WebAppInterface(Context c) {\r\n\t mContext = c;\r\n\t }", "public AsyncImageLoader(Context context)\n {\n thread = new Thread(runner);\n cache = new ImageCache(context);\n }", "Context createContext();", "Context createContext();", "Context context();", "Context context();", "public Game(Context context) {\n this.context = context;\n wagBitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.vogen);\n\n }", "public static void initialize(@Nullable Context context) {\n if (sInstance == null) {\n sInstance = new AndroidContext(context);\n }\n }", "private AppContext()\n {\n }", "private VolleySingleton(Context context){\n // Hacemos el contexto para todo el tiempo de vida de la aplicación, no solo para una sola actividad.\n mRequestQueue = Volley.newRequestQueue(context.getApplicationContext());\n\n }", "public ScriptContext(Context context, Scriptable global)\n\t{\n\t\tthis.context = context;\n\t\tthis.global = global;\n//\t\tSystem.out.println(\"Creating new ScriptContext \" + this);\n\t}", "public MovementsManager(Context context) {\n mResources = context.getResources();\n mOpenHelper = new CashFlowsOpenHelper(context);\n }", "private void init(Context context) {\n inflate(context, R.layout.file_uploader, this);\n m_zone = (LinearLayout)findViewById(R.id.file_uploader_zone);\n m_items = (LinearLayout)findViewById(R.id.file_uploader_items);\n m_zone.setTag(this);\n }", "public LiteRenderer(Context context) {\n this.context = context;\n }", "public Requirement(Context context) {\n this.context = context;\n }", "public static void initImageLoader(Context context) {\n\t}", "protected void setup(Context context) {}", "public NabtoAndroidAssetManager(Context context) {\n this.context = context;\n ApplicationInfo info = context.getApplicationInfo();\n\n nabtoHomeDirectory = new File(context.getFilesDir(), \"nabto\");\n nabtoResourceDirectory = new File(context.getFilesDir(), \"share/nabto\");\n nabtoNativeLibraryDirectory = new File(info.nativeLibraryDir);\n\n Log.d(this.getClass().getSimpleName(), \"Native lib dir: \" + getNabtoNativeLibraryDirectory());\n Log.d(this.getClass().getSimpleName(), \"App resource dir: \" + getNabtoResourceDirectory());\n Log.d(this.getClass().getSimpleName(), \"App dir: \" + getNabtoHomeDirectory());\n\n copyDirContentsToLocation(context.getAssets(), \"share\",\n new File(context.getFilesDir() + \"/share\"), false);\n }", "public AnimationView(Context context) {\n\t\tsuper(context);\n\t\tinitialize();\n\t}", "public WebAppInterface(Context c)\n {\n mContext = c;\n }", "public Location(Context context){\n//\t\tthis.context = context;\n\t\tinit(context);\n\t}", "public synchronized void init(ServletContext context) {\n if (velocityEngine == null) {\n velocityEngine = newVelocityEngine(context);\n }\n this.initToolbox(context);\n }", "public TurbolinksView(Context context) {\n super(context);\n init();\n }", "void setContext(Context context) {\n\t\tthis.context = context;\n\t}", "public Menu(Context context) {\r\n\t\tsuper(context);\r\n\t\tinit(context);\r\n\t\tthis.context = context;\r\n\t}", "public AudioService(Context context) {\n this.sharedPreferences = context.getSharedPreferences(\"SPOTIFY\", 0);\n queue = Volley.newRequestQueue(context);\n }", "public ActorHelper(Context context) {\n\t\tsuper();\n\t\tthis.context = context;\n\t\tactorDbAdapter = new ActorsDbAdapter(this.context);\n\t}", "public void setContext(Context context) {\n this.context = context;\n }", "@Override\r\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\r\n\t\tcontext=this;\r\n\t}", "public MovieComponent(WOContext context) {\n\t\tsuper(context);\n\t}", "private void init(Context context) {\n inflate(context, R.layout.file_uploader_item, this);\n m_thumbnail = (ImageView)findViewById(R.id.file_uploader_item_preview);\n m_removeButton = (Button)findViewById(R.id.file_uploader_delete);\n m_spinner = (ProgressBar)findViewById(R.id.file_uploader_icon_progress_bar);\n m_title = (TextView)findViewById(R.id.file_uploader_item_title);\n m_subTitle = (TextView)findViewById(R.id.file_uploader_item_subtitle);\n m_removeButton.setTag(this);\n }", "public ApplicationStub(final Context context) {\n super(context);\n }", "public Game_classes_init(Context context){\n game_class_init_context = context;\n\n init_game_classes();\n }", "AssetContextHandler getAssetContextHandler() {\n return assetContextHandler;\n }", "public CustomView(Context context) {\n this(context, null);\n init();\n }", "public ApplicationEvent(Application source, ServletContext context) {\n super(source);\n this.context = context;\n }", "public RadioLFW (Context context) {\n super(context);\n }", "private Assets (){}", "public Renderer(final Context activityContext) {\n mActivityContext = activityContext;\n\n }", "public static void initialize(Context ctx) {\n\t\tmContext = ctx;\n\t}", "public DatabaseHelper(Context context) {\n super(context, DATABASE_NAME, null, DATABASE_VERSION);\n this.context = context;\n res = context.getResources();\n }", "public Assets() {\n\t\tinit();\n\t}", "public StyleManager init(Context theContext) {\n\t\tmContext = theContext;\n\t\tfont = Typeface.createFromAsset(mContext.getAssets(),\n\t\t\t\t\"fonts/Chantelli_Antiqua.ttf\");\n\t\treturn this;\n\t}", "private void initContext() {\n contextId = System.getProperty(CONFIG_KEY_CERES_CONTEXT, DEFAULT_CERES_CONTEXT);\n\n // Initialize application specific configuration keys\n homeDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_HOME);\n debugKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_DEBUG);\n configFileKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONFIG_FILE_NAME);\n modulesDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MODULES);\n libDirsKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LIB_DIRS);\n mainClassKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MAIN_CLASS);\n classpathKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CLASSPATH);\n applicationIdKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_APP);\n logLevelKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LOG_LEVEL);\n consoleLogKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONSOLE_LOG);\n\n // Initialize default file and directory paths\n char sep = File.separatorChar;\n defaultRelConfigFilePath = String.format(\"%s/%s\", DEFAULT_CONFIG_DIR_NAME, configFileKey).replace('/', sep);\n defaultHomeConfigFilePath = String.format(\"${%s}/%s\", homeDirKey, defaultRelConfigFilePath).replace('/', sep);\n defaultHomeModulesDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_MODULES_DIR_NAME).replace('/', sep);\n defaultHomeLibDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_LIB_DIR_NAME).replace('/', sep);\n }", "public void setContext(Context _context) {\n context = _context;\n }", "public ImageLoader(Context context){\n fileCache=new FileCache(context);\n executorService=Executors.newFixedThreadPool(5);\n }", "@Override\r\n\tpublic void setContext(Context context) {\r\n\t\tthis.context = context;\r\n\t}", "public void setupContext(ServletContext context) {\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tmap.put(\"CURRENT_THEME\", Constants.CURRENT_THEME);\r\n\t\tmap.put(\"LOGGED_USER\", Constants.LOGGED_USER);\r\n\t\tmap.put(\"YES\", Constants.YES);\r\n\t\tmap.put(\"NO\", Constants.NO);\r\n\t\tmap.put(\"ACTION\", Constants.ACTION);\r\n\t\tmap.put(\"ACTION_ADD\", Constants.ACTION_ADD);\r\n\t\tmap.put(\"SECURE_FIELD\", Constants.SECURE_FIELD);\r\n\t\tmap.put(\"DEBUG_MODE\", Constants.isDebugMode());\r\n\t\tmap.put(\"SHOW_FLAT_COMMISSIONS\", \"false\");\r\n\r\n\t\tcontext.setAttribute(\"Constants\", map);\r\n\r\n\t}", "@Override\n public Context getContext() {\n return this.getApplicationContext();\n }", "public BackupManager(Context context) {\n this.context = context;\n dbOriginal = context.getDatabasePath(\"library_database.db\");\n databaseFolderPath = dbOriginal.getAbsolutePath().replace(\"library_database.db\", \"\");\n dbBackupDir = new File(databaseFolderPath + \"/backup\");\n\n time = new SimpleDateFormat(\"yyyy-MM-dd_HH:mm:ss\", Locale.getDefault()).format(new Date());\n standardCoverUrl = context.getApplicationInfo().dataDir + \"/files/covers/standard_cover.jpg\";\n }", "RenderingContext getContext();", "public AbstractBuilder(Context context)\n\t{\n\t\tthis.context = context;\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "public CommonStorage(Context context) {\r\n this.context = context;\r\n }", "Lab create(Context context);", "public static void initialize(Context context) {\n _db = new DatabaseHandler(context);\n }", "public ThingAdapter(Context context) {\n mInflater = LayoutInflater.from(context);\n this.context = context;\n }", "public abstract Context context();", "private HttpCache(@NonNull Context context) {\n mCache = new Cache(new File(context.getExternalCacheDir(), CacheConfig.FILE_DIR),\n CacheConfig.FILE_SIZE);\n }", "public void init(PageContext context) {\n request = (HttpServletRequest) context.getRequest();\n response = (HttpServletResponse) context.getResponse();\n session = context.getSession();\n application = context.getServletContext();\n out = context.getOut();\n }", "@Override\n public void onContext() {\n }", "public TaglibFactory(ServletContext ctx) {\n this.ctx = ctx;\n }", "public FightView(Context context) {\n super(context);\n this.context = context;\n instantiateVariables();\n }", "public static void init(Context context) {\n\t\tApplicationControl.context = context;\n\n\t\t// initialize file controller\n\t\tFileController.init();\n\t\t\n\t\t// load preferences\n\t\tPreferenceManager.setDefaultValues(context, R.xml.prefs, false);\n\n\t\t// initialize preferences\n\t\tprefs = PreferenceManager.getDefaultSharedPreferences(context);\n\n\t\t\n\t\t//initialize mark controller\n\t\tMarkController.init();\n\t\t\t\t\n\t\t// initialize sound controller\n\t\tSoundController.init(context);\n\n\t\t// initialize vibration controller\n\t\tVibration.init(context);\n\n\t\t// initialize game\n\t\treinit();\n\n\t\t// finally initialized\n\t\tisInit = true;\n\t}", "protected void setContext(RestContext context) throws ServletException {\n\t\tthis.context.set(context);\n\t}", "public static Context getResourceContext() {\n return context;\n }", "private ApplicationContext()\n\t{\n\t}", "public Functions(Context context){\r\n this.context=context;\r\n }", "Context getContext();", "public void attachBaseContext(Context context) {\n super.attachBaseContext(context);\n }", "public static Context getContext(){\n return appContext;\n }", "public void use(Context context)\n {\n useImplementation.use(context);\n }", "DatabaseController(Context context){\n helper=new MyHelper(context);\n }" ]
[ "0.69794756", "0.6741497", "0.66805387", "0.66426504", "0.66373855", "0.66357106", "0.6633204", "0.658124", "0.6427065", "0.6417985", "0.6412222", "0.6372571", "0.63521826", "0.63247746", "0.6321756", "0.63128287", "0.63061184", "0.628484", "0.6282229", "0.6278044", "0.6256038", "0.6256038", "0.6256038", "0.6249455", "0.6249455", "0.6246962", "0.62182754", "0.6206726", "0.6169416", "0.61672056", "0.6159012", "0.6159012", "0.6157347", "0.6157347", "0.61493117", "0.6132082", "0.6119347", "0.61046916", "0.6095508", "0.6084842", "0.6077368", "0.60582215", "0.60491216", "0.60333985", "0.603202", "0.6012138", "0.6006369", "0.59960777", "0.5995111", "0.59849524", "0.59823304", "0.59779006", "0.5976743", "0.5967866", "0.59601533", "0.5957519", "0.5949292", "0.59462655", "0.5940831", "0.59351134", "0.59326416", "0.59290785", "0.5911997", "0.59036654", "0.5897444", "0.5894175", "0.5891286", "0.5864636", "0.586046", "0.5860214", "0.58536875", "0.5850967", "0.58482134", "0.5848181", "0.5838828", "0.5824767", "0.58194846", "0.58171743", "0.58162427", "0.5813915", "0.58053523", "0.5801022", "0.5793184", "0.57854134", "0.57844806", "0.57843804", "0.5781533", "0.57804453", "0.5771111", "0.5771084", "0.57685256", "0.57671916", "0.57656676", "0.5764499", "0.576058", "0.5759969", "0.57586914", "0.57479423", "0.5745885", "0.5744115", "0.57424426" ]
0.0
-1
add file to zip
public AddFileToZip add(final File source) { return new AddFileToZip(source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addFileToZip(File file, Zipper z, SynchronizationRequest req) \n throws IOException {\n\n if (file.isFile()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addFileToZip(file, _out);\n } else if (file.isDirectory()) {\n z.setBaseDirectory(req.getTargetDirectory());\n z.addDirectoryToZip(file, _out);\n } else {\n assert false;\n }\n }", "private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException {\r\n final int BUFFER_SIZE = 1024;\r\n FileInputStream fis = new FileInputStream(file);\r\n // we want the zipEntry's path to be a relative path that is relative\r\n // to the directory being zipped, so chop off the rest of the path\r\n String zipFilePath = file.getCanonicalPath().substring(\r\n (directoryToZip.getCanonicalPath().length() - directoryToZip.getName().length()),\r\n file.getCanonicalPath().length());\r\n ZipEntry zipEntry = new ZipEntry(zipFilePath);\r\n zos.putNextEntry(zipEntry);\r\n byte[] bytes = new byte[BUFFER_SIZE];\r\n int length;\r\n while ((length = fis.read(bytes)) >= 0) {\r\n zos.write(bytes, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n }", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "private void addFile( ZipOutputStream output, File file, String prefix, boolean compress) throws IOException {\n //Make sure file exists\n long checksum = 0;\n if ( ! file .exists() ) {\n return ;\n }\n ZipEntry entry = new ZipEntry( getEntryName( file, prefix ) );\n entry .setTime( file .lastModified() );\n entry .setSize( file .length() );\n if (! compress){\n entry.setCrc(calcChecksum(file));\n }\n FileInputStream input = new FileInputStream( file );\n addToOutputStream(output, input, entry);\n }", "public void addFile(String fileName) throws FileNotFoundException,\r\n\t\t\tIOException {\r\n\t\tFileInputStream fis = new FileInputStream(fileName);\r\n\t\tint size = 0;\r\n\t\tbyte[] buffer = new byte[2048];\r\n\r\n\t\t// Ajouter une entree à l'archive zip\r\n\t\tFile file = new File(fileName);\r\n\t\tZipEntry zipEntry = new ZipEntry(file.getName());\r\n\t\tthis.zos.putNextEntry(zipEntry);\r\n\r\n\t\t// copier et compresser les données\r\n\t\twhile ((size = fis.read(buffer, 0, buffer.length)) > 0) {\r\n\t\t\tthis.zos.write(buffer, 0, size);\r\n\t\t}\r\n\r\n\t\tthis.zos.closeEntry();\r\n\t\tfis.close();\r\n\t}", "private void addLibrary(ZipOutputStream out, File file) throws IOException\n\t{\n\t\tString groupId = DEFAULT_LIBRARY_GROUPID; // FIXME\n\t\tString version = DEFAULT_LIBRARY_VERSION; // FIXME\n\t\tString artifactId = file.getName().substring(0, file.getName().lastIndexOf(\".\")); // remove file extension\n\t\t\n\t\tString fileName = \"/localrepo/\" + groupId + \"/\" + artifactId + \"/\" + version + \"/\" + artifactId + \"-\" + version + \".jar\";\n\n\t\tcreateZipEntry(out, fileName, Files.readAllBytes(Paths.get(file.getAbsolutePath())));\n\t}", "protected void attachFile(final File source, final String name) {\n try {\n final ZipEntry ze = new ZipEntry(name);\n _zip.putNextEntry(ze);\n final byte[] buffer = new byte[4096];\n try (FileInputStream in = new FileInputStream(source)) {\n int bytes;\n while ((bytes = in.read(buffer)) > 0) {\n _zip.write(buffer, 0, bytes);\n }\n }\n _zip.closeEntry();\n } catch (final IOException e) {\n throw new OpenGammaRuntimeException(\"Couldn't write \" + name + \" to ZIP file\", e);\n }\n }", "private static String createZipFile(String directory, String zipFilename, List<File> filesToAdd)\n throws IOException {\n String zipFilePath = String.format(\"%s/%s\", directory, zipFilename);\n File zipFile = new File(zipFilePath);\n if (zipFile.exists()) {\n if (zipFile.delete()) {\n log.info(\"Zipfile existed and was deleted: \" + zipFilePath);\n } else {\n log.warn(\"Zipfile exists but was not deleted: \" + zipFilePath);\n }\n }\n\n // Create and add files to zip file\n addFilesToZip(zipFile, filesToAdd);\n\n return zipFilePath;\n }", "void makeZip(String zipFilePath, String srcFilePaths[],\n\t\t\tMessageDisplay msgDisplay) {\n\t\t...\n\t\tfor (int i = 0; i < srcFilePaths.length; i++) {\n\t\t\tmsgDisplay.showMessage(\"Zipping \"+srcFilePaths[i]);\n\t\t\t//add the file srcFilePaths[i] into the zip file.\n\t\t\t...\n\t\t}\n\t}", "private static void recurseFiles(File file)\r\n throws IOException, FileNotFoundException\r\n {\r\n if (file.isDirectory()) {\r\n //Create an array with all of the files and subdirectories \r\n //of the current directory.\r\nString[] fileNames = file.list();\r\n if (fileNames != null) {\r\n //Recursively add each array entry to make sure that we get\r\n //subdirectories as well as normal files in the directory.\r\n for (int i=0; i<fileNames.length; i++){ \r\n \trecurseFiles(new File(file, fileNames[i]));\r\n }\r\n }\r\n }\r\n //Otherwise, a file so add it as an entry to the Zip file. \r\nelse {\r\n byte[] buf = new byte[1024];\r\n int len;\r\n //Create a new Zip entry with the file's name. \r\n\r\n\r\nZipEntry zipEntry = new ZipEntry(file.toString());\r\n //Create a buffered input stream out of the file \r\n\r\n\r\n//we're trying to add into the Zip archive. \r\n\r\n\r\nFileInputStream fin = new FileInputStream(file);\r\n BufferedInputStream in = new BufferedInputStream(fin);\r\n zos.putNextEntry(zipEntry);\r\n //Read bytes from the file and write into the Zip archive. \r\n\r\n\r\nwhile ((len = in.read(buf)) >= 0) {\r\n zos.write(buf, 0, len);\r\n }\r\n //Close the input stream. \r\n\r\n\r\n in.close();\r\n //Close this entry in the Zip stream. \r\n\r\n\r\n zos.closeEntry();\r\n }\r\n }", "public static void addToZip(String path, ZipOutputStream myZip, File f) throws FileNotFoundException, IOException{\n\t\tif(f.isDirectory()){\n\t\t\tfor(File subF : f.listFiles()){\n\t\t\t\taddToZip(path + File.separator + f.getName() , myZip, subF);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tZipEntry e = new ZipEntry(path + File.separator + f.getName());\n\t\t\tmyZip.putNextEntry(e);\n\t\t\ttry (InputStream is = new FileInputStream(f.getAbsolutePath())) {\n\t\t\t\tIOUtils.copyLarge(is, myZip);\n\t\t\t}\n\t\t}\n\t}", "public void zip(String directoryInZip, \n String filePath) throws Exception\n {\n File thisFile = new File(filePath);\n\n if (thisFile.exists()) {\n\n try {\n FileInputStream fi = new FileInputStream(thisFile);\n\n origin = new BufferedInputStream(fi, BUFFER);\n\n ZipEntry entry = new ZipEntry(directoryInZip + File.separator\n + thisFile.getName());\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + filePath + \" not found !!\", e);\n } catch (IOException e) {\n logger.error(\"Could not write to Zip File \", e);\n throw new Exception(\"Could not write to Zip File \", e);\n }\n\n } else {\n // Log message if file does not exist\n logger.info(\"File \" + thisFile.getName()\n + \" does not exist on file system\");\n\n } \t\t\n }", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "void makeZip(String zipFilePath, String srcFilePaths[], ZipMainFrame f) {\n ...\n for (int i = 0; i < srcFilePaths.length; i++) {\n f.setStatusBarText(\"Zipping \"+srcFilePaths[i]);\n //add the file srcFilePaths[i] into the zip file.\n ...\n }\n }", "protected void zipFile(File file, ZipOutputStream zOut, String vPath)\n throws IOException\n {\n if (!vPath.equalsIgnoreCase(\"WEB-INF/web.xml\")) {\n super.zipFile(file, zOut, vPath);\n } else {\n log(\"Warning: selected \"+archiveType+\" files include a WEB-INF/web.xml which will be ignored \" +\n \"(please use webxml attribute to \"+archiveType+\" task)\", Project.MSG_WARN);\n }\n }", "protected void createFile (ZipFile file, ZipEntry entry, File target)\n {\n if (_buffer == null) {\n _buffer = new byte[COPY_BUFFER_SIZE];\n }\n\n // make sure the file's parent directory exists\n File pdir = target.getParentFile();\n if (!pdir.exists() && !pdir.mkdirs()) {\n log.warning(\"Failed to create parent for '\" + target + \"'.\");\n }\n\n try (InputStream in = file.getInputStream(entry);\n FileOutputStream fout = new FileOutputStream(target)) {\n\n int total = 0, read;\n while ((read = in.read(_buffer)) != -1) {\n total += read;\n fout.write(_buffer, 0, read);\n updateProgress(total);\n }\n\n } catch (IOException ioe) {\n log.warning(\"Error creating '\" + target + \"': \" + ioe);\n }\n }", "public static void generateZip(File file) {\r\n\t\t\r\n\t\tFile zipfile=new File(file.toString().replaceAll(\".xlsx\",\".zip\" ));\r\n\t\tFileOutputStream fos=null;\r\n\t\tZipOutputStream zos=null;\r\n\t\tFileInputStream fin=null;\r\n\t\tZipEntry ze=null; \r\n\t\t\t\r\n\t\tif(!zipfile.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tzipfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//create ZipOutputStream to write to the zipfile\r\n fos=new FileOutputStream(zipfile);\r\n\t\t\t zos=new ZipOutputStream(fos);\r\n\t\t\t \r\n\t\t//add a new Zip Entry to the ZipOutPutStream \r\n\t\t\t ze=new ZipEntry(file.getName());\r\n\t\t\t zos.putNextEntry(ze);\r\n\t\t\t \r\n\t\t//read the file and write to the ZipOutPutStream\t \r\n\t\t\t fin=new FileInputStream(file);\r\n\t\t\t int i;\r\n\t\t\t \r\n\t\t\t while((i=fin.read())!=-1){\r\n\t\t\t\t zos.write(i);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(zos!=null && fos!=null && fin!=null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t //close the zip entry to write to to zip file\r\n\t\t\t\t\t\tzos.closeEntry();\r\n\t\t\t\t\t//close Resources.\t\r\n\t\t\t\t\t\tzos.close();\r\n\t\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tfin.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\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}\r\n\t\t}", "private void createZipEntry(ZipOutputStream out, String fileName, byte[] content) throws IOException\n\t{\n\t\tZipEntry entry = new ZipEntry(fileName);\n\t\tentry.setMethod(ZipEntry.DEFLATED);\n\t\tout.putNextEntry(entry);\n\t\tout.write(content);\n\t}", "public static ZipFile zip(File zip, File fileToAdd, String password)\r\n\t\t\tthrows ZipException {\n\t\tZipFile zipFile = new ZipFile(zip);\r\n\r\n\t\tZipParameters parameters = new ZipParameters();\r\n\t\tparameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\r\n\t\tparameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);\r\n\t\tif (!StringUtil.isEmpty(password)) {\r\n\t\t\tparameters.setEncryptFiles(true);\r\n\t\t\tparameters.setEncryptionMethod(Zip4jConstants.ENC_METHOD_STANDARD);\r\n\t\t\tparameters.setPassword(password);\r\n\t\t}\r\n\t\tzipFile.addFile(fileToAdd, parameters);\r\n\t\treturn zipFile;\r\n\t}", "public static void makeZip(String fileName)\r\n throws IOException, FileNotFoundException\r\n {\r\n File file = new File(fileName);\r\n zos = new ZipOutputStream(new FileOutputStream(file + \".zip\"));\r\n //Call recursion.\r\n\r\n\r\nrecurseFiles(file);\r\n //We are done adding entries to the zip archive,\r\n\r\n\r\n//so close the Zip output stream.\r\n\r\n\r\nzos.close();\r\n }", "private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);", "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "public void addFile(final String file);", "public CombineArchive (File zipFile)\n\t\tthrows IOException,\n\t\t\tJDOMException,\n\t\t\tParseException,\n\t\t\tCombineArchiveException\n\t{\n\t\tinit (zipFile, false);\n\t}", "private void addModule(ZipOutputStream out, File file) throws IOException\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (File f : file.listFiles())\n\t\t\t{\n\t\t\t\t// FIXME: remove MainModule.java\n\t\t\t\tif (!f.getName().equals(\"MainModule.java\"))\n\t\t\t\t{\n\t\t\t\t\taddModule(out, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString fileName = \"/src/main/java/modules/\" + file.getName();\n\t\t\t\n\t\t\tcreateZipEntry(out, fileName, Files.readAllBytes(Paths.get(file.getAbsolutePath())));\t\t}\n\t}", "private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) {\n\n\t\t// get sub-folder/files list\n\t\tFile[] files = fileSource.listFiles();\n\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\ttry {\n\t\t\t\tString name = files[i].getAbsolutePath();\n\t\t\t\tname = name.substring((int) sourceDir.getAbsolutePath().length());\n\t\t\t\t// if the file is directory, call the function recursively\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\taddDirectory(zout, files[i], sourceDir);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * we are here means, its file and not directory, so\n\t\t\t\t * add it to the zip file\n\t\t\t\t */\n\n\n\t\t\t\t// create object of FileInputStream\n\t\t\t\tFileInputStream fin = new FileInputStream(files[i]);\n\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\n\t\t\t\tIOUtils.copy(fin, zout);\n\t\t\t\t\n\t\t\t\tzout.closeEntry();\n\n\t\t\t\t// close the InputStream\n\t\t\t\tfin.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tioe.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "public void addDir(File dirObj, ZipOutputStream out) throws IOException {\n\t\t File[] files = dirObj.listFiles();\n\t\t byte[] tmpBuf = new byte[1024];\n\t\t for (int i = 0; i < files.length; i++) {\n\t\t if (files[i].isDirectory()) {\n\t\t addDir(files[i], out);\n\t\t continue;\n\t\t }\n\t \t FileInputStream in = new FileInputStream(files[i].getAbsolutePath());\n\t\t System.out.println(\" Adding: \" + files[i].getAbsolutePath());\n\t\t out.putNextEntry(new ZipEntry(files[i].getAbsolutePath()));\n\t\t int len;\n\t\t while ((len = in.read(tmpBuf)) > 0) { out.write(tmpBuf, 0, len); }\n\t\t out.closeEntry();\n\t\t in.close();\n\t\t }\n\t\t }", "private void addFilesToZip(List<File> files,String outputPath) throws IOException \r\n\t{\r\n\t\t// create a zip output stream\r\n\t\tString zipFileName = outputPath + File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\tOutputStreamWithLength chunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\t\tdouble totalBytesRead = 0L;\r\n\t\tint count = 10; \r\n\t\tfor(File file:files)\r\n\t\t{\r\n\t\t\t// reset the file index\r\n\t\t\tfileIndex = 0;\r\n\t\t\tString zipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\r\n\t\t\tif(file.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tZipEntry entry =new ZipEntry(zipEntryPath+\"/\");\r\n\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\t// add the current file to the zip\r\n\t\t\tZipEntry entry =new ZipEntry(zipEntryPath);\r\n\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\tbyte[] buffer = new byte[1024]; \t \r\n\r\n\t\t\tFileInputStream inputFileStream = new FileInputStream(file);\r\n\t\t\tint len; \r\n\t\t\twhile ((len = inputFileStream.read(buffer)) > 0) \r\n\t\t\t{ \r\n\t\t\t\tif((chunkedFile.getCurrentWriteLength() + len ) > maxSplitSize){\r\n\t\t\t\t\t// close current zip output stream\r\n\t\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\t\tzipOutputStream.finish();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset the write length\r\n\t\t\t\t\tchunkedFile.setCurrentWriteLength(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// create new zip output stream\r\n\t\t\t\t\tzipIndex += 1;\r\n\t\t\t\t\tzipFileName = outputPath+ File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\t\t\t\tchunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\t\t\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\r\n\t\t\t\t\t// add the current file to write remaining bytes\r\n\t\t\t\t\tzipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t\t\tentry = new ZipEntry(zipEntryPath);\r\n\t\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Show progress\r\n\t\t\t\ttotalBytesRead += len;\r\n\t\t\t\tdouble progress = totalBytesRead / totalBytes;\r\n\t\t\t\tif (progress*100 > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\ttotalBytesRead = 0L;\r\n\t\t\t\t\tcount += 10;\r\n\t\t\t\t\tSystem.out.println(\"Finished \" + count +\"%\");\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\tinputFileStream.close();\r\n\t\t}\r\n\r\n\t\tzipOutputStream.closeEntry();\r\n\t\tzipOutputStream.finish();\r\n\t}", "public static void zip(BasicShell shell, File archive, List<File> filesToZip) {\n\t\ttry {\n\t\t\tshell.printOut(\"Creating archive '\" + archive.getPath() + \"'.\");\n\t\t\tfinal BufferedOutputStream archiveStream = new BufferedOutputStream(new FileOutputStream(archive));\n\t\t\tZipOutputStream zipStream = new ZipOutputStream(archiveStream);\n\t\t\tzipStream.setLevel(7);\n\t\t\t\n\t\t\tString pwd = shell.pwd().getPath();\n\t\t\tfor ( File file : filesToZip) {\n\t\t\t\tString name = file.getPath();\n\t\t\t\tif (name.equals(pwd)) continue;\n\t\t\t\t\n\t\t\t\tif ( name.startsWith(pwd) ) {\n\t\t\t\t\tname = name.substring(pwd.length()+1);\n\t\t\t\t}\n\t\t\t\tZipEntry entry = new ZipEntry(name);\n\t\t\t\tzipStream.putNextEntry(entry);\n\t\t\t\tif ( file.isFile() ) {\n\t\t\t\t\tBufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(file));\n\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\tint count = fileStream.read(buffer);\n\t\t\t\t\twhile ( count > -1 ) {\n\t\t\t\t\t\tzipStream.write(buffer, 0, count);\n\t\t\t\t\t\tcount = fileStream.read(buffer);\n\t\t\t\t\t}\n\t\t\t\t\tfileStream.close();\n\t\t\t\t}\n\t\t\t\tshell.printOut(\"File '\" + entry.getName() + \"' added.\");\n\t\t\t}\n\t\t\tzipStream.close();\n\t\t} catch (Exception e) {\n\t\t\tshell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + \": \"+ e.getMessage());\n\t\t}\n\t}", "public static void zip(File destFile, File[] files) throws IOException {\n BufferedInputStream origin = null;\n FileOutputStream dest = new FileOutputStream(destFile);\n ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));\n out.setMethod(ZipOutputStream.DEFLATED);\n byte[] data = new byte[BUFFER_SIZE];\n for (int i = 0; i < files.length; i++) {\n if (log.isDebugEnabled()) {\n log.debug(\"Adding: \" + files[i].getName());\n }\n if (files[i].isDirectory()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Skipping directory: \" + files[i]);\n }\n continue;\n }\n FileInputStream fi = new FileInputStream(files[i]);\n origin = new BufferedInputStream(fi, BUFFER_SIZE);\n ZipEntry entry = new ZipEntry(files[i].getName());\n out.putNextEntry(entry);\n int count;\n while ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n }\n out.flush();\n out.close();\n }", "private String writeZipFile(File directoryToZip, List<File> fileList, String zipName) throws IOException{\r\n // If the zip name is null then provide the name of the directory\r\n if(zipName == null){\r\n zipName = directoryToZip.getName();\r\n }\r\n // Store the file name\r\n String fileName = zipName;\r\n // Create the zip file\r\n FileOutputStream fos = new FileOutputStream(fileName);\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n for (File file : fileList) {\r\n if (!file.isDirectory()) { // we only zip files, not directories\r\n // Add files that are not in the skip list\r\n if(!isFileToSkip(file.getName())) {\r\n addToZip(directoryToZip, file, zos);\r\n }\r\n }\r\n }\r\n zos.close();\r\n fos.close();\r\n // Return the full name of the file\r\n return fileName;\r\n }", "public static void writeZipOneFile(File directoryToZip, String fileName) {\r\n\t\ttry {\r\n\t\t\t//FileOutputStream fos = new FileOutputStream(directoryToZip.getName() + \".zip\");\r\n\t\t\tFileOutputStream fos = new FileOutputStream(directoryToZip +\"\\\\\"+ fileName.replace(\".xls\", \"\")+\".zip\");\r\n\t\t\tZipOutputStream zos = new ZipOutputStream(fos);\r\n\r\n\t\t\tFile file = new File(directoryToZip + \"\\\\\"+ fileName);\r\n\t\t\taddToZip(directoryToZip, file, zos);\r\n\r\n\t\t\tzos.close();\r\n\t\t\tfos.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public ZipFileWriter(String zipFile) throws FileNotFoundException {\r\n\t\tFileOutputStream fos = new FileOutputStream(zipFile);\r\n\t\t// ajout du checksum\r\n\t\tCheckedOutputStream checksum = new CheckedOutputStream(fos,\r\n\t\t\t\tnew Adler32());\r\n\t\tthis.zos = new ZipOutputStream(new BufferedOutputStream(checksum));\r\n\t}", "private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{\n try {\n output.putNextEntry(ze); \n } catch (ZipException zipEx) {\n //This entry already exists. So, go with the first one.\n input.close();\n return;\n }\n int numBytes = -1;\n while((numBytes = input.read(buffer)) > 0){\n output.write(buffer, 0, numBytes);\n }\n output.closeEntry();\n input.close();\n }", "public static void addFile(String filePath, String fileName, org.apache.tools.tar.TarOutputStream tarFile) throws IOException {\r\n // change to the path\r\n // File f = new File(filePath + \".\");\r\n // Create a buffer for reading the files\r\n byte[] buf = new byte[2048];\r\n // Compress the file\r\n FileInputStream in = new FileInputStream(filePath + fileName);\r\n // Add tar entry to output stream.\r\n File f = new File(filePath + fileName);\r\n TarEntry entry = new TarEntry(f);\r\n entry.setName(f.getName());\r\n //tarFile.writeEntry(entry, false);\r\n //tarFile.writeEntry(entry, false);\r\n tarFile.putNextEntry(entry);\r\n // Transfer bytes from the file to the tar file\r\n int len;\r\n while ((len = in.read(buf)) > -1) {\r\n //log.debug(\"len: \" + len + \" buf: \" + buf.toString());\r\n tarFile.write(buf, 0, len);\r\n }\r\n // Complete the entry\r\n tarFile.closeEntry();\r\n in.close();\r\n }", "public void link() throws Exception {\n ZipOutputStream output = new ZipOutputStream( new FileOutputStream( outfile ) );\n if ( compression ) {\n output .setMethod( ZipOutputStream .DEFLATED );\n output .setLevel( Deflater .DEFAULT_COMPRESSION );\n } else {\n output .setMethod( ZipOutputStream .STORED );\n }\n Enumeration merges = mergefiles .elements();\n while ( merges .hasMoreElements() ) {\n String path = (String) merges .nextElement();\n File f = new File( path );\n if ( f.getName().endsWith( \".jar\" ) || f.getName().endsWith( \".zip\" ) ) {\n //Do the merge\n mergeZipJarContents( output, f );\n }\n else {\n //Add this file to the addfiles Vector and add it \n //later at the top level of the output file.\n addAddFile( path );\n }\n }\n Enumeration adds = addfiles .elements();\n while ( adds .hasMoreElements() ) {\n String name = (String) adds .nextElement();\n File f = new File( name );\n if ( f .isDirectory() ) {\n //System.out.println(\"in jlink: adding directory contents of \" + f.getPath());\n addDirContents( output, f, f.getName() + '/', compression );\n }\n else {\n addFile( output, f, \"\", compression );\n }\n }\n if ( output != null ) {\n try {\n output .close();\n } catch( IOException ioe ) {}\n }\n }", "private static void createZipOrXmlFile(Document createdDocument) {\n if(attachmentList.size() > 0){\n File zipFile = new File(OUTPUT_ZIP_PATH);\n ZipOutputStream zipOutputStream = null;\n String fileName;\n byte[] decoded;\n\n try {\n zipOutputStream = new ZipOutputStream(new FileOutputStream(zipFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n for (Attachment attachment : attachmentList) {\n try {\n //create a new zip entry\n //add the zip entry and write the decoded data\n assert zipOutputStream != null;\n fileName = attachment.filename;\n decoded = attachment.data;\n ZipEntry imageOutputStream = new ZipEntry(ImportUtils.PHOTO_FILE_PATH + fileName);\n zipOutputStream.putNextEntry(imageOutputStream);\n zipOutputStream.write(decoded);\n\n } catch (IllegalArgumentException | IOException e) {\n e.printStackTrace();\n }\n }\n //add the xml after the attachments have been added\n ZipEntry xmlOutputStream = new ZipEntry(ImportUtils.GENERATED_XML_FILENAME);\n try {\n zipOutputStream.putNextEntry(xmlOutputStream);\n zipOutputStream.write(Entry.toBytes(createdDocument));\n //closing the stream\n //! not closing the stream can result in malformed zip files\n zipOutputStream.finish();\n zipOutputStream.flush();\n zipOutputStream.closeEntry();\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }else{\n //if no attachments found\n // add the xml file only\n OutputFormat format = OutputFormat.createPrettyPrint();\n try {\n OutputStream outputStream = new FileOutputStream(OUTPUT_XML_PATH);\n XMLWriter writer = new XMLWriter(outputStream, format);\n writer.write(createdDocument);\n } catch (IOException e ) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void zipFile(ZipFileDetails zipFileDetails) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "private static void createFiles(String destDirectory, ZipInputStream zipIn, ZipEntry entry, boolean recursive) throws IOException {\n\n String filePath = destDirectory + File.separator + entry.getName();\n\n if (!entry.isDirectory()) {\n\n boolean isZipFile = filePath.endsWith(\".zip\");\n boolean isJavaFile = filePath.endsWith(\".java\");\n\n if (isZipFile || isJavaFile) {\n\n writeFile(zipIn, filePath);\n\n if (recursive) {\n File file = new File(filePath);\n\n String parts[] = entry.getName().split(\"/\");\n String studentName;\n\n if (parts.length > 1) {\n studentName = parts[1].split(\"_\")[0];\n } else {\n studentName = entry.getName().split(\"_\")[0];\n }\n\n String studentDir = file.getParentFile().getAbsolutePath() + \"/\" + studentName;\n File dir = new File(studentDir);\n dir.mkdir();\n\n students.add(new Student(studentName, studentDir));\n\n unzip(filePath, studentDir, false, false);\n }\n }\n\n } else {\n File dir = new File(filePath);\n dir.mkdir();\n }\n }", "public static void m97139a(File file, ZipOutputStream zipOutputStream, String str) throws IOException {\n if (file.exists()) {\n if (file.isDirectory()) {\n String name = file.getName();\n if (!name.endsWith(File.separator)) {\n name = name + File.separator;\n }\n if (!TextUtils.isEmpty(str)) {\n name = str + name;\n }\n File[] listFiles = file.listFiles();\n if (listFiles == null || listFiles.length <= 0) {\n zipOutputStream.putNextEntry(new ZipEntry(name));\n zipOutputStream.closeEntry();\n return;\n }\n for (File file2 : listFiles) {\n m97139a(file2, zipOutputStream, name);\n }\n return;\n }\n zipOutputStream.putNextEntry(new ZipEntry(TextUtils.isEmpty(str) ? file.getName() : str + file.getName()));\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[4096];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read != -1) {\n zipOutputStream.write(bArr, 0, read);\n } else {\n zipOutputStream.flush();\n fileInputStream.close();\n zipOutputStream.closeEntry();\n return;\n }\n }\n } else {\n return;\n }\n throw th;\n }", "public AddFileToZip recursive() {\n\t\t\tthis.recursive = true;\n\t\t\treturn this;\n\t\t}", "private void addDirContents( ZipOutputStream output, File dir, String prefix, boolean compress ) throws IOException {\n String[] contents = dir .list();\n for ( int i = 0; i < contents .length; ++i ) {\n String name = contents[i];\n File file = new File( dir, name );\n if ( file .isDirectory() ) {\n addDirContents( output, file, prefix + name + '/', compress );\n }\n else {\n addFile( output, file, prefix, compress );\n }\n }\n }", "@Override\n public void addSingleFile(FileInfo file) {\n }", "protected File createZipArchive(File directoryToZip, String modpackName, String workspace) throws Exception {\n zipName = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\")) + \"--\" + modpackName + \".zip\";\n uploadStatus = \"Creating Zipfile from Directory\";\n File zipFile = new File(workspace + \"\\\\\" + zipName);\n try {\n ProgressBarLogic progressBarLogic = new ProgressBarLogic(directoryToZip);\n ZipUtil.pack(directoryToZip, zipFile, name -> {\n uploadStatus = \"Adding file: \" + name + \" to the zip\";\n progressBarLogic.progressPercentage = 0;\n progressBarLogic.progress.add(name);\n progressBarLogic.calculateProgress(progressBarLogic.progress);\n notifyObserver();\n return name;\n });\n } catch (ZipException e) {\n throw e;\n } catch (Exception e) {\n System.out.println(e);\n }\n return zipFile;\n }", "public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\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\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "public AddFileToZip path(final String path) {\n\t\t\tthis.path = path;\n\t\t\treturn this;\n\t\t}", "private static void writeFile(ZipInputStream zipIn, String filePath) throws IOException {\n\n String parent = filePath.replace(filePath.substring(filePath.lastIndexOf('/')), \"\");\n createParents(parent);\n\n BufferedOutputStream bos = null;\n\n try {\n bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n }", "public static void packToZip(String sourceDirPath, String zipFilePath) throws IOException {\n Path p;\n p = Files.createFile(Paths.get(zipFilePath));\n try (ZipOutputStream zs = new ZipOutputStream(Files.newOutputStream(p))) {\n Path pp = Paths.get(sourceDirPath);\n Files.walk(pp)\n .filter(path -> !Files.isDirectory(path))\n .forEach(path -> {\n if (!path.toString().endsWith(\".zip\")) {\n ZipEntry zipEntry = new ZipEntry(pp.relativize(path).toString());\n try {\n zs.putNextEntry(zipEntry);\n Files.copy(path, zs);\n zs.closeEntry();\n } catch (IOException e) {\n System.err.println(e);\n }\n }\n });\n }\n }", "public boolean ZipFile(String sSourceFilePath, String sDestinationZipFilePath, boolean bReplaceExisting) {\n byte[] buffer = new byte[30720];\n FileInputStream fin = null;\n FileOutputStream fout = null;\n ZipOutputStream zout = null;\n int length;\n String sZipEntryFileName = \"\";\n File objFile = null;\n try {\n //check for source file\n if (sSourceFilePath.trim().equalsIgnoreCase(\"\")) {\n throw new Exception(\"Invalid Source File : \" + sSourceFilePath);\n }\n objFile = new File(sSourceFilePath);\n if (!objFile.exists()) {\n throw new Exception(\"Source file not found : \" + sSourceFilePath);\n }\n\n //check for destination Zip file\n if (sDestinationZipFilePath.trim().equalsIgnoreCase(\"\") || sDestinationZipFilePath == null) {\n String stmp_Path = objFile.getAbsolutePath();\n String stmp_Name = objFile.getName();\n if (stmp_Name.contains(\".\")) { //check for removing extension\n int indx = 0;\n try {\n indx = stmp_Name.indexOf(\".\", stmp_Name.length() - 5);\n } catch (Exception e) {\n indx = 0;\n }\n if (indx <= 0) {\n indx = stmp_Name.length();\n }\n\n stmp_Name = stmp_Name.substring(0, indx);\n stmp_Name = stmp_Name + \".zip\";\n }\n sDestinationZipFilePath = stmp_Path + File.separator + stmp_Name;\n }\n\n objFile = new File(sDestinationZipFilePath);\n if (objFile.exists()) {\n if (bReplaceExisting) {\n objFile.delete();\n } else {\n throw new Exception(\"Destination ZipFile Already exists : \" + sDestinationZipFilePath);\n }\n }\n\n //Zipping File\n sZipEntryFileName = sSourceFilePath.substring(sSourceFilePath.lastIndexOf(\"\\\\\") + 1);\n fout = new FileOutputStream(sDestinationZipFilePath);\n zout = new ZipOutputStream(fout);\n fin = new FileInputStream(sSourceFilePath);\n zout.putNextEntry(new ZipEntry(sZipEntryFileName));\n while ((length = fin.read(buffer)) > 0) {\n zout.write(buffer, 0, length);\n }\n\n return true;\n\n } catch (Exception exp) {\n println(\"Src = \" + sSourceFilePath + \" : Dest = \" + sDestinationZipFilePath + \" : \" + exp.toString());\n return false;\n } finally {\n try {\n fin.close();\n } catch (Exception exp) {\n }\n try {\n zout.closeEntry();\n } catch (Exception exp) {\n }\n try {\n zout.close();\n } catch (Exception exp) {\n }\n }\n }", "public AddContentToZip path(final String path) {\n\t\t\tthis.path = path;\n\t\t\treturn this;\n\t\t}", "private String generateZipEntry(String file) {\n return file.substring(srcFolder.length() + 1, file.length());\n }", "private void mergeZipJarContents( ZipOutputStream output, File f ) throws IOException {\n //Check to see that the file with name \"name\" exists.\n if ( ! f .exists() ) {\n return ;\n }\n ZipFile zipf = new ZipFile( f );\n Enumeration entries = zipf.entries();\n while (entries.hasMoreElements()){\n ZipEntry inputEntry = (ZipEntry) entries.nextElement();\n //Ignore manifest entries. They're bound to cause conflicts between\n //files that are being merged. User should supply their own\n //manifest file when doing the merge.\n String inputEntryName = inputEntry.getName();\n int index = inputEntryName.indexOf(\"META-INF\");\n if (index < 0){\n //META-INF not found in the name of the entry. Go ahead and process it.\n try {\n output.putNextEntry(processEntry(zipf, inputEntry));\n } catch (ZipException ex){\n //If we get here, it could be because we are trying to put a\n //directory entry that already exists.\n //For example, we're trying to write \"com\", but a previous\n //entry from another mergefile was called \"com\".\n //In that case, just ignore the error and go on to the\n //next entry.\n String mess = ex.getMessage();\n if (mess.indexOf(\"duplicate\") >= 0){\n //It was the duplicate entry.\n continue;\n } else {\n //I hate to admit it, but we don't know what happened here. Throw the Exception.\n throw ex;\n }\n }\n InputStream in = zipf.getInputStream(inputEntry);\n int len = buffer.length;\n int count = -1;\n while ((count = in.read(buffer, 0, len)) > 0){\n output.write(buffer, 0, count);\n }\n in.close();\n output.closeEntry();\n }\n }\n zipf .close();\n }", "@Override\r\n protected void addPath(File path, int depth) throws SAXException {\r\n List<ZipEntry> contents = new ArrayList<ZipEntry>();\r\n if (depth > 0) {\r\n ZipFile zipfile = null;\r\n try {\r\n zipfile = new ZipFile(path, Charset.forName(\"UTF-8\"));\r\n Enumeration<? extends ZipEntry> entries = zipfile.entries();\r\n while (entries.hasMoreElements()) contents.add((ZipEntry)entries.nextElement());\r\n } catch (ZipException e) {\r\n throw new SAXException(e);\r\n } catch (IOException e) {\r\n throw new SAXException(e);\r\n } finally {\r\n if (zipfile != null) {\r\n try {\r\n zipfile.close();\r\n } catch (IOException e) {\r\n }\r\n }\r\n } // finally\r\n } // if depth > 0\r\n startNode(DIR_NODE_NAME, path);\r\n processZipEntries(contents, \"\", depth);\r\n endNode(DIR_NODE_NAME);\r\n }", "private static void writeToFileInZip2 (FileSystem zipFs, String[] data) throws IOException {\r\n\t\tFiles.write(zipFs.getPath(\"/newFile2.txt\"), Arrays.asList(data), Charset.defaultCharset(), StandardOpenOption.CREATE);\r\n\t}", "public void setupZipFile(String[] args) {\n\t\tif (args.length > 0) {\n\t\t\tif (!args[0].endsWith(\".zip\")) {\n\t\t\t\tthrow new IllegalArgumentException(\"zip file expected, but: \" + args[0]);\n\t\t\t}\n\t\t\tbuildDirectory = new File(\n\t\t\t\t\tgetBuildDirectory(),\n\t\t\t\t\tString.valueOf(System.currentTimeMillis()));\n\t\t\ttool_builddir = buildDirectory.toString();\n\t\t\tif (!buildDirectory.mkdirs()) {\n\t\t\t\tLoggedUtils.ignore(\"Unable to create directory \" + tool_builddir, null);\n\t\t\t}\n\t\t\tzipFile = args[0];\n\t\t} else if (requireZipArgument){\n\t\t\tthrow new IllegalArgumentException(\"zip file is expected as a first argument\");\n\t\t}\n\t}", "public static void createArchiveFile( final Configuration conf, final Path zipFile, final List<Path> files, int pathTrimCount, boolean isJar, Manifest jarManifest) throws IOException\r\n\t{\r\n\t\t\r\n\t\tFSDataOutputStream out = null;\r\n\t\tZipOutputStream zipOut = null;\r\n\t\t/** Did we actually write an entry to the zip file */\r\n\t\tboolean wroteOne = false;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tout = zipFile.getFileSystem(conf).create(zipFile);\r\n\t\t\tif (files.isEmpty()) {\r\n\t\t\t\treturn;\t/** Don't try to create a zip file with no entries it will throw. just return empty file. */\r\n\t\t\t}\r\n\t\t\tif (isJar) {\r\n\t\t\t\tif (jarManifest!=null) {\r\n\t\t\t\t\tzipOut = new JarOutputStream(out,jarManifest);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tzipOut = new JarOutputStream(out);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tzipOut = new ZipOutputStream(out);\r\n\t\t\t}\r\n\t\t\tfor ( Path file : files) {\r\n\t\t\t\tFSDataInputStream in = null;\r\n\t\t\t\t/** Try to complete the file even if a file fails. */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tFileSystem fileSystem = file.getFileSystem(conf);\r\n\t\t\t\t\tin = fileSystem.open(file);\r\n\t\t\t\t\tZipEntry zipEntry = new ZipEntry(pathTrim(file, pathTrimCount));\r\n\t\t\t\t\tzipOut.putNextEntry(zipEntry);\r\n\t\t\t\t\tIOUtils.copyBytes(in, zipOut, (int) Math.min(32768, fileSystem.getFileStatus(file).getLen()), false);\r\n\t\t\t\t\twroteOne = true;\r\n\t\t\t\t} catch( IOException e) {\r\n\t\t\t\t\tLOG.error( \"Unable to store \" + file + \" in zip file \" + zipFile + \", skipping\", e);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif (in!=null) {\r\n\t\t\t\t\t\ttry { in.close(); } catch( IOException ignore ) {}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally { /** Ensure everything is always closed before the function exits */\r\n\t\t\t\r\n\t\t\tif (zipOut!=null&&wroteOne) {\r\n\t\t\t\tzipOut.closeEntry();\r\n\t\t\t\tzipOut.flush();\r\n\t\t\t\tzipOut.close();\r\n\t\t\t\tout = null;\r\n\t\t\t}\r\n\t\t\tif (out!=null) {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public void addFile(FileDiffFile file) {\n \t\tfiles.add(file);\n \t}", "public static void extractAndSaveFile(ZipInputStream zip,\n \t\t\tFileOutputStream destinationFile) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zip);\n \t\tdestinationFile.write(out.toByteArray());\n \t\tout.close();\n \t\tdestinationFile.close();\n \t}", "private static void zipFolder(ZipOutputStream out, File folder) throws IOException {\n\n final int BUFFER = 2048;\n\n File[] fileList = folder.listFiles();\n BufferedInputStream origin;\n\n for (File file : fileList) {\n if (file.isDirectory()) {\n zipFolder(out, file);\n } else {\n byte data[] = new byte[BUFFER];\n\n String unmodifiedFilePath = file.getPath();\n FileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\n origin = new BufferedInputStream(fi, BUFFER);\n ZipEntry entry = new ZipEntry(file.getName());\n\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n\n out.closeEntry();\n origin.close();\n }\n }\n\n // Finish the zip stream and close it\n out.finish();\n out.close();\n }", "private void createJarFile(File target, Map<String, String> jarEntries) throws IOException\n {\n if (!target.exists())\n {\n target.createNewFile();\n }\n\n // Create the ZIP file\n try (ZipOutputStream out = new ZipOutputStream(new FileOutputStream(target)))\n {\n for (String entryName : jarEntries.keySet())\n {\n // Add ZIP entry to output stream at the given location.\n out.putNextEntry(new ZipEntry(entryName));\n // Write the file contents to this entry and close\n out.write(jarEntries.get(entryName).getBytes(Charset.defaultCharset()));\n out.closeEntry();\n }\n }\n }", "public ArchiveEntry addEntry (File baseDir, File file, URI format)\n\t\tthrows IOException\n\t{\n\t\tif (!file.exists ())\n\t\t\tthrow new IOException (\"file does not exist.\");\n\t\t\n\t\tif (!file.getAbsolutePath ().contains (baseDir.getAbsolutePath ()))\n\t\t\tthrow new IOException (\"file must be in basedir.\");\n\t\t\n\t\tString localName = file.getAbsolutePath ()\n\t\t\t.replace (baseDir.getAbsolutePath (), \"\");\n\t\t\n\t\treturn addEntry (file, localName, format, false);\n\t}", "public static void zip(File src, boolean includeSrc) throws IOException {\n\t\tzip(src, Charset.defaultCharset().name(), includeSrc);\n\t}", "public void addFile(File inFile) throws IOException {\n write(org.apache.commons.io.FileUtils.readFileToString(inFile, Charset.defaultCharset()));\n }", "public void startNewFile(String fileName, int sequenceNumber) throws Exception {\n\n try {\n \n \tif(sequenceNumber == 1)\n \t {\n \t // This is the first zip file for this data. \n \t // Just use the name passed in\n \t this.outputFileName = fileName;\n \t }\n \telse\n \t {\n \t\t// This is not the first zip file for this data\n \t\t// Append a number (e.g. _1 _2) to the file name\n \t\tint dotIndex = fileName.lastIndexOf('.');\n \t\tString beforeDot = fileName.substring(0, dotIndex);\n \t\toutputFileName=beforeDot+\"_part-\"+sequenceNumber+\".zip\";\n \t }\n \t\t\n \t// Add file to the list to be returned\n fileList.add(outputFileName); \t\n \t\n logger.debug(\"output file \" + outputFileName);\n\n FileOutputStream dest = new FileOutputStream(outputFileName);\n logger.debug(\"dest file \" + dest);\n this.out = new ZipOutputStream(new BufferedOutputStream(dest));\n\n\n // Set Default Compression level\n out.setLevel(ZipFiles.DEFAULT_COMPRESSION);\n out.setMethod(ZipOutputStream.DEFLATED);\n this.data = new byte[ZipFiles.BUFFER];\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + outputFileName + \" not found !!\", e);\n throw new Exception(\"File \" + outputFileName + \" not found !!\", e);\n }\n\n }", "public static void PackageArchive(File directoryName, File fileName) throws IOException\r\n {\r\n final String ARCHIVE_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-16\\\"?>\\n<archive major_version=\\\"0\\\" minor_version=\\\"1\\\" />\";\r\n\r\n TarArchiveWriter archive = new TarArchiveWriter(new GZIPOutputStream(new FileOutputStream(fileName)));\r\n\r\n // Create the archive.xml file\r\n archive.writeFile(\"archive.xml\", ARCHIVE_XML);\r\n\r\n // Add the assets\r\n File dir = new File(directoryName, ArchiveConstants.ASSETS_PATH);\r\n String[] files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.ASSETS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the objects\r\n dir = new File(directoryName, ArchiveConstants.OBJECTS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.OBJECTS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the terrain(s)\r\n dir = new File(directoryName, ArchiveConstants.TERRAINS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.TERRAINS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the parcels(s)\r\n dir = new File(directoryName, ArchiveConstants.LANDDATA_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.LANDDATA_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the setting(s)\r\n dir = new File(directoryName, ArchiveConstants.SETTINGS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.SETTINGS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n archive.close();\r\n }", "public void add(File file) {\n\t\tfiles.add(file);\n\t}", "public ArchiveEntry addEntry (File baseDir, File file, URI format,\n\t\tboolean mainEntry) throws IOException\n\t{\n\t\tif (!file.exists ())\n\t\t\tthrow new IOException (\"file does not exist.\");\n\t\t\n\t\tif (!file.getAbsolutePath ().contains (baseDir.getAbsolutePath ()))\n\t\t\tthrow new IOException (\"file must be in basedir.\");\n\t\t\n\t\tString localName = file.getAbsolutePath ()\n\t\t\t.replace (baseDir.getAbsolutePath (), \"\");\n\t\t\n\t\treturn addEntry (file, localName, format, mainEntry);\n\t}", "public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }", "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}", "public void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n final int BUFFER_SIZE = (int) 1e8;\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public SourceFile(File file) throws Exception {\r\n\t\t// this.file = file;\r\n\t\tthis.zipFile = new ZipFile(file, \"UTF-8\");\r\n\t}", "private static void addFile(File filedir) throws Exception {\n String fileName = getFileNameInput();\n File newFile = new File(filedir.toString() + \"\\\\\" + fileName);\n boolean fileAlreadyExists = newFile.exists();\n if (fileAlreadyExists) {\n throw new FileAlreadyExistsException(\"File already exists in current directory.\");\n } else {\n try {\n if (newFile.createNewFile()) {\n System.out.println(\"File created successfully\");\n } else {\n System.out.println(\"Something went wrong, please try again.\");\n }\n } catch (IOException e) {\n throw new IOException(e.getMessage());\n }\n }\n }", "public void addFile(String file) {\n files.add(file);\n }", "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException 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} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static boolean generateZipFile(ArrayList<String> sourcesFilenames, String destinationDir, String zipFilename){\n byte[] buf = new byte[1024]; \r\n\r\n try \r\n {\r\n // VER SI HAY QUE CREAR EL ROOT PATH\r\n boolean result = (new File(destinationDir)).mkdirs();\r\n\r\n String zipFullFilename = destinationDir + \"/\" + zipFilename;\r\n\r\n System.out.println(result);\r\n\r\n // Create the ZIP file \r\n ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFullFilename)); \r\n \r\n // Compress the files \r\n for (String filename: sourcesFilenames) { \r\n FileInputStream in = new FileInputStream(filename); \r\n // Add ZIP entry to output stream. \r\n File file = new File(filename); //\"Users/you/image.jpg\"\r\n out.putNextEntry(new ZipEntry(file.getName())); //\"image.jpg\" \r\n // Transfer bytes from the file to the ZIP file \r\n int len; \r\n while ((len = in.read(buf)) > 0) { \r\n out.write(buf, 0, len); \r\n } \r\n // Complete the entry \r\n out.closeEntry(); \r\n in.close(); \r\n } // Complete the ZIP file \r\n out.close();\r\n\r\n return true;\r\n } \r\n catch (Exception e) \r\n { \r\n System.out.println(e);\r\n return false;\r\n } \r\n }", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public static void writeZipFile(File directoryToZip, String fileName, List<File> fileList) {\r\n\t\ttry {\r\n\t\t\t//FileOutputStream fos = new FileOutputStream(directoryToZip.getName() + \".zip\");\r\n\t\t\tFileOutputStream fos = new FileOutputStream(directoryToZip +\"\\\\\"+ fileName+\".zip\");\r\n\t\t\tZipOutputStream zos = new ZipOutputStream(fos);\r\n\r\n\t\t\tfor (File file : fileList) {\r\n\t\t\t\tif (!file.isDirectory()) { // we only zip files, not directories\r\n\t\t\t\t\taddToZip(directoryToZip, file, zos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tzos.close();\r\n\t\t\tfos.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getMessage());\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@NonNull\n\t\tBuilder addFile(@NonNull String path);", "public void extractPackage(String zipPath, String destPath) throws IOException {\n File destDir = new File(destPath);\n if(!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));\n ZipEntry entry = zipIn.getNextEntry();\n while(entry != null) {\n String filePath = destPath+File.separator+entry.getName();\n //filePath = filePath.replaceAll(\" \",\"_\");\n if(!entry.isDirectory()) {\n Log.i(\"extract\",\"Package Name: \"+entry.getName());\n Log.i(\"extract\",filePath);\n String[] temp = entry.getName().split(\"\\\\.\");\n if(validExtension(temp[temp.length-1].toLowerCase())) {\n extractFile(zipIn,filePath);\n }\n //extractFile(zipIn,filePath);\n } else {\n File dir = new File(filePath);\n dir.mkdirs();\n }\n zipIn.closeEntry();;\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "private static void extract (Path zipPath, Path destination)\n\t\tthrows IOException\n\t{\n\t\tif (Files.isDirectory (zipPath))\n\t\t{\n\t\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t\t.newDirectoryStream (zipPath);)\n\t\t\t{\n\t\t\t\tfor (Path file : directoryStream)\n\t\t\t\t{\n\t\t\t\t\textract (file, destination);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPath fileOutZip = destination\n\t\t\t\t.resolve (\"./\" + zipPath.normalize ().toString ()).normalize ();\n\t\t\tFiles.createDirectories (fileOutZip.getParent ());\n\t\t\tFiles.copy (zipPath, fileOutZip, Utils.COPY_OPTION);\n\t\t}\n\t}", "@Override\n\t\tpublic void add(File explodedAar) {\n if (!isShared(explodedAar))\n files.addAll(getJars(explodedAar));\n\t\t}", "public static void zip(File src, File destDir, String charSetName, boolean includeSrc) throws IOException {\n\t\tString fileName = src.getName();\n\t\tif (!src.isDirectory()) {\n\t\t\tint pos = fileName.lastIndexOf(\".\");\n\t\t\tif (pos > 0) {\n\t\t\t\tfileName = fileName.substring(0, pos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfileName += \".zip\";\n\t\tensureDirectory(destDir);\n\t\t\n\t\tFile zippedFile = new File(destDir, fileName);\n\t\tif (!zippedFile.exists())\n\t\t\tzippedFile.createNewFile();\n\t\t\n\t\tzip(src, new FileOutputStream(zippedFile), charSetName, includeSrc);\n\t}", "public void readZip(File f) {\r\n try {\r\n unzip(f);\r\n File file = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File old = new File(workplace + \"/old\");\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n File files[] = file.listFiles();\r\n for(int i=0 ; i<files.length ; i++){\r\n readFile(files[i]);\r\n }\r\n //new session\r\n createSes(f);\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read zip file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n }\r\n }", "public ArchiveEntry addEntry (File toInsert, String targetName, URI format,\n\t\tboolean mainEntry) throws IOException\n\t{\n\t\ttargetName = prepareLocation (targetName);\n\t\t\n\t\tif (targetName.equals (MANIFEST_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + MANIFEST_LOCATION);\n\t\t\n\t\tif (targetName.equals (METADATA_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + METADATA_LOCATION);\n\t\t\n\t\t// we also do not allow files with names like metadata-[0-9]*.rdf\n\t\tif (targetName.matches (\"^/metadata-[0-9]*\\\\.rdf$\"))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file like metadata-[0-9]*.rdf\");\n\t\t\n\t\t// insert to zip\n\t\tPath insertPath = zipfs.getPath (targetName).normalize ();\n\t\tFiles.createDirectories (insertPath.getParent ());\n\t\tFiles.copy (toInsert.toPath (), insertPath, Utils.COPY_OPTION);\n\t\t\n\t\tArchiveEntry entry = new ArchiveEntry (this, insertPath, format);\n\t\tentries.put (entry.getFilePath (), entry);\n\t\t\n\t\tif (mainEntry)\n\t\t{\n\t\t\tLOGGER.debug (\"setting main entry:\");\n\t\t\taddMainEntry (entry);\n\t\t}\n\t\t\n\t\treturn entry;\n\t}", "public void addJARFolder() {\n btAddJARFolder().push();\n }", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "private static Vector addFiles(ZipOutputStream out, String target, String filter, boolean usePath, boolean recurse, Vector includeList) throws IOException {\r\n byte[] buf = new byte[1024];\r\n File[] fileList = null;\r\n File targetFile = new File(target);\r\n if (targetFile.isDirectory()) {\r\n fileList = targetFile.listFiles(); \r\n } else {\r\n fileList = new File[1];\r\n fileList[0] = new File(target);\r\n }\r\n if (fileList != null && fileList.length > 0) {\r\n for (int i=0; i<fileList.length; i++) {\r\n if (fileList[i].isFile()) {\r\n if (filter != null && filter.length() == 0) {\r\n if (!fileList[i].getName().endsWith(filter))\r\n continue;\r\n }\r\n FileInputStream in = new FileInputStream(fileList[i].getAbsolutePath());\r\n if (!usePath) {\r\n out.putNextEntry(new ZipEntry(fileList[i].getName()));\r\n } else {\r\n out.putNextEntry(new ZipEntry(fileList[i].getAbsolutePath()));\r\n }\r\n int len;\r\n while ((len = in.read(buf)) > 0) {\r\n out.write(buf, 0, len);\r\n }\r\n out.closeEntry();\r\n in.close();\r\n includeList.add(fileList[i].getAbsolutePath());\r\n } else if (fileList[i].isDirectory() && recurse) {\r\n includeList = ZipUtil.addFiles(out, fileList[i].getAbsolutePath(), filter, true, true, includeList);\r\n }\r\n }\r\n }\r\n return includeList;\r\n }", "@NonNull\n\t\tBuilder addFile(@NonNull Path path);", "public static void createFileToZip(BufferedImage image, String path, int name,ZipOutputStream zipOS) throws FileNotFoundException, IOException {\n //Create the jpeg image\n File f = new File(path+Integer.toString(name)+\".jpg\");\n //Create the inputstream\n FileInputStream fis = new FileInputStream(f);\n //Create a zipentry for the file we are gonna include to the zip\n ZipEntry zipEntry = new ZipEntry(path+Integer.toString(name)+\".jpg\");\n //Store the image into the zip as an array of bytes\n zipOS.putNextEntry(zipEntry);\n byte[] bytes = new byte[1024];\n int length;\n while ((length = fis.read(bytes)) >= 0) {\n zipOS.write(bytes, 0, length);\n }\n zipOS.closeEntry();\n fis.close();\n }", "public void addToJar(String name, File file, IProgressMonitor monitor) throws JarException\n\t{\n\t\ttry\n\t\t{\n\t\t\tInputStream content = new FileInputStream(file);\n\t\t\ttry\n\t\t\t{\n\t\t\t\taddToJar(name, content, monitor);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tcontent.close();\n\t\t\t\t}\n\t\t\t\tcatch (IOException e)\n\t\t\t\t{\n\t\t\t\t\tthrow (JarException) new JarException().initCause(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\tthrow (JarException) new JarException().initCause(e);\n\t\t}\n\t}", "public void addFile(String name, IDirectory parent) {\r\n // Create a new file\r\n File newFile = new File(name, (Directory) parent);\r\n ((Directory) parent).addItem(newFile);\r\n }", "@NonNull\n\t\tBuilder addFile(@NonNull File file);", "private static FileSystem openZip(Path zipPath) throws IOException, URISyntaxException{\n\t Map<String, String> providerProps = new HashMap<>();\r\n\t\tproviderProps.put(\"create\", \"true\");\r\n\t\t\r\n\t\t// Um ZipFiles zu erstellen benötigt man URIs, deswegen werden sie hier erstellt\r\n\t\tURI zipUri = new URI(\"jar:file\", zipPath.toUri().getPath(), null);\r\n\t\tFileSystem zipFs = FileSystems.newFileSystem(zipUri, providerProps); // Statische Methode wird hier angewendet\r\n\t\t\r\n\t\treturn zipFs;\r\n\t}" ]
[ "0.7833795", "0.76476216", "0.7411697", "0.71645886", "0.6952003", "0.6846795", "0.6657516", "0.6650822", "0.65793985", "0.65160924", "0.6499886", "0.64751124", "0.64541", "0.6421044", "0.6409519", "0.638558", "0.6377292", "0.6376992", "0.6352025", "0.6321199", "0.6297783", "0.6230713", "0.62102014", "0.61976224", "0.6185479", "0.61645293", "0.6157751", "0.61312896", "0.6121437", "0.61077887", "0.6102234", "0.60949314", "0.6047654", "0.6028065", "0.60198087", "0.6012462", "0.60013855", "0.5996866", "0.59957075", "0.5989983", "0.59695286", "0.5910048", "0.58955646", "0.5867323", "0.58533674", "0.58324164", "0.5830815", "0.580427", "0.57869303", "0.5777874", "0.57772166", "0.57728946", "0.57506764", "0.5740419", "0.5720557", "0.57142687", "0.57023466", "0.5694302", "0.5684312", "0.56666785", "0.56503415", "0.56503415", "0.56476223", "0.5608321", "0.5607695", "0.55535114", "0.5552454", "0.55494106", "0.5539256", "0.55366606", "0.5527736", "0.55215806", "0.5507577", "0.55019003", "0.5499977", "0.5457653", "0.54563975", "0.54490656", "0.5444333", "0.5425734", "0.54179496", "0.5411434", "0.5411086", "0.53891957", "0.5381253", "0.53717387", "0.5355018", "0.53540784", "0.5341651", "0.5317452", "0.5314301", "0.5306682", "0.52998364", "0.5292172", "0.52908915", "0.52894616", "0.5282844", "0.52822113", "0.5275367", "0.5267445" ]
0.68222564
6
Defines optional entry path.
public AddFileToZip path(final String path) { this.path = path; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Entry {\n\n /** The entry name separator as a string. */\n String SEPARATOR = ArchiveEntry.SEPARATOR;\n\n /** The entry name separator as a character. */\n char SEPARATOR_CHAR = ArchiveEntry.SEPARATOR_CHAR;\n\n /**\n * Denotes the entry name of the virtual root directory.\n * This name is used as the value of the <code>innerEntryName</code>\n * property if a <code>File</code> instance denotes an archive file.\n * <p>\n * This constant may be safely used for identity comparison.\n */\n String ROOT_NAME = \"\";\n}", "@Override\r\n public String getPath(boolean arg0) {\n return null;\r\n }", "public Object getEntryFilePath() {\n return this.entryFilePath;\n }", "private Entry createEntry(String pattern) {\n\t\tEntry entry = null;\n\n\t\tif (pattern != null) {\n\t\t\tString item = pattern.trim();\n\t\t\tif (item.length() > 0) {\n\t\t\t\tentry = new Entry();\n\t\t\t\tentry.result = !item.startsWith(\"-\");\n\t\t\t\tentry.partial = item.endsWith(\".\");\n\t\t\t\tentry.classpath = entry.result ? item : item.substring(1).trim();\n\t\t\t}\n\t\t}\n\t\treturn entry;\n\t}", "@Override\n\tpublic String getRealPath(String arg0) {\n\t\treturn null;\n\t}", "public static void setDefaultPath(String path) {\n\t\tPATH = path;\n\t}", "private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }", "@Override\n\tprotected String getPathSeparator() {\n\t\treturn null;\n\t}", "@Override\r\n public String getPath() {\n return null;\r\n }", "private void setDefaultPath(){\n\t\tdownloadPath = System.getProperty(\"user.home\") + File.separator + \"Downloads\" + File.separator;\n\t\tif(!downloadPath.endsWith(File.separator)){\n\t\t\tdownloadPath += File.separator;\n\t\t}\n\t\tcurrentPath.setText(downloadPath);\n\t\tcurrentPath.setToolTipText(downloadPath);\n\t}", "public HDInsightSparkActivity setEntryFilePath(Object entryFilePath) {\n this.entryFilePath = entryFilePath;\n return this;\n }", "public void setResourcePath(String path) {\n appPathField.setText(path != null ? path : \"\");\n }", "@Override protected void pathInit() {\r\n\r\n // place any initialization code here\r\n\r\n }", "@Override\n\t\tpublic String getPathInfo() {\n\t\t\treturn null;\n\t\t}", "public interface PathChooserHandler {\n\n /**\n * Invoked with the current entry's path property to use as a default value.\n * Implementations are expected to set the value back to this property when done.\n */\n void openChooser(Property<String> pathProperty);\n }", "public void testExtendsEntry() {\n final LinkerDef baseLinker = new LinkerDef();\n baseLinker.setEntry(\"foo\");\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n final String[] preArgs = getPreArguments(extendedLinker);\n assertEquals(\"-e\", preArgs[0]);\n assertEquals(\"foo\", preArgs[1]);\n }", "@Override\r\n public String getPath() {\n return null;\r\n }", "public Entry(DirCacheEntry aDCE, String aPath) { _entry = aDCE; _path = aPath; }", "@Override\n\tpublic String getEntryId() {\n\t\treturn null;\n\t}", "protected static void addEntryInList(String key, String entry) {\n if (hasEntryInList(key, entry))\n return ;\n\n String entries = getSPreference(key);\n if (TextUtils.isEmpty(entries))\n entries = entry;\n else\n entries = entries + \":\" + entry;\n\n setPreference(key, entries);\n }", "public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }", "public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }", "public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }", "public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }", "private static DataBaseEntry createEntry(String line) {\n int eq = line.indexOf(\"=\");\n if (eq < 0) {\n System.err.println(\"not found '=' in line \" + line);\n }\n int hash = line.indexOf(\"#\");\n if (hash < 0) {\n System.err.println(\"not found '#' in line \" + line);\n }\n String file = line.substring(0, eq);\n String cwd = line.substring(eq+1, hash);\n String compileString = line.substring(hash+1);\n \n CompileLineEntryBuilder builder = new CompileLineEntryBuilder(file);\n for (String option : splitCommandLine(compileString)) {\n builder.handle(option);\n }\n return builder.createDataBaseEntry();\n }", "public void buildPathPart(Appendable buffer, String uri) throws WebAppConfigurationException, IOException {\n buildPathPart(buffer, uri, null);\n }", "public Entry()\n {\n this(null, null, true);\n }", "private static boolean validateString(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n return prop != null && !\"\".equals(prop);\n }", "private static boolean validateFileExists(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n\n if (prop == null || \"\".equals(prop)) {\n return false;\n }\n\n return Files.exists(new File(prop).toPath());\n }", "public void addEntry(String key, ChoiceEntry entry){\n _entries.put(key, entry);\n }", "public void initPath() {\r\n\t\tpath = new Path();\r\n\t}", "@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}", "public String getPostPath(){\r\n\t\t \r\n\t\t String postPath = properties.getProperty(\"postPath\");\r\n\t\t if(postPath != null) return postPath;\r\n\t\t else throw new RuntimeException(\"postPath not specified in the configuration.properties file.\");\r\n\t }", "public void setEntryId(String entryId) {\n this.entryId = entryId;\n }", "public void add(FileSystemEntry entry);", "public void setEntryName(String ename);", "@Override\n public void setTplPath(String arg0) {\n\n }", "@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}", "public TEntry(FileSystem fileSystem, TPath path) {\n this(new TFileFactory(fileSystem), path);\n }", "public void setRing(String path);", "protected void setupRequestPathExp(StringBuilder sb, RomanticTransaction tx) {\n final String requestPath = tx.getRequestPath();\n if (requestPath != null) {\n sb.append(\", \").append(requestPath);\n }\n }", "public void registerConfigurationEntry(String key, Object entry);", "MountPoint findDefaultMountPoint(String relatedContentId, String handlerKey);", "private void handleCommandLineArgs(final String[] args) {\n if (args.length == 1) {\n final String value;\n if (args[0].startsWith(ToolArguments.MAP_FOLDER)) {\n value = getValue(args[0]);\n } else {\n value = args[0];\n }\n final File mapFolder = new File(value);\n if (mapFolder.exists()) {\n mapFolderLocation = mapFolder;\n } else {\n log.info(\"Could not find directory: \" + value);\n }\n } else if (args.length > 1) {\n log.info(\"Only argument allowed is the map directory.\");\n }\n // might be set by -D\n if (mapFolderLocation == null || mapFolderLocation.length() < 1) {\n final String value = System.getProperty(ToolArguments.MAP_FOLDER);\n if (value != null && value.length() > 0) {\n final File mapFolder = new File(value);\n if (mapFolder.exists()) {\n mapFolderLocation = mapFolder;\n } else {\n log.info(\"Could not find directory: \" + value);\n }\n }\n }\n }", "public void buildPathPartWithServletPath(Appendable buffer) throws WebAppConfigurationException, IOException {\n buildPathPart(buffer, null, false);\n }", "public String pathOfItem(Pathable item) {\n return null; // todo: implement this method\n }", "public MountRequest(String p){\n\t\tpath = p;\n\t}", "EntryNotFoundException() {\n super();\n }", "public void init(final WiktionaryEntry entry) {\n\t\tthis.entry = entry;\n\t\tentryId = entry.getId();\n\t}", "@Override\n\tpublic PathMatcher getPathMatcher(String arg0) {\n\t\treturn null;\n\t}", "private char[] getPath() {\n\t\treturn null;\n\t}", "public JournalEntryLine() {\n this(DSL.name(\"JOURNAL_ENTRY_LINE\"), null);\n }", "@Nullable String getPath();", "public Entry getEntry(String aPath)\n {\n if(getRepo()==null) return null;\n \n // Handle root special\n if(aPath.equals(\"/\")) return new Entry(null, aPath);\n \n // Get repository index and entry for path\n DirCache index = getIndex(); String path = aPath.substring(1);\n DirCacheEntry entry = index.getEntry(aPath.substring(1));\n boolean isDir = entry==null && index.getEntriesWithin(path).length>0;\n if(entry==null && !isDir) return null;\n \n // Create file for path and index entry\n return new Entry(entry, aPath);\n }", "public MyPathResource() {\r\n }", "public static PathAnchor none() {\n return None.INSTANCE;\n }", "private String appendToPath(String aBase, String aTail) {\n \t\t//initialise with most likely layout\n \t\tString dBase = aBase;\n \t\tString dTail = aTail;\n \n \t\tif (!aBase.endsWith(\"/\")) { //$NON-NLS-1$\n \t\t\tdBase = aBase + \"/\"; //$NON-NLS-1$\n \t\t}\n \n \t\tif (aTail.startsWith(\"/\")) { //$NON-NLS-1$\n \t\t\tdTail = aTail.substring(1);\n \t\t}\n \n \t\treturn dBase + dTail;\n \t}", "private void initPath() {\n this.IniFile = new IniFile();\n String configPath = this.getApplicationContext().getFilesDir()\n .getParentFile().getAbsolutePath();\n if (configPath.endsWith(\"/\") == false) {\n configPath = configPath + \"/\";\n }\n this.appIniFile = configPath + constants.USER_CONFIG_FILE_NAME;\n }", "public void buildPathPart(Appendable buffer, String uri, Boolean appendDirSep) throws WebAppConfigurationException, IOException {\n if (servletPath == null) {\n throw new IllegalStateException(\"Servlet path is unknown\");\n }\n appendPathPart(buffer, uri, appendDirSep,\n webSiteProps.isWebappPathPrefixUrlBuild() ? webSiteProps.getWebappPathPrefix()+servletPath : servletPath); // SCIPIO\n }", "public boolean isDir() { return _entry==null; }", "public FileSystemEntry getEntry(String path);", "public Builder setAddMountPoint(alluxio.proto.journal.File.AddMountPointEntry value) {\n if (addMountPointBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n addMountPoint_ = value;\n onChanged();\n } else {\n addMountPointBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000002;\n return this;\n }", "public void addUrlArg(String key, String value);", "protected void createHMetisInFilePath() {\n\t\tString file = \"\";\n\t\tfile += this.getRuntimeEnv().getOptionValue(PTArgString.OUTPUTDIR);\n\t\tfile += Utils.getFileSeparator();\n\t\tfile += \"TEMP_GRAPH_FILE.hgr\";\n\t\tthis.setHMetisInFile(file);\n\t}", "protected void addEntries() {\r\n\t\t// default is to do nothing;\r\n\t}", "private FileEntry() {\n // intentionally empty\n }", "private void setPathToRootOfPostVersionLists() {\n if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Text) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"text\");\n } else if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Code) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"code\");\n }\n }", "@Override\n\tpublic String getErrorPath() {\n\t\treturn null;\n\t}", "protected Modification handleEntry(List historyEntry) {\n // Ignore unusual labels of directories which cause parsing errors that \n // look like this:\n //\n // ***** built *****\n // Version 4\n // Label: \"autobuild_test\"\n // User: Etucker Date: 6/26/01 Time: 11:53a\n // Labeled\n if ((historyEntry.size() > 4) && \n (((String) historyEntry.get(4)).startsWith(\"Labeled\"))) {\n return null;\n }\n \n \t\tModification mod = new Modification();\n String nameAndDateLine = (String) historyEntry.get(2);\n \t\tmod.userName = parseUser(nameAndDateLine);\n \t\tmod.modifiedTime = parseDate(nameAndDateLine);\n \n String folderLine = (String) historyEntry.get(0);\n String fileLine = (String) historyEntry.get(3);\n \t\tif (fileLine.startsWith(\"Checked in\")) {\n \t\t\tmod.type = \"checkin\";\n \t\t\tmod.comment = parseComment(historyEntry);\n \t\t\tmod.fileName = folderLine.substring(7, folderLine.indexOf(\" *\"));\n \t\t\tmod.folderName = fileLine.substring(12);\n \t\t} else if (fileLine.endsWith(\"Created\")) {\n mod.type = \"create\";\n } else {\n \t\t\tmod.folderName = folderLine.substring(7, folderLine.indexOf(\" *\"));\n int lastSpace = fileLine.lastIndexOf(\" \");\n if ( lastSpace != -1 ) {\n mod.fileName = fileLine.substring(0, lastSpace);\n } else {\n mod.fileName = fileLine;\n }\n \n if (fileLine.endsWith(\"added\")) {\n \t\t\t\tmod.type = \"add\";\n \t\t\t} else if (fileLine.endsWith(\"deleted\")) {\n \t\t\t\tmod.type = \"delete\";\n \t\t\t} else if (fileLine.endsWith(\"recovered\")) {\n \t\t\t\tmod.type = \"recover\";\n \t\t\t} else if (fileLine.endsWith(\"shared\")) {\n mod.type = \"branch\";\n }\n \t\t}\n \n \t\tif (_propertyOnDelete != null && \"delete\".equals(mod.type)) {\n _properties.put(_propertyOnDelete, \"true\");\n \t\t}\n \n if (_property != null) {\n \t\t_properties.put(_property, \"true\");\n }\n \n return mod;\n \t}", "@Override\n\t\t\tpublic Set<java.util.Map.Entry<PathwayImpl, AnalysisResult>> entrySet() {\n\t\t\t\treturn null;\n\t\t\t}", "public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}", "public String getDisplayName(){return entryName;}", "@Override\r\n public MultivaluedMap<String, String> getPathParameters(boolean arg0) {\n return null;\r\n }", "public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }", "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 }", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public boolean addPathField(Document document, DetailedUrl dUrl, boolean withoutTargetOrExtension) {\n boolean result = false;\n\n if (dUrl != null) {\n final String path = dUrl.getPath(withoutTargetOrExtension);\n result = addField(document, path);\n }\n\n return result;\n }", "public static void generateEnvVarEntry(VarListEntryType entry,\n\t\t\t\t\t\t\t\t\t\t\tString name,\n\t\t\t\t\t\t\t\t\t\t\tString description,\n\t\t\t\t\t\t\t\t\t\t\tString shortOptionLetter) {\n\t\t// Term\n\t\tTermType term = DocbookFactory.eINSTANCE.createTermType();\n\t\tentry.getTerm().add(term);\n\t\tEnvarType envar = DocbookFactory.eINSTANCE.createEnvarType();\n\t\tFeatureMapUtil.addText(envar.getMixed(), name);\n\t\tterm.getEnvar().add(envar);\n\t\t\n\t\t// Listitem\n\t\tListitemType listitem = DocbookFactory.eINSTANCE.createListitemType();\n\t\tentry.setListitem(listitem);\n\t\tParaType para = DocbookFactory.eINSTANCE.createParaType();\n\t\tlistitem.getPara().add(para);\n\t\tString content = description + \".\";\n\t\tif ((shortOptionLetter != null) && !shortOptionLetter.equals(\"\")) {\n\t\t\tcontent += \" Overridden by the -\" + shortOptionLetter + \" option.\";\n\t\t}\n\t\tFeatureMapUtil.addText(para.getMixed(), content);\n\t}", "private void setAssetPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n assetPath_ = value;\n }", "public void addMapEntry(String entry, boolean isLast) {\n checkNotNull(entry);\n if (isLast) {\n addLine(entry);\n } else {\n addLine(entry + ',');\n }\n }", "String getDisplayableNodePath(String nodePath, boolean fallbackToHomePage) throws GWTJahiaServiceException;", "public String getQueryAppendPath(QueryInfo queryInfo) {\n int i = AnonymousClass1.$SwitchMap$com$miui$gallery$search$SearchConstants$SearchType[queryInfo.getSearchType().ordinal()];\n if (i == 1) {\n return \"suggestion\";\n }\n if (i != 2) {\n return null;\n }\n return \"search\";\n }", "@NotNull\n/* 52 */ public String getServerPath() { return this.myServerPath; }", "public synchronized String getPath(long entry) throws IOException,\n EOFException {\n long startOfEntry = IDX_START_OF_CONTENT + (entry * bytesPerSlot);\n idx.seek(startOfEntry);\n if (idx.readChar() == '\\n')\n throw new IllegalStateException(\"No data at address \" + entry);\n idx.skipBytes(bytesPerId + bytesPerType - 2);\n \n byte[] bytes = new byte[bytesPerPath];\n idx.read(bytes);\n String line = new String(bytes, \"utf-8\");\n int delimiter = line.indexOf('\\n');\n if (delimiter < 1)\n throw new IllegalStateException(\"Found path without delimiter\");\n return new String(bytes, 0, delimiter - 1);\n }", "public String putDefault(String key, String value) {\n return (String) defaultConfig.put(key, makePathAbsolute(key, value));\n }", "public void setPathSuffix(String pathSuffix);", "public boolean isClasspathEntry()\n {\n return m_classpath;\n }", "public void setDefEntryData(String defEntryData)\n\t{\n\t\tthis.defEntryData = Toolbox.trim(defEntryData, 55);\n\t}", "public void buildPathPartWithWebappPathPrefix(Appendable buffer) throws WebAppConfigurationException, IOException {\n buildPathPartWithWebappPathPrefix(buffer, null, false);\n }", "public void buildPathPartWithWebappPathPrefix(Appendable buffer, String uri) throws WebAppConfigurationException, IOException {\n buildPathPartWithWebappPathPrefix(buffer, uri, null);\n\n }", "public Entry(String n)\n {\n name = n;\n }", "@Override\r\n public URI getAbsolutePath() {\n return null;\r\n }", "public static void setHelpArgs(String root, String sub, String text) {\n\t\tif(!helpargs.containsKey(root)) return;\n\t\tif(helpargs.get(root) == null)\n\t\t{\n\t\t\t//create new hashmap\n\t\t\thelpargs.put(root, new HashMap<String, String>());\n\t\t}\n\t\t\n\t\thelpargs.get(root).put(sub, text);\n\t\tlast[0] = root;\n\t\tlast[1] = sub;\n\t}", "private Element createManifestEntry (String location, URI format,\n\t\tboolean mainEntry)\n\t{\n\t\tElement element = new Element (\"content\", Utils.omexNs);\n\t\telement.setAttribute (\"location\", location);\n\t\telement.setAttribute (\"format\", format.toString ());\n\t\tif (mainEntry)\n\t\t\telement.setAttribute (\"master\", \"\" + mainEntry);\n\t\treturn element;\n\t}", "@Override\r\n \tpublic File getLoadPath(String subArea) {\n \t\treturn null;\r\n \t}", "public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}", "private void setNote() {\n\t\tNoteOpt.add(\"-nd\");\n\t\tNoteOpt.add(\"/nd\");\n\t\tNoteOpt.add(\"notedetails\");\n\n\t}", "public Builder addPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensurePathIsMutable();\n path_.add(value);\n onChanged();\n return this;\n }", "public void directoryPathPrompt() {\n System.out.println(\"Enter a file path to export the PDF of the schedule to.\");\n }", "Path getMainCatalogueFilePath();", "java.lang.String getEntryNode();" ]
[ "0.5599062", "0.5584351", "0.5422554", "0.52847517", "0.5214141", "0.51012343", "0.50868493", "0.5043184", "0.502005", "0.49912852", "0.4983149", "0.49768338", "0.49649218", "0.49337634", "0.49223787", "0.491071", "0.49079615", "0.490515", "0.48931992", "0.48629138", "0.48374483", "0.48374483", "0.48374483", "0.48374483", "0.48321217", "0.48277405", "0.4754557", "0.47496063", "0.47486168", "0.47397697", "0.47318795", "0.47274804", "0.47228912", "0.47170633", "0.47017685", "0.4698611", "0.46852994", "0.46805504", "0.46735537", "0.4654781", "0.4654419", "0.4648865", "0.46357718", "0.46354213", "0.4630849", "0.4626711", "0.46251974", "0.46041495", "0.45858398", "0.45677027", "0.4566773", "0.4564426", "0.45632052", "0.45598745", "0.45527378", "0.45485663", "0.4539522", "0.45328426", "0.45249918", "0.45205143", "0.45204687", "0.45197338", "0.45170838", "0.45058146", "0.4500248", "0.44951758", "0.4492972", "0.44886956", "0.448486", "0.44839028", "0.44650543", "0.44649017", "0.4457303", "0.4456005", "0.44511998", "0.4442121", "0.44383776", "0.44378832", "0.4435798", "0.4435198", "0.44272035", "0.4424048", "0.4423133", "0.44228384", "0.44209817", "0.44176763", "0.4404686", "0.44034094", "0.43998626", "0.43953344", "0.43949407", "0.4391283", "0.4389287", "0.43853465", "0.43789282", "0.4372778", "0.43718553", "0.43684584", "0.43632016", "0.43617472", "0.43567237" ]
0.0
-1
Defines if folders content should be added. Ignored when used for files.
public AddFileToZip recursive() { this.recursive = true; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isFolder();", "public abstract boolean canCreate(FolderType type);", "private void addFolder(){\n }", "@java.lang.Deprecated boolean hasFolder();", "@Override\n public boolean isItFolder(String path) {\n Path file = new File(path).toPath();\n boolean isDirectory = Files.isDirectory(file); // Check if it's a directory\n return isDirectory;\n }", "void enableFolderCollectionPanel();", "@Override\n\tpublic boolean createFolder(String pathfolder) {\n\t\treturn eDao.createFolder(pathfolder);\n\t}", "@Override\n public boolean isDir() { return true; }", "public folderize() {\n }", "public void addFolder(Folder f) {\n folders.add(f);\n }", "public boolean\tisDirectory() {\r\n\t\treturn true ;\r\n\t}", "public boolean getSubfolders() {\n return this.subfolders;\n }", "public boolean setDataFolder() {\n UserPrefs prefs = UserPrefs.getUserPrefs();\n String warningMsg = LanguageManager.getString(\"4_3\");\n\n // Get the data path in the Text Field\n String dataRoot = tfDataPath.getText().trim();\n\n // Nothing there, so add default based on username - this is OK\n if(dataRoot.length() == 0) {\n dataRoot = DataFiler.getDefaultDataFolder(prefs.getUserName());\n prefs.putProperty(UserPrefs.DATA_ROOT, dataRoot);\n return true;\n }\n\n // Compare current datapath with previous one\n // If different check for existing data and warn user\n if(!existingDataPath.equalsIgnoreCase(dataRoot)) {\n String dataFile1 = DataFiler.addFileSepChar(dataRoot) + DataFiler.treeFolder + DataFiler.fileSepChar + DataFiler.dataFileName;\n // legacy of 1.1\n String dataFile2 = DataFiler.addFileSepChar(dataRoot) + \"ll_data\" + DataFiler.fileSepChar + DataFiler.dataFileName;\n if(DataFiler.fileExists(dataFile1) || DataFiler.fileExists(dataFile2)) {\n int result = JOptionPane.showConfirmDialog(this, warningMsg, LanguageManager.getString(\"4_4\"), JOptionPane.YES_NO_OPTION);\n if(result != JOptionPane.YES_OPTION) {\n // Put back to original path\n tfDataPath.setText(existingDataPath);\n return false;\n }\n else {\n // Set and reload\n prefs.putProperty(UserPrefs.DATA_ROOT, dataRoot);\n if(MainFrame.getInstance() != null) {\n DataFiler.reloadData();\n }\n return true;\n }\n }\n }\n\n // Changed\n prefs.putProperty(UserPrefs.DATA_ROOT, dataRoot);\n return true;\n }", "public void setSubfolders(boolean subfolders) {\n this.subfolders = subfolders;\n }", "public boolean isDirectory();", "public static boolean containsAcceptedDataObject(DataFolder folder) {\n DataObject[] children = folder.getChildren();\n DataObject[] folders = new DataObject[children.length];\n int i, foldersCount = 0;\n\n for (DataObject child : children) {\n if (child instanceof DataFolder) { \n folders[foldersCount++] = child;\n } else if (FactoryRegistry.hasFactory(child.getClass())) {\n return true;\n }\n }\n for (i = 0; i < foldersCount; i++) {\n if (containsAcceptedDataObject((DataFolder) children[i])) {\n return true;\n }\n }\n return false;\n }", "protected abstract String[] getBaseFolders();", "private GitLabFolderAuthorization(GitLabFolderACL acl) {\n this.folderACL = acl;\n }", "public boolean isDir() { return false; }", "private boolean setFolderProperty(PSPubServer server, IPSSite site, String publishFolderValue, Boolean isOwnServerSet,\n String ownServerVal, Boolean isDefaultServerSet)\n {\n String propertyValue = EMPTY;\n Boolean ownServer = false;\n\n String publishType = server.getPublishType();\n String serverType = server.getServerType();\n\n // Set the properties when the publish type is filesystem\n if (publishType.equalsIgnoreCase(PublishType.filesystem.toString()) || publishType.equalsIgnoreCase(PublishType.filesystem_only.toString()))\n {\n if(isDefaultServerSet)\n {\n propertyValue = siteDataService.getDefaultPublishingRoot(site, server.getPublishType(), Boolean.toString(isDefaultServerSet));\n }\n else if (isOwnServerSet)\n {\n //The property value is set from the ownServer value\n propertyValue = ownServerVal;\n ownServer = true;\n }\n }\n\n // Set the properties when the publish type is FTP or SFTP or FTPS\n if (publishType.equalsIgnoreCase(PublishType.ftp.toString()) || publishType.equalsIgnoreCase(PublishType.sftp.toString())\n || publishType.equalsIgnoreCase(PublishType.ftps.toString()) || publishType.equalsIgnoreCase(PublishType.ftps_only.toString())\n || publishType.equalsIgnoreCase(PublishType.ftp_only.toString()) || publishType.equalsIgnoreCase(PublishType.sftp_only.toString()))\n {\n if(isDefaultServerSet)\n {\n propertyValue = siteDataService.getDefaultPublishingRoot(site, server.getPublishType(), publishFolderValue);\n }\n else if (isOwnServerSet)\n {\n //The property value is set from the ownServer value\n propertyValue = publishFolderValue;\n ownServer = true;\n }\n }\n\n if (serverType.equalsIgnoreCase(\"STAGING\")\n && isDefaultServerSet\n && !StringUtils.containsIgnoreCase(propertyValue,\"Staging/Deployment\"))\n {\n propertyValue = propertyValue.replace(\"Deployment\", \"Staging\" + File.separator + \"Deployment\");\n }\n\n propertyValue = normalizePath(propertyValue);\n\n // Add the folder property to the server properties list\n String oldVal = server.getPropertyValue(IPSPubServerDao.PUBLISH_FOLDER_PROPERTY);\n server.addProperty(IPSPubServerDao.PUBLISH_FOLDER_PROPERTY, propertyValue);\n\n // Add the own server property to the server properties list\n server.addProperty(IPSPubServerDao.PUBLISH_OWN_SERVER_PROPERTY, ownServer.toString());\n\n return !propertyValue.equals(oldVal);\n }", "public abstract boolean isDirectory() throws AccessException;", "boolean hasDirName();", "public abstract boolean create(FolderType type) throws MessagingException;", "public static Boolean isDocumentFolderComp(String path){\n\t\tint s0 = path.indexOf(DOCUMENT_TOKEN); \n\t\tif ( path.indexOf(DOCUMENT_TOKEN) == -1){\n\t\t\treturn false;\n\t\t}else {\n\t\t\tString folder = path.replace(DOCUMENT_TOKEN, \"\");\n\t\t\tif (!isMetaFile(folder)) return false;\n\t\t\tif (folder == null || folder == \"\") return false;\n\t\t\tif (folder.indexOf(FILE_SEP) != -1) return false;\n\t\t\treturn true;\n\t\t}\n\t}", "@Test(dependsOnMethods=\"folderSearchTest\")\n public void testIsFolder() throws Exception\n {\n AdvanceSearchContentPage contentSearchPage = dashBoard.getNav().selectAdvanceSearch().render();\n folderSearchPage = contentSearchPage.searchLink(\"Folders\").render();\n folderSearchPage.inputName(\"Contracts\");\n FacetedSearchPage searchResults = contentSearchPage.clickSearch().render();\n Assert.assertTrue(searchResults.hasResults());\n Assert.assertTrue(searchResults.getResults().get(0).isFolder());\n }", "public synchronized boolean hasDraftsFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mDraftsFolderName);\n }", "public synchronized boolean hasArchiveFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mArchiveFolderName);\n }", "public void isfolder(File findfile){\n\t\tif(findfile.isDirectory()){\n\t\t\tSystem.out.println(findfile + \"is a directory\");\n\t\t\tString[] directoryContents = findfile.list();\n\t\t\tfor(int i = 0; i < directoryContents.length; i++){\n\t\t\t\tFile newpath = new File(findfile + \"/\" + directoryContents[i]);\n\t\t\t\tisfolder(newpath);\n\t\t\t\t\t\t\n\t\t\t}\n\t\t}else{\n\t\t\tHashmappDemo.addtoHashMap(findfile);\n\t\t}\n\t\t\n\t}", "@Override\n public boolean visit(String key, String value) {\n String[] parts = key.split(\"/\"); //$NON-NLS-1$\n StringBuilder f = new StringBuilder();\n for (int i = 0; i < parts.length; i++) {\n f.append(parts[i]);\n visitor.folder(f.toString());\n f.append(\"/\"); //$NON-NLS-1$\n }\n return true;\n }", "public synchronized boolean hasSentFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSentFolderName);\n }", "boolean hasDriveFolder();", "protected abstract String childFolderPath();", "protected abstract String[] getFolderList() throws IOException;", "private static boolean isDirectoryPlaceholder(final S3ObjectSummary objectSummary)\n {\n // Recognize \"standard\" directory place-holder indications used by Amazon's AWS Console and Panic's Transmit.\n if (objectSummary.getKey().endsWith(\"/\") && objectSummary.getSize() == 0) {\n return true;\n }\n\n // Recognize s3sync.rb directory placeholders by MD5/ETag value.\n if (\"d66759af42f282e1ba19144df2d405d0\".equals(objectSummary.getETag())) {\n return true;\n }\n\n // Recognize place-holder objects created by the Google Storage console or S3 Organizer Firefox extension.\n if (objectSummary.getKey().endsWith(\"_$folder$\") && objectSummary.getSize() == 0) {\n return true;\n }\n\n return false;\n }", "public boolean isDir() { return _entry==null; }", "public synchronized boolean hasSpamFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSpamFolderName);\n }", "private void actionAddFolder ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser folderChooser = new JFileChooser();\r\n\t\t\tfolderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\r\n\t\t\tint isFolderSelected = folderChooser.showOpenDialog(folderChooser);\r\n\r\n\t\t\tif (isFolderSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString folderPath = folderChooser.getSelectedFile().getPath();\r\n\r\n\t\t\t\tFile folderFileDescriptor = new File(folderPath);\r\n\t\t\t\tFile[] listFolderFiles = folderFileDescriptor.listFiles();\r\n\r\n\t\t\t\tString[] fileList = new String[listFolderFiles.length];\r\n\r\n\t\t\t\tfor (int i = 0; i < listFolderFiles.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfileList[i] = listFolderFiles[i].getPath();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tDataController.scenarioOpenFolder(fileList);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public List<Folder> getAllFolders() {\r\n\t\ttry {\r\n\t\t\t// Init our list of folders and start off with the default folder\r\n\t\t\tList<Folder> folders = new LinkedList<Folder>();\r\n\t\t\tfolders.addAll(Arrays.asList(store.getDefaultFolder().list()));\r\n\t\t\t\r\n\t\t\t// The following loop is repeated as long as there are subfolders in\r\n\t\t\t// our current folder. This is done by checking if the folders list\r\n\t\t\t// size has been increased since the last loop run, i.e. if new folders\r\n\t\t\t// have been added. Each run adds a new sub-layer of folders.\r\n\t\t\tint currentListSize = 0;\r\n\t\t\tint currentNewIndex = 0;\r\n\t\t\tdo {\r\n\t\t\t\tcurrentNewIndex = currentListSize;\r\n\t\t\t\tcurrentListSize = folders.size();\r\n\t\t\t\t\r\n\t\t\t\t// First save the new found folders and then add them to our folders\r\n\t\t\t\t// list. This can't be done at the same time as it leads to a \r\n\t\t\t\t// ConcurrentModificationException.\r\n\t\t\t\tList<Folder> foldersToAdd = new LinkedList<Folder>();\r\n\t\t\t\tfor (int index = currentNewIndex; index < folders.size(); index++) {\r\n\t\t\t\t\t// If folder cannot hold folders don't look for\r\n\t\t\t\t\tif ((folders.get(index).getType() & Folder.HOLDS_FOLDERS) != 0) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tfoldersToAdd.addAll(Arrays.asList(folders.get(index).list()));\r\n\t\t\t\t}\r\n\t\t\t\tfolders.addAll(foldersToAdd);\r\n\t\t\t} while (currentListSize < folders.size());\r\n\t\t\t\r\n\t\t\t// Take only folders that can contain mails\r\n\t\t\tfolders = Lists.newLinkedList(Iterables.filter(folders, new Predicate<Folder>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic boolean apply(Folder folder) {\r\n\t\t\t\t\tboolean containsMessages = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcontainsMessages = (folder.getType() & Folder.HOLDS_MESSAGES) != 0;\r\n\t\t\t\t\t} catch (MessagingException e) {\r\n\t\t\t\t\t\tLog.error(e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn containsMessages;\r\n\t\t\t\t}\r\n\t\t\t}));\r\n\t\t\t\r\n\t\t\treturn folders;\r\n\t\t} catch (MessagingException e) {\r\n\t\t\t// Imposible to reach\r\n\t\t\tLog.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null; // Imposible\r\n\t}", "protected Folder(){\n\t super(\"Folder\");\n\t }", "private static boolean esDirectorio(String ruta) {\n\t\tboolean b = false;\n\t\tFile f = new File(ruta);\n\t\tif (f.isDirectory()) {\n\t\t\tb = true;\n\t\t}\n\t\treturn b;\n\t}", "public boolean hasDirName() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "private void defineLayout(IPageLayout layout) {\n String editorArea = layout.getEditorArea();\r\n\r\n IFolderLayout folder;\r\n\r\n // Place remote system view to left of editor area.\r\n folder = layout.createFolder(NAV_FOLDER_ID, IPageLayout.LEFT, 0.2F, editorArea);\r\n folder.addView(getRemoveSystemsViewID());\r\n\r\n // Place properties view below remote system view.\r\n folder = layout.createFolder(PROPS_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, NAV_FOLDER_ID);\r\n folder.addView(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n\r\n // Place job log explorer view below editor area.\r\n folder = layout.createFolder(JOB_LOG_EXPLORER_FOLDER_ID, IPageLayout.BOTTOM, 0.0F, editorArea);\r\n folder.addView(JobLogExplorerView.ID);\r\n\r\n // Place command log view below editor area.\r\n folder = layout.createFolder(CMDLOG_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, JobLogExplorerView.ID);\r\n folder.addView(getCommandLogViewID());\r\n\r\n layout.addShowViewShortcut(getRemoveSystemsViewID());\r\n layout.addShowViewShortcut(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n layout.addShowViewShortcut(getCommandLogViewID());\r\n\r\n layout.addPerspectiveShortcut(ID);\r\n\r\n layout.setEditorAreaVisible(false);\r\n }", "protected boolean criarPastaDocumento(Map<Object, Object> document,\r\n\t\t\tList<String> folders, Map<Object, Object> metadatas, String ext)\r\n\t\t\t\t\tthrows Exception {\r\n\r\n\t\tboolean error = false;\r\n\t\tObjectIdentity objIdentity = new ObjectIdentity(REPOSITORY_NAME);\r\n\r\n\t\tDataPackage dataPackage = new DataPackage();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tStringBuilder sPath = new StringBuilder();\r\n\r\n\t\t\tsPath.append(BAR_FOLDER);\r\n\r\n\t\t\tsPath.append(CABINET);\r\n\r\n\t\t\t// sPath.append(BAR_FOLDER);\r\n\r\n\t\t\t// sPath.append(FOLDER_LEVEL_2);\r\n\r\n\t\t\tString path = sPath.toString();\r\n\r\n\t\t\tDataObject folderObject = null;\r\n\r\n\t\t\tfor (String folder : folders) {\r\n\r\n\t\t\t\tpath = path.concat(BAR_FOLDER + folder);\r\n\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\t\t\tsb.append(String.format(DQL_SELECT_FOLDER, path));\r\n\r\n\t\t\t\tString dqlSelectFolder = sb.toString();\r\n\r\n\t\t\t\tList<DataObject> dataObjectFolder = getDataObjectsByDql(dqlSelectFolder);\r\n\r\n\t\t\t\tif (dataObjectFolder.size() == 0) {\r\n\r\n\t\t\t\t\tString containnerPath = path;\r\n\r\n\t\t\t\t\tcontainnerPath = containnerPath.replace(\r\n\t\t\t\t\t\t\tBAR_FOLDER + folder, EMPTY);\r\n\r\n\t\t\t\t\tString dqlCreateFolder = String.format(DQL_CREATE_FOLDER,\r\n\t\t\t\t\t\t\tfolder, containnerPath);\r\n\r\n\t\t\t\t\tInteger returnCreateFolder = executeQuery(dqlCreateFolder);\r\n\r\n\t\t\t\t\tif (returnCreateFolder == 1) {\r\n\r\n\t\t\t\t\t\tdataObjectFolder = getDataObjectsByDql(dqlSelectFolder);\r\n\r\n\t\t\t\t\t\tfolderObject = dataObjectFolder.get(0);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tthrow new Exception(String.format(ERROR_CREATE_FOLDER,\r\n\t\t\t\t\t\t\t\tfolder, containnerPath));\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tfolderObject = dataObjectFolder.get(0);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tDataObject docDataObj = null;\r\n\r\n\t\t\tif (document.containsKey(CHAVE_TIPO_DOCUMENTAL)) {\r\n\r\n\t\t\t\tdocDataObj = new DataObject(objIdentity,\r\n\t\t\t\t\t\tString.valueOf(document.get(CHAVE_TIPO_DOCUMENTAL)));\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_TIPO_DOCUMENTAL));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tPropertySet properties = new PropertySet();\r\n\r\n\t\t\tif (document.containsKey(CHAVE_ARQUIVO)) {\r\n\r\n\t\t\t\tproperties.set(TITLE,\r\n\t\t\t\t\t\t((File) document.get(CHAVE_ARQUIVO)).getName());\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_ARQUIVO));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// properties.set(A_CONTENT_TYPE, ext);\r\n\r\n\t\t\tif (null != metadatas && metadatas.size() > 0) {\r\n\r\n\t\t\t\tfor (Entry<Object, Object> metadata : metadatas.entrySet()) {\r\n\r\n\t\t\t\t\tlogger.info(INFO_CREATE_METADATA\r\n\t\t\t\t\t\t\t.concat(String.valueOf(metadata.getKey()))\r\n\t\t\t\t\t\t\t.concat(SPACE).concat(UNDERSCORE).concat(SPACE)\r\n\t\t\t\t\t\t\t.concat(String.valueOf(metadata.getValue())));\r\n\r\n\t\t\t\t\tproperties.set(String.valueOf(metadata.getKey()),\r\n\t\t\t\t\t\t\tmetadata.getValue());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tdocDataObj.setProperties(properties);\r\n\r\n\t\t\tdocDataObj.getContents().add(\r\n\t\t\t\t\tnew FileContent(((File) document.get(CHAVE_ARQUIVO))\r\n\t\t\t\t\t\t\t.getAbsolutePath(), PDF));\r\n\r\n\t\t\tObjectRelationship objRelationship = new ObjectRelationship();\r\n\r\n\t\t\tobjRelationship.setTarget(folderObject);\r\n\r\n\t\t\tobjRelationship.setName(Relationship.RELATIONSHIP_FOLDER);\r\n\r\n\t\t\tobjRelationship.setTargetRole(Relationship.ROLE_PARENT);\r\n\r\n\t\t\tdocDataObj.getRelationships().add(\r\n\t\t\t\t\tnew ObjectRelationship(objRelationship));\r\n\r\n\t\t\tdataPackage.addDataObject(docDataObj);\r\n\r\n\t\t\tRelationshipProfile relationProfile = new RelationshipProfile();\r\n\r\n\t\t\trelationProfile.setResultDataMode(ResultDataMode.REFERENCE);\r\n\r\n\t\t\trelationProfile.setTargetRoleFilter(TargetRoleFilter.ANY);\r\n\r\n\t\t\trelationProfile.setNameFilter(RelationshipNameFilter.ANY);\r\n\r\n\t\t\trelationProfile.setDepthFilter(DepthFilter.SPECIFIED);\r\n\r\n\t\t\trelationProfile.setDepth(2);\r\n\r\n\t\t\tOperationOptions operationOptions = new OperationOptions();\r\n\r\n\t\t\toperationOptions.setRelationshipProfile(relationProfile);\r\n\r\n\t\t\tString fileName = null;\r\n\r\n\t\t\tif (document.containsKey(CHAVE_NOME_ARQUIVO)) {\r\n\r\n\t\t\t\tfileName = (String) document.get(CHAVE_NOME_ARQUIVO);\r\n\r\n\t\t\t\tproperties.set(OBJECT_NAME, fileName);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\terror = true;\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_NOME_ARQUIVO));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(INFO_INICIACAO_OPERACAO);\r\n\r\n\t\t\tdataPackage = this.objectService.create(dataPackage,\r\n\t\t\t\t\toperationOptions);\r\n\r\n\t\t\tlogger.info(INFO_CREATED_FILE_EMC.concat(fileName));\r\n\r\n\t\t} catch (CoreServiceException e) {\r\n\r\n\t\t\terror = true;\r\n\t\t\tlogger.error(ERROR_REPOSITORIO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t} catch (ServiceException e) {\r\n\r\n\t\t\terror = true;\r\n\t\t\tlogger.error(ERROR_SERVICO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t}\r\n\r\n\t\treturn error;\r\n\t}", "public boolean hasFolders(@NonNull DocumentFile parent) {\n return countDocumentFiles(parent, null, true, false, true) > 0;\n }", "protected DataPackage createFolderAndDocument(Map<Object, Object> document,\tList<String> folders, Map<Object, Object> metadatas, String ext)\r\n\t\t\tthrows Exception {\r\n\r\n\t\tObjectIdentity objIdentity = new ObjectIdentity(REPOSITORY_NAME);\r\n\r\n\t\tDataPackage dataPackage = new DataPackage();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tStringBuilder sPath = new StringBuilder();\r\n\r\n\t\t\tsPath.append(BAR_FOLDER);\r\n\r\n\t\t\tsPath.append(CABINET);\r\n\r\n\t\t\t// sPath.append(BAR_FOLDER);\r\n\r\n\t\t\t// sPath.append(FOLDER_LEVEL_2);\r\n\r\n\t\t\tString path = sPath.toString();\r\n\r\n\t\t\tDataObject folderObject = null;\r\n\r\n\t\t\tfor (String folder : folders) {\r\n\r\n\t\t\t\tpath = path.concat(BAR_FOLDER + folder);\r\n\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\t\t\tsb.append(String.format(DQL_SELECT_FOLDER, path));\r\n\r\n\t\t\t\tString dqlSelectFolder = sb.toString();\r\n\r\n\t\t\t\tList<DataObject> dataObjectFolder = getDataObjectsByDql(dqlSelectFolder);\r\n\r\n\t\t\t\tif (dataObjectFolder.size() == 0) {\r\n\r\n\t\t\t\t\tString containnerPath = path;\r\n\r\n\t\t\t\t\tcontainnerPath = containnerPath.replace(\r\n\t\t\t\t\t\t\tBAR_FOLDER + folder, EMPTY);\r\n\r\n\t\t\t\t\tString dqlCreateFolder = String.format(DQL_CREATE_FOLDER,\r\n\t\t\t\t\t\t\tfolder, containnerPath);\r\n\r\n\t\t\t\t\tInteger returnCreateFolder = executeQuery(dqlCreateFolder);\r\n\r\n\t\t\t\t\tif (returnCreateFolder == 1) {\r\n\r\n\t\t\t\t\t\tdataObjectFolder = getDataObjectsByDql(dqlSelectFolder);\r\n\r\n\t\t\t\t\t\tfolderObject = dataObjectFolder.get(0);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tthrow new Exception(String.format(ERROR_CREATE_FOLDER,\r\n\t\t\t\t\t\t\t\tfolder, containnerPath));\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tfolderObject = dataObjectFolder.get(0);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tDataObject docDataObj = null;\r\n\r\n\t\t\tif (document.containsKey(CHAVE_TIPO_DOCUMENTAL)) {\r\n\r\n\t\t\t\tdocDataObj = new DataObject(objIdentity,\r\n\t\t\t\t\t\tString.valueOf(document.get(CHAVE_TIPO_DOCUMENTAL)));\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_TIPO_DOCUMENTAL));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tPropertySet properties = new PropertySet();\r\n\r\n\t\t\tif (document.containsKey(CHAVE_ARQUIVO)) {\r\n\r\n\t\t\t\tproperties.set(TITLE,\r\n\t\t\t\t\t\t((File) document.get(CHAVE_ARQUIVO)).getName());\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_ARQUIVO));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// properties.set(A_CONTENT_TYPE, ext);\r\n\r\n\t\t\tif (null != metadatas && metadatas.size() > 0) {\r\n\r\n\t\t\t\tfor (Entry<Object, Object> metadata : metadatas.entrySet()) {\r\n\r\n\t\t\t\t\tlogger.info(INFO_CREATE_METADATA\r\n\t\t\t\t\t\t\t.concat(String.valueOf(metadata.getKey()))\r\n\t\t\t\t\t\t\t.concat(SPACE).concat(UNDERSCORE).concat(SPACE)\r\n\t\t\t\t\t\t\t.concat(String.valueOf(metadata.getValue())));\r\n\r\n\t\t\t\t\tproperties.set(String.valueOf(metadata.getKey()),\r\n\t\t\t\t\t\t\tmetadata.getValue());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tdocDataObj.setProperties(properties);\r\n\r\n\t\t\tdocDataObj.getContents().add(\r\n\t\t\t\t\tnew FileContent(((File) document.get(CHAVE_ARQUIVO))\r\n\t\t\t\t\t\t\t.getAbsolutePath(), PDF));\r\n\r\n\t\t\tObjectRelationship objRelationship = new ObjectRelationship();\r\n\r\n\t\t\tobjRelationship.setTarget(folderObject);\r\n\r\n\t\t\tobjRelationship.setName(Relationship.RELATIONSHIP_FOLDER);\r\n\r\n\t\t\tobjRelationship.setTargetRole(Relationship.ROLE_PARENT);\r\n\r\n\t\t\tdocDataObj.getRelationships().add(\r\n\t\t\t\t\tnew ObjectRelationship(objRelationship));\r\n\r\n\t\t\tdataPackage.addDataObject(docDataObj);\r\n\r\n\t\t\tRelationshipProfile relationProfile = new RelationshipProfile();\r\n\r\n\t\t\trelationProfile.setResultDataMode(ResultDataMode.REFERENCE);\r\n\r\n\t\t\trelationProfile.setTargetRoleFilter(TargetRoleFilter.ANY);\r\n\r\n\t\t\trelationProfile.setNameFilter(RelationshipNameFilter.ANY);\r\n\r\n\t\t\trelationProfile.setDepthFilter(DepthFilter.SPECIFIED);\r\n\r\n\t\t\trelationProfile.setDepth(2);\r\n\r\n\t\t\tOperationOptions operationOptions = new OperationOptions();\r\n\r\n\t\t\toperationOptions.setRelationshipProfile(relationProfile);\r\n\r\n\t\t\tString fileName = null;\r\n\r\n\t\t\tif (document.containsKey(CHAVE_NOME_ARQUIVO)) {\r\n\r\n\t\t\t\tfileName = (String) document.get(CHAVE_NOME_ARQUIVO);\r\n\r\n\t\t\t\tproperties.set(OBJECT_NAME, fileName);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_NOME_ARQUIVO));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(INFO_INICIACAO_OPERACAO);\r\n\r\n\t\t\tdataPackage = this.objectService.create(dataPackage,\r\n\t\t\t\t\toperationOptions);\r\n\r\n\t\t\tlogger.info(INFO_CREATED_FILE_EMC.concat(fileName));\r\n\r\n\t\t} catch (CoreServiceException e) {\r\n\r\n\t\t\tlogger.error(ERROR_REPOSITORIO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t} catch (ServiceException e) {\r\n\r\n\t\t\tlogger.error(ERROR_SERVICO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t}\r\n\r\n\t\treturn dataPackage;\r\n\t}", "public void checkFolder() {\n String mPath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/ExoTest/\";\n mDir = new File(mPath);\n boolean isDirectoryCreated = mDir.exists();\n if (!isDirectoryCreated) {\n isDirectoryCreated = mDir.mkdir();\n }\n if (isDirectoryCreated) {\n // do something\\\n Log.d(\"Folder\", \"Already Created\");\n }\n }", "public boolean getStructureRequired() {\n // Get server.properties's contentTypeGroupingInCX key value\n String contentTypesGrouping = PSServer.getProperty(SERVER_PROP_GROUP_CONTENTTYPES);\n\n // If server.properties contentTypeGroupingInCX key value (\"true\" to\n // turn on and other\n // than true to turn off)is set then toggle the content type grouping\n // feature.\n if (contentTypesGrouping != null)\n return contentTypesGrouping.trim().equalsIgnoreCase(\"true\");\n else\n return false;\n }", "static boolean checkFolder(String folderName) {\n\n\t\tFile defaultDir = new File(folderName);\n\n\t\t// The file has to exist and is a directory (Not just a child file)\n\t\treturn (defaultDir.exists() && defaultDir.isDirectory());\n\n\t}", "private void addPackageDirFiles(WebFile aDir, List aList)\n{\n boolean hasNonPkgFile = false;\n for(WebFile child : aDir.getFiles())\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, aList);\n else hasNonPkgFile = true;\n if(hasNonPkgFile || aDir.getFileCount()==0) aList.add(aDir);\n}", "public String getFolder() {\r\n return folder;\r\n }", "public boolean process(DataWriter writer, Connection db, PropertyMapList mappings) throws SQLException {\n logger.info(\"ImportFolders-> Inserting folders\");\n boolean processOK = true;\n\n writer.setAutoCommit(true);\n\n processOK = ImportLookupTables.saveCustomLookupList(\n writer, db, mappings, \"moduleFieldCategoryLink\");\n if (!processOK) {\n return false;\n }\n\n //For each linkModuleId... get the categories and definitions to insert\n ArrayList moduleList = CustomFieldCategory.getModules(db);\n Iterator modules = moduleList.iterator();\n while (modules.hasNext()) {\n String thisModule = (String) modules.next();\n int moduleId = Integer.parseInt(thisModule);\n //Insert the category\n CustomFieldCategoryList categoryList = new CustomFieldCategoryList();\n categoryList.setLinkModuleId(moduleId);\n categoryList.setBuildResources(true);\n categoryList.buildList(db);\n processOK = mappings.saveList(writer, categoryList, \"insertCategory\");\n if (!processOK) {\n return false;\n }\n\n //Insert the category groups\n Iterator categories = categoryList.iterator();\n while (categories.hasNext()) {\n CustomFieldCategory thisCategory = (CustomFieldCategory) categories.next();\n processOK = mappings.saveList(writer, thisCategory, \"insertGroup\");\n if (!processOK) {\n return false;\n }\n\n ArrayList fieldLookup = new ArrayList();\n\n //Insert the fields\n Iterator groups = thisCategory.iterator();\n while (groups.hasNext()) {\n CustomFieldGroup thisGroup = (CustomFieldGroup) groups.next();\n processOK = mappings.saveList(writer, thisGroup, \"insertField\");\n if (!processOK) {\n return false;\n }\n\n //Insert the field lookup lists\n Iterator fields = thisGroup.iterator();\n while (fields.hasNext()) {\n CustomField thisField = (CustomField) fields.next();\n if (thisField.getType() == CustomField.SELECT) {\n\n //Stash this item id so we know it is a lookup for later\n fieldLookup.add(new Integer(thisField.getId()));\n\n thisField.buildElementData(db);\n Iterator lookupItems = ((LookupList) thisField.getElementData()).iterator();\n while (lookupItems.hasNext()) {\n LookupElement thisElement = (LookupElement) lookupItems.next();\n DataRecord thisRecord = new DataRecord();\n thisRecord.setName(\"customFieldLookup\");\n thisRecord.setAction(\"insert\");\n thisRecord.addField(\"tableName\", \"custom_field_lookup\");\n thisRecord.addField(\"uniqueField\", \"code\");\n thisRecord.addField(\"guid\", String.valueOf(thisElement.getCode()));\n\n thisRecord.addField(\"field\", \"field_id\");\n thisRecord.addField(\"data\", \"field_id=\" + String.valueOf(thisField.getId()), \"customField\", null);\n thisRecord.addField(\"type\", java.sql.Types.INTEGER);\n\n thisRecord.addField(\"field\", \"description\");\n thisRecord.addField(\"data\", thisElement.getDescription());\n thisRecord.addField(\"type\", java.sql.Types.VARCHAR);\n\n thisRecord.addField(\"field\", \"default_item\");\n thisRecord.addField(\"data\", String.valueOf(thisElement.getDefaultItem()));\n thisRecord.addField(\"type\", java.sql.Types.BOOLEAN);\n\n thisRecord.addField(\"field\", \"level\");\n thisRecord.addField(\"level\", String.valueOf(thisElement.getLevel()));\n thisRecord.addField(\"type\", java.sql.Types.INTEGER);\n\n processOK = writer.save(thisRecord);\n if (!processOK) {\n return false;\n }\n }\n }\n //NOTE: Could insert this field's data since the definition is needed,\n //but a record is needed\n }\n }\n\n //TODO: Test this with records...\n //Copy the actual data\n CustomFieldRecordList recordList = new CustomFieldRecordList();\n recordList.setLinkModuleId(moduleId);\n recordList.setCategoryId(thisCategory.getId());\n recordList.buildList(db);\n\n Iterator records = recordList.iterator();\n while (records.hasNext()) {\n CustomFieldRecord thisCFRecord = (CustomFieldRecord) records.next();\n DataRecord thisRecord = new DataRecord();\n thisRecord.setName(\"customFieldRecord\");\n thisRecord.setAction(\"insert\");\n thisRecord.addField(\n \"linkModuleId\", String.valueOf(thisCFRecord.getLinkModuleId()), \"moduleFieldCategoryLink\", null);\n switch (thisCFRecord.getLinkModuleId()) {\n case 1:\n thisRecord.addField(\n \"linkItemId\", String.valueOf(thisCFRecord.getLinkItemId()), \"account\", null);\n break;\n case 2:\n thisRecord.addField(\n \"linkItemId\", String.valueOf(thisCFRecord.getLinkItemId()), \"contact\", null);\n break;\n default:\n break;\n }\n thisRecord.addField(\n \"categoryId\", String.valueOf(thisCFRecord.getCategoryId()), \"customFieldCategory\", null);\n thisRecord.addField(\"guid\", String.valueOf(thisCFRecord.getId()));\n thisRecord.addField(\n \"entered\", ObjectUtils.getParam(thisCFRecord, \"entered\"));\n thisRecord.addField(\n \"enteredBy\", String.valueOf(thisCFRecord.getEnteredBy()), \"user\", null);\n thisRecord.addField(\n \"modified\", ObjectUtils.getParam(thisCFRecord, \"modified\"));\n thisRecord.addField(\n \"modifiedBy\", String.valueOf(thisCFRecord.getModifiedBy()), \"user\", null);\n thisRecord.addField(\n \"enabled\", ObjectUtils.getParam(thisCFRecord, \"enabled\"));\n processOK = writer.save(thisRecord);\n if (!processOK) {\n return false;\n }\n\n //TODO:For each record, add the field data\n CustomFieldDataList fieldList = new CustomFieldDataList();\n fieldList.setRecordId(thisCFRecord.getId());\n fieldList.buildList(db);\n Iterator fieldItems = fieldList.iterator();\n while (fieldItems.hasNext()) {\n CustomFieldData thisData = (CustomFieldData) fieldItems.next();\n DataRecord thisFieldRecord = new DataRecord();\n thisFieldRecord.setName(\"customFieldData\");\n thisFieldRecord.setAction(\"insert\");\n thisFieldRecord.addField(\n \"recordId\", String.valueOf(thisData.getRecordId()), \"customFieldRecord\", null);\n thisFieldRecord.addField(\n \"fieldId\", String.valueOf(thisData.getFieldId()), \"customField\", null);\n if (fieldLookup.contains(new Integer(thisData.getFieldId()))) {\n thisFieldRecord.addField(\n \"selectedItemId\", String.valueOf(\n thisData.getSelectedItemId()), \"customFieldLookup\", null);\n } else {\n thisFieldRecord.addField(\n \"selectedItemId\", String.valueOf(\n thisData.getSelectedItemId()));\n }\n thisFieldRecord.addField(\n \"enteredValue\", String.valueOf(thisData.getEnteredValue()));\n thisFieldRecord.addField(\n \"enteredNumber\", String.valueOf(thisData.getEnteredNumber()));\n thisFieldRecord.addField(\n \"enteredDouble\", String.valueOf(thisData.getEnteredDouble()));\n processOK = writer.save(thisFieldRecord);\n }\n }\n }\n\n if (!processOK) {\n return false;\n }\n }\n return true;\n }", "public boolean hasDirName() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public String getFolder() {\n return myFolder;\n }", "public boolean isContentAllow(Artefact artefact) {\r\n\t\t\tBoolean contentArtefact = (Boolean) contentMap.get(artefact.getTypeId());\r\n\t\t\treturn (contentArtefact == null) ? false : contentArtefact;\r\n\t\t}", "@Override\n public boolean isDirectory(File directory) {\n\treturn false;\n }", "public boolean createFolderInServerDir(String FolderName){\r\n File file = new File(serversDir, FolderName);\r\n if(file.exists()){\r\n Toast.makeText(mContext, \"server already exist\", Toast.LENGTH_SHORT).show();\r\n return false;\r\n }else{\r\n file.mkdirs();\r\n updateServerList();\r\n return true;\r\n }\r\n }", "Folder createFolder();", "public static boolean isProjectOrFolder(EntityType type){\r\n\t\treturn EntityType.project.equals(type)\r\n\t\t\t\t|| EntityType.folder.equals(type);\r\n\t}", "private static boolean visitModuleContentEntries(ModuleRootModel rootModel, RootVisitor visitor) {\n for (ContentEntry entry : rootModel.getContentEntries()) {\n VirtualFile rootFile = entry.getFile();\n\n if (rootFile != null && !visitor.visitRoot(rootFile, null, null, true)) return false;\n for (VirtualFile folder : entry.getSourceFolderFiles()) {\n if (!visitor.visitRoot(folder, rootModel.getModule(), null, true)) return false;\n }\n }\n return true;\n }", "interface WithFolderPath {\n /**\n * Specifies the folderPath property: The folder path of the source control. Path must be relative..\n *\n * @param folderPath The folder path of the source control. Path must be relative.\n * @return the next definition stage.\n */\n WithCreate withFolderPath(String folderPath);\n }", "public boolean getUseFiles();", "private Boolean isValid(MyFolder obj) {\n\t\tif (obj.getParentFolder().getAbsPath().equals(root.getAbsPath())) {\n\t\t\treturn true;\n\t\t}\n\t\tfor (MyFolder tmp : folders) {\n\t\t\tif (obj.getParentFolder().getAbsPath().equals(tmp.getAbsPath())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public List<Folder> getFolders() {\n return folders;\n }", "public boolean setupFileSystem() {\n\t\tboolean success = false;\n\t\tthis.root = Paths.get(\"\").toAbsolutePath();\n\t\tthis.showNamedMessage(\"Client root path set to: \" + this.root.toString());\n\t\t\n\t\tthis.fileStorage = root.resolve(fileStorageDirName);\n\t\tthis.showNamedMessage(\"File storage set to: \" + this.fileStorage.toString());\n\n\t\ttry {\n\t\t\tFiles.createDirectory(fileStorage);\n\t\t\tthis.showNamedMessage(\"File storage directory did not exist:\"\n\t\t\t\t\t+ \" created \" + fileStorageDirName + \" in client root\"); \n\t\t} catch (java.nio.file.FileAlreadyExistsException eExist) {\n\t\t\tthis.showNamedMessage(\"File storage directory already exist:\"\n\t\t\t\t\t+ \" not doing anything with \" + fileStorageDirName + \" in client root\");\n\t\t} catch (IOException e) {\n\t\t\tthis.showNamedError(\"Failed to create file storage:\"\n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\n\t\tsuccess = true;\n\t\treturn success;\n\t}", "@Override\n public boolean accept(File pathname) {\n\n if(pathname.isDirectory()) {\n \n String subDir = this.getRelativePath(pathname.getPath());\n \n if(subDir != null) {\n\n PageList subList = new PageList(this);\n \n // populates this list\n subList.setDir(subDir);\n\n this.addAll(subList);\n }\n }else{\n \n boolean accept = this.acceptFilename(pathname.getName());\n \n if(accept) {\n this.addFile(pathname);\n }\n }\n \n return false;\n }", "private static ArrayList<Folder> hiddenFolders(Context context) {\n final String FILE_TYPE_NO_MEDIA = \".nomedia\";\n\n ArrayList<Folder> listOfHiddenFiles = new ArrayList<>();\n\n String nonMediaCondition = MediaStore.Files.FileColumns.MEDIA_TYPE\n + \"=\" + MediaStore.Files.FileColumns.MEDIA_TYPE_NONE;\n\n String where = nonMediaCondition + \" AND \"\n + MediaStore.Files.FileColumns.TITLE + \" LIKE ?\";\n\n String[] params = new String[]{\"%\" + FILE_TYPE_NO_MEDIA + \"%\"};\n\n Cursor cursor = context.getContentResolver().query(\n MediaStore.Files.getContentUri(\"external\"),\n new String[]{MediaStore.Files.FileColumns._ID,\n MediaStore.Files.FileColumns.DATA,\n MediaStore.Files.FileColumns.DISPLAY_NAME},\n where,\n params, null);\n\n // No Hidden file found\n if (cursor.getCount() == 0) {\n // showAll Nothing Found\n return listOfHiddenFiles;\n }\n\n ArrayList<File> ids = new ArrayList<>();\n\n // Add Hidden file name, path and directory in file object\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(MediaStore.Files.FileColumns._ID));\n\n Uri vidUri = Uri.withAppendedPath(MediaStore.Files.getContentUri(\"external\"), id);\n File file = new File(getRealPathFromHiddenURI(context, vidUri)).getParentFile();\n //Log.d(\"MEME\", file.getAbsolutePath());\n\n if (!ids.contains(file)) {\n ids.add(file);\n\n checkAndAddFolder(file, listOfHiddenFiles, true);\n }\n }\n cursor.close();\n\n return listOfHiddenFiles;\n }", "private void processFolders(List<File> folderList, java.io.File parentFolder) {\n // process each folder to see if it needs to be updated;\n for (File f : folderList) {\n String folderName = f.getTitle();\n java.io.File localFolder = new java.io.File(parentFolder, folderName);\n Log.e(\"folder\",localFolder.getAbsolutePath());\n if (!localFolder.exists())\n localFolder.mkdirs();\n getFolderContents(f, localFolder);\n }\n }", "public final boolean isDirectory() {\n\t\treturn m_info.isDirectory();\n\t}", "private static Enumeration<? extends FileObject> existingFolders(AbstractFileSystem fs) {\n return fs.existingFileObjects(fs.getAbstractRoot());\n }", "private void addDefaultDirectories(IProject project, String parentFolder, String[] folders\n \t\t, IProgressMonitor monitor) throws CoreException {\n for (String name : folders) {\n if (name.length() > 0) {\n IFolder folder = project.getFolder(parentFolder + name);\n if (!folder.exists()) {\n folder.create(true /* force */, true /* local */,\n new SubProgressMonitor(monitor, 10));\n }\n }\n }\n }", "@Override\n\tpublic void setParrentFolder(String parrentFolder) {\n\t\t\n\t}", "public boolean isDirectory() {\n return _file.isDirectory();\n }", "public void doFolder_permissions(RunData data, Context context)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData)data).getJs_peid());\n\t\tParameterParser params = data.getParameters();\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\t// get the current collection id and the related site\n\t\tString collectionId = params.getString(\"collectionId\"); //(String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tString title = \"\";\n\t\ttry\n\t\t{\n\t\t\ttitle = ContentHostingService.getProperties(collectionId).getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t}\n\t\tcatch (PermissionException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notread\"));\n\t\t}\n\t\tcatch (IdUnusedException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notfindfol\"));\n\t\t}\n\n\t\t// the folder to edit\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(collectionId));\n\t\tstate.setAttribute(PermissionsHelper.TARGET_REF, ref.getReference());\n\n\t\t// use the folder's context (as a site) for roles\n\t\tString siteRef = SiteService.siteReference(ref.getContext());\n\t\tstate.setAttribute(PermissionsHelper.ROLES_REF, siteRef);\n\n\t\t// ... with this description\n\t\tstate.setAttribute(PermissionsHelper.DESCRIPTION, rb.getString(\"setpermis\") + \" \" + title);\n\n\t\t// ... showing only locks that are prpefixed with this\n\t\tstate.setAttribute(PermissionsHelper.PREFIX, \"content.\");\n\n\t\t// get into helper mode with this helper tool\n\t\tstartHelper(data.getRequest(), \"sakai.permissions.helper\");\n\n\t}", "@Override\r\n\tpublic boolean isDir(String path) {\n\t\treturn false;\r\n\t}", "@Override\n public boolean accept(File file) {\n if (file.isDirectory()) {\n return true;\n }\n return false;\n }", "private final void add_to_common_dirs(String val) {\n\n\t\tif (val == null) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif (val == \"\") {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif (commonDirs == null) {\n\n\t\t\tcommonDirs = new String[MAX_DIRS];\n\n\t\t\tfor (int i = 0; i < MAX_DIRS; i++) {\n\n\t\t\t\tcommonDirs[i] = \"\";\n\n\t\t\t}\n\n\t\t\tcommonDirs[0] = val;\n\n\t\t}\n\n\t\telse {\n\n\t\t\t/*\n\t\t\t * \n\t\t\t * check for duplicates\n\t\t\t * \n\t\t\t */\n\n\t\t\tfor (int i = 0; i < MAX_DIRS; i++) {\n\n\t\t\t\tif (commonDirs[i].equalsIgnoreCase(val)) {\n\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor (int i = MAX_DIRS - 1; i > 0; i--) {\n\n\t\t\t\tcommonDirs[i] = commonDirs[i - 1];\n\n\t\t\t}\n\n\t\t\tcommonDirs[0] = val;\n\n\t\t}\n\n\t}", "public String getFolders()\r\n\t{\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t{\r\n\t\t return \"accessDenied\";\r\n\t\t}\r\n\t\tif(parentFolderId != null && parentFolderId > 0)\r\n\t\t{\r\n\t\t folderPath = userFileSystemService.getPersonalFolderPath(parentFolderId);\r\n\t\t}\r\n\t\t\r\n\t\tCollection<PersonalFolder> myPersonalFolders = userFileSystemService.getPersonalFoldersForUser(userId, parentFolderId);\r\n\t\t\r\n\t\tCollection<PersonalFile> myPersonalFiles = userFileSystemService.getPersonalFilesInFolder(userId, parentFolderId);\r\n\t\t\r\n\t fileSystem = new LinkedList<FileSystem>();\r\n\t \r\n\t for(PersonalFolder o : myPersonalFolders)\r\n\t {\r\n\t \tfileSystem.add(o);\r\n\t }\r\n\t \r\n\t for(PersonalFile o: myPersonalFiles)\r\n\t {\r\n\t \tfileSystem.add(o);\r\n\t }\r\n\t \r\n\t FileSystemSortHelper sortHelper = new FileSystemSortHelper();\r\n\t sortHelper.sort(fileSystem, FileSystemSortHelper.TYPE_DESC);\r\n\t return SUCCESS;\r\n\t \r\n\t}", "protected boolean shouldIgnoreContent() {\n return empty;\n }", "public void addFolder(TaskFolder folder)\n {\n folders.add(folder);\n }", "private void setFolderFlags(IPSPubServer pubServer, IPSSite site, PSPublishServerInfo serverInfo)\n {\n Boolean isOwnServer = Boolean.parseBoolean(pubServer.getProperty(IPSPubServerDao.PUBLISH_OWN_SERVER_PROPERTY)\n .getValue()) ? true : false;\n String folderValue = pubServer.getProperty(IPSPubServerDao.PUBLISH_FOLDER_PROPERTY).getValue();\n String publishType = pubServer.getPublishType();\n\n PSPublishServerProperty defaultServerFlagProperty = new PSPublishServerProperty();\n defaultServerFlagProperty.setKey(DEFAULT_SERVER_FLAG);\n\n PSPublishServerProperty ownServeFlagProperty = new PSPublishServerProperty();\n ownServeFlagProperty.setKey(OWN_SERVER_FLAG);\n\n if (publishType.equalsIgnoreCase(PublishType.filesystem.toString()) || publishType.equalsIgnoreCase(PublishType.filesystem_only.toString()))\n {\n String defaultServerValue = EMPTY;\n String ownServerValue = EMPTY;\n\n if (isOwnServer)\n {\n defaultServerFlagProperty.setValue(\"false\");\n ownServeFlagProperty.setValue(\"true\");\n ownServerValue = folderValue;\n }\n else\n {\n // This is a default CM1 server\n defaultServerFlagProperty.setValue(\"true\");\n ownServeFlagProperty.setValue(\"false\");\n defaultServerValue = normalizePath(siteDataService.getBasePublishingRoot(folderValue, site.getName()));\n folderValue = defaultServerValue;\n }\n // Add the default flag property\n serverInfo.getProperties().add(defaultServerFlagProperty);\n\n // Add the own flag property\n serverInfo.getProperties().add(ownServeFlagProperty);\n\n // Add the default server property\n PSPublishServerProperty defaultServerProperty = new PSPublishServerProperty();\n defaultServerProperty.setKey(IPSPubServerDao.PUBLISH_DEFAULT_SERVER_PROPERTY);\n defaultServerProperty.setValue(defaultServerValue);\n serverInfo.getProperties().add(defaultServerProperty);\n\n // Add the own server property\n PSPublishServerProperty ownServerProperty = new PSPublishServerProperty();\n ownServerProperty.setKey(IPSPubServerDao.PUBLISH_OWN_SERVER_PROPERTY);\n ownServerProperty.setValue(normalizePath(ownServerValue));\n serverInfo.getProperties().add(ownServerProperty);\n\n // Add the folder property\n PSPublishServerProperty folderProperty = new PSPublishServerProperty();\n folderProperty.setKey(IPSPubServerDao.PUBLISH_FOLDER_PROPERTY);\n folderProperty.setValue(normalizePath(folderValue));\n serverInfo.getProperties().add(folderProperty);\n }\n\n if (publishType.equalsIgnoreCase(PublishType.ftp.toString()) || publishType.equalsIgnoreCase(PublishType.ftp_only.toString())\n || publishType.equalsIgnoreCase(PublishType.ftps.toString()) || publishType.equalsIgnoreCase(PublishType.ftps_only.toString())\n || publishType.equalsIgnoreCase(PublishType.sftp.toString()) || publishType.equalsIgnoreCase(PublishType.sftp_only.toString()))\n {\n String folderPropertyValue = EMPTY;\n\n if (isOwnServer)\n {\n defaultServerFlagProperty.setValue(\"false\");\n ownServeFlagProperty.setValue(\"true\");\n folderPropertyValue = folderValue;\n }\n else\n {\n // This is a default CM1 server\n defaultServerFlagProperty.setValue(\"true\");\n ownServeFlagProperty.setValue(\"false\");\n folderPropertyValue = normalizePath(siteDataService.getBasePublishingRoot(folderValue, site.getName()));\n }\n // Add the default flag property\n serverInfo.getProperties().add(defaultServerFlagProperty);\n\n // Add the own flag property\n serverInfo.getProperties().add(ownServeFlagProperty);\n\n // Add the folder property\n PSPublishServerProperty folderProperty = new PSPublishServerProperty();\n folderProperty.setKey(IPSPubServerDao.PUBLISH_FOLDER_PROPERTY);\n folderProperty.setValue(folderPropertyValue);\n serverInfo.getProperties().add(folderProperty);\n }\n }", "protected abstract boolean isDirectory(@NonNull String path, T context);", "@Override\n public boolean isContainer(String path) {\n return false;\n }", "public boolean isDirFlag() { return this.dirFlag; }", "@Override\r\n public List<Folder> getAllFolder() {\n return folderRepository.findAll();\r\n }", "@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}", "public void llenarListaArchivos(int op) {\n String[] archivosPermitidos = {\".HA\", \".HE\"};\n if (op == 1) {\n archivos_directorio.removeAllItems();\n } else {\n archivos_directorio2.removeAllItems();\n }\n File directorio = new File(\"./\");\n File[] archivos = null;\n if (directorio.exists()) {\n archivos = directorio.listFiles();\n }\n int i;\n\n for (i = 0; i < archivos.length; i++) {\n if (op == 1 && (\"\" + archivos[i]).contains(\".txt\")) {\n archivos_directorio.addItem(\"\" + archivos[i]);\n } else {\n int j;\n for (j = 0; j < archivosPermitidos.length; j++) {\n if ((\"\" + archivos[i]).contains(archivosPermitidos[j])) {\n archivos_directorio2.addItem(\"\" + archivos[i]);\n break;\n }\n }\n }\n }\n\n }", "public boolean isReadOnly() {\n String apath = folder.getAbsolutePath();\n if (apath.startsWith(Base.getExamplesPath()) ||\n apath.startsWith(Base.getLibrariesPath()) ||\n apath.startsWith(Base.getSketchbookLibrariesPath())) {\n return true;\n\n // canWrite() doesn't work on directories\n //} else if (!folder.canWrite()) {\n } else {\n // check to see if each modified code file can be written to\n for (int i = 0; i < codeCount; i++) {\n if (code[i].isModified() &&\n code[i].fileReadOnly() &&\n code[i].fileExists()) {\n //System.err.println(\"found a read-only file \" + code[i].file);\n return true;\n }\n }\n //return true;\n }\n return false;\n }", "@DISPID(30)\n\t// = 0x1e. The runtime will prefer the VTID if present\n\t@VTID(41)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject testSetFolder();", "private static boolean checkDirectory() {\n File baseDir = new File(Environment.getExternalStorageDirectory(), \"Andevindo\");\n mImageDir = new File(baseDir.getPath() + File.separator + \"Images\");\n mVideoDir = new File(baseDir.getPath() + File.separator + \"Videos\");\n mMiscDir = new File(baseDir.getPath() + File.separator + \"Misc\");\n if (!baseDir.exists()) {\n if (!baseDir.mkdirs()) {\n\n return false;\n } else {\n\n\n if (!mImageDir.exists()) {\n if (!mImageDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mVideoDir.exists()) {\n if (!mVideoDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mMiscDir.exists()) {\n if (!mMiscDir.mkdirs()) {\n\n return false;\n }\n }\n\n }\n }\n return true;\n }", "private void prepareFolder(String name, String newFolderName) {\n }", "public boolean adminContent(User user, Object obj) {\n if (hasGrant(user,\n toGrant(getRelevantURIForSecurity(obj, false, false, false), GrantType.ADMIN_CONTENT))) {\n return true;\n }\n return false;\n }", "public FileObject getFolder() {\r\n return folder;\r\n }", "protected void addFoldersPropertyDescriptor(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_Folder_folders_feature\"),\r\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Folder_folders_feature\", \"_UI_Folder_type\"),\r\n\t\t\t\t RememberPackage.Literals.FOLDER__FOLDERS,\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}", "private boolean getData() {\n if ( tiTree != null && !tiTree.isDisposed() ) {\n tiTree.dispose();\n }\n\n tiTree = new TreeItem( wTree, SWT.NONE );\n tiTree.setImage( GUIResource.getInstance().getImageFolder() );\n RepositoryDirectoryUI.getDirectoryTree( tiTree, dircolor, repositoryTree );\n tiTree.setExpanded( true );\n\n return true;\n }", "private boolean createFolder (Path path) {\n if (Files.notExists(path)) {\n // If the folder doesn't already exists we create it\n File f = new File(path.toString());\n try {\n // Create the folder\n f.mkdir();\n // Create an empty flow.json file\n f = new File(path + \"/flow.json\");\n f.createNewFile();\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n } else {\n return false;\n }\n }", "@Override\n\tpublic boolean canHaveAsContent(Item item) {\n\t\treturn false;\n\t}", "public boolean accept(File pathname)\n {\n return pathname.isDirectory();\n }", "public File getFolder() {\n return folder;\n }", "private Boolean canHaveContent(){\n\t\t\treturn (getRequestType() == RequestType.POST || getRequestType() == RequestType.PUT);\n\t\t}", "@Test\n public void testMatchesAny() {\n\n Set<PathMatcher> patterns = new HashSet<PathMatcher>() {\n {\n add(FileUtil.matcherForGlobExpression(\"/notADir1\"));\n add(FileUtil.matcherForGlobExpression(\"/notADir2\"));\n }\n };\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isFalse();\n\n patterns.add(FileUtil.matcherForGlobExpression(FOLDER.toString()));\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isTrue();\n }", "WithCreate withFolderPath(String folderPath);" ]
[ "0.6649182", "0.622713", "0.6121843", "0.5902374", "0.56339437", "0.56055963", "0.5507626", "0.54789364", "0.54737747", "0.547086", "0.5460227", "0.5441419", "0.53542733", "0.52973056", "0.5295286", "0.5265786", "0.52375656", "0.52365184", "0.52364945", "0.5198454", "0.51822597", "0.515152", "0.5145176", "0.51451087", "0.5123064", "0.5116715", "0.50940955", "0.50822085", "0.507362", "0.50692266", "0.50546926", "0.5044569", "0.50405955", "0.5025634", "0.5015445", "0.50017154", "0.4996107", "0.49891075", "0.49774936", "0.4958859", "0.49512887", "0.49341506", "0.49311835", "0.49295163", "0.49224758", "0.49200174", "0.49173975", "0.4914503", "0.49120137", "0.4899341", "0.48986483", "0.48985517", "0.48958638", "0.48923376", "0.4885273", "0.48848101", "0.4876656", "0.48699856", "0.4868476", "0.4868185", "0.4867033", "0.48665434", "0.48630378", "0.48478514", "0.48449853", "0.48388365", "0.48256904", "0.4823919", "0.47938198", "0.47925267", "0.47754756", "0.47741732", "0.4764719", "0.4760516", "0.47590396", "0.47398227", "0.4738254", "0.4734795", "0.4732634", "0.47158813", "0.4714489", "0.47121367", "0.47099793", "0.47088626", "0.47081766", "0.4701134", "0.46904343", "0.4688412", "0.46883285", "0.4684106", "0.46753287", "0.46728173", "0.46644357", "0.46618712", "0.46603137", "0.4660289", "0.46454272", "0.46401504", "0.46357116", "0.46342957", "0.4620651" ]
0.0
-1
Stores the content into the ZIP.
public ZipBuilder save() throws IOException { ZipUtil.addToZip(zos, file, path, comment, recursive); return ZipBuilder.this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeArchive(Content content) throws Exception {\n\t\tString path = open();\n\t\tTranslateContent translate = new TranslateContent(content, path);\n\t\ttranslate.writeArchive();\n\n\t\t// compress archive file if +C used\n\t\tif (content.isCompressed()) {\n\t\t\tcompressArchive();\n\t\t}\n\t}", "public ZipBuilder save() throws IOException {\n\t\t\tZipUtil.addToZip(zos, bytes, path, comment);\n\t\t\treturn ZipBuilder.this;\n\t\t}", "abstract public void store( String content, String path )\r\n throws Exception;", "private void createZipEntry(ZipOutputStream out, String fileName, byte[] content) throws IOException\n\t{\n\t\tZipEntry entry = new ZipEntry(fileName);\n\t\tentry.setMethod(ZipEntry.DEFLATED);\n\t\tout.putNextEntry(entry);\n\t\tout.write(content);\n\t}", "@Override\n\tpublic void store(InputStream inputStream, long contentLength, String contentType, String keyName) {\n\n\t}", "private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{\n try {\n output.putNextEntry(ze); \n } catch (ZipException zipEx) {\n //This entry already exists. So, go with the first one.\n input.close();\n return;\n }\n int numBytes = -1;\n while((numBytes = input.read(buffer)) > 0){\n output.write(buffer, 0, numBytes);\n }\n output.closeEntry();\n input.close();\n }", "public void store(String namespace, String id, long version, String content) throws StageException;", "protected void trunkStore() {\n LOG.info(\"Trunking state filestore: {}\", fileStore);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(fileStore);\n for (Map.Entry<String, String> entry : cache.entrySet()) {\n fos.write(entry.getKey().getBytes());\n fos.write(KEY_VALUE_DELIMITER.getBytes());\n fos.write(entry.getValue().getBytes());\n fos.write(STORE_DELIMITER.getBytes());\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n } finally {\n IOHelper.close(fos, \"Trunking file state repository\", LOG);\n }\n }", "public AddContentToZip path(final String path) {\n\t\t\tthis.path = path;\n\t\t\treturn this;\n\t\t}", "@Override\n public synchronized void putContent(Consumer<OutputStream> outputStreamSupplier) throws IOException {\n // Delete a possibly prior written newContentFile\n Files.deleteIfExists(newContentFile);\n try (OutputStream out = newOutputStreamToNewTmpContent(true)) {\n outputStreamSupplier.accept(out);\n }\n FileUtils.moveAtomic(newContentTmpFile, newContentFile);\n }", "private static void storingTheObjectToDisk1(InputStream objectContent, String key) {\n FileOutputStream fos = null;\n BufferedOutputStream bos = null;\n byte[] buff = new byte[50*1024];\n int count;\n try {\n bos = new BufferedOutputStream(new FileOutputStream(\"/home/ubuntu/\" + key));\n while( (count = objectContent.read(buff)) != -1)\n {\n bos.write(buff, 0, count);\n }\n bos.close();\n objectContent.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected boolean storeContents(final String contents,\n\t\t\tfinal File destination) {\n\t\tFileChannel fcDestination = null;\n\t\ttry {\n\t\t\tfinal ByteBuffer bb = ByteBuffer\n\t\t\t\t\t.allocateDirect(contents.length() * 2);\n\t\t\tbb.put(contents.getBytes());\n\t\t\tbb.flip();\n\t\t\tfcDestination = new FileOutputStream(destination).getChannel();\n\t\t\tfcDestination.write(bb);\n\t\t\treturn true;\n\t\t} catch (final Exception e) {\n\t\t\tthis.logger.exception(\"Unable to Store Contents [\" + destination\n\t\t\t\t\t+ \"]\", e);\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tif (fcDestination != null) {\n\t\t\t\ttry {\n\t\t\t\t\tfcDestination.close();\n\t\t\t\t} catch (final Exception e) {\n\t\t\t\t\tthis.logger.exception(\"Unable to Close File Channel [\"\n\t\t\t\t\t\t\t+ fcDestination + \"]\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\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\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "public synchronized void writeStore() {\n FileOutputStream fileStream = null;\n\n try {\n File storeFile = new File(getStoreName());\n File oldStoreFile = new File(oldStoreName);\n\n if (oldStoreFile.exists()) {\n oldStoreFile.delete();\n }\n\n if (storeFile.exists()) {\n storeFile.renameTo(oldStoreFile);\n }\n\n File newStoreFile = new File(getStoreName());\n\n // Make sure the needed directories exists\n if (!newStoreFile.getParentFile().exists()) {\n newStoreFile.getParentFile().mkdirs();\n }\n\n fileStream = new FileOutputStream(newStoreFile);\n ObjectOutputStream outStream = new ObjectOutputStream(fileStream);\n outStream.writeObject(store);\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, Utility.expandStackTraceToString(e));\n } finally {\n if (fileStream != null) {\n try {\n fileStream.close();\n } catch (IOException e) {\n LOGGER.log(Level.WARNING, Utility.expandStackTraceToString(e));\n }\n }\n }\n }", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException {\r\n final int BUFFER_SIZE = 1024;\r\n FileInputStream fis = new FileInputStream(file);\r\n // we want the zipEntry's path to be a relative path that is relative\r\n // to the directory being zipped, so chop off the rest of the path\r\n String zipFilePath = file.getCanonicalPath().substring(\r\n (directoryToZip.getCanonicalPath().length() - directoryToZip.getName().length()),\r\n file.getCanonicalPath().length());\r\n ZipEntry zipEntry = new ZipEntry(zipFilePath);\r\n zos.putNextEntry(zipEntry);\r\n byte[] bytes = new byte[BUFFER_SIZE];\r\n int length;\r\n while ((length = fis.read(bytes)) >= 0) {\r\n zos.write(bytes, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n }", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);", "public void serialize(final OutputStream output) throws IOException {\r\n ZipOutputStream zipStream = new ZipOutputStream(output);\r\n WorkspaceComponentSerializer serializer = new WorkspaceComponentSerializer(\r\n zipStream);\r\n ArchiveContents archive = new ArchiveContents(workspace, serializer);\r\n\r\n workspace.preSerializationInit();\r\n\r\n // Serialize components\r\n serializeComponents(serializer, archive, zipStream);\r\n\r\n // Serialize couplings\r\n for (Coupling<?> coupling : workspace.getCouplingManager()\r\n .getCouplings()) {\r\n archive.addCoupling(coupling);\r\n }\r\n\r\n // Serialize update actions\r\n for (UpdateAction action : workspace.getUpdater().getUpdateManager()\r\n .getActionList()) {\r\n archive.addUpdateAction(action);\r\n }\r\n\r\n ZipEntry entry = new ZipEntry(\"contents.xml\");\r\n zipStream.putNextEntry(entry);\r\n archive.toXml(zipStream);\r\n zipStream.finish();\r\n }", "private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}", "public void save(OutputStream out) throws IOException {\n\t\ttry (GZIPOutputStream zipOut = new GZIPOutputStream(out)) {\n\t\t\ttry (ObjectOutputStream objOut = new ObjectOutputStream(zipOut)) {\n\t\t\t\tobjOut.writeObject(this);\n\t\t\t}\n\t\t}\n\t}", "public static void extractAndSaveFile(ZipInputStream zip,\n \t\t\tFileOutputStream destinationFile) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zip);\n \t\tdestinationFile.write(out.toByteArray());\n \t\tout.close();\n \t\tdestinationFile.close();\n \t}", "public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }", "public static void saveToZip(String path) throws FileNotFoundException, IOException {\n //File and Zip Outoput Streams \n FileOutputStream fos = new FileOutputStream(path);\n ZipOutputStream zipOS = new ZipOutputStream(fos);\n //For every image, we create a temporally jpeg file\n //Then, with the createFileToZip function, we include it to the output zip file\n //Finally, we delete the jpeg image\n for (int i =0; i< imageNames.size(); i++) {\n File tempImage = new File(\"image_\"+Integer.toString(i)+\".jpg\");\n ImageIO.write(imageDict.get(imageNames.get(i)),\"jpg\",tempImage);\n createFileToZip(imageDict.get(imageNames.get(i)),\"image_\",i,zipOS);\n tempImage.delete();\n }\n zipOS.finish(); //Good practice!\n zipOS.close();\n }", "int add(ContentInputStream data) throws ContentStoreException;", "@Override\n public void createContent(OutputStream out) throws Exception {\n\n // make sure we have the path to load from\n IParameterProvider request = parameterProviders.get( \"request\" ); //$NON-NLS-1$\n String fullPath = request.getStringParameter(\"filepath\", null); //$NON-NLS-1$\n if( fullPath == null ) {\n errorMessage( Messages.getErrorString(\"SolutionRepo.ERROR_0001_NO_FILEPATH\"), out ); //$NON-NLS-1$\n return;\n }\n\n ActionInfo info = ActionInfo.parseActionString( fullPath );\n if( info == null ) {\n errorMessage( Messages.getErrorString(\"SolutionRepo.ERROR_0003_BAD_PATH\", fullPath), out ); //$NON-NLS-1$\n return;\n }\n \n ISolutionRepository repo = PentahoSystem.get(ISolutionRepository.class, userSession);\n\n // try to get the file from the repository\n// Document doc = repo.getResourceAsDocument(fullPath, ISolutionRepository.ACTION_EXECUTE);\n Document doc = repo.getNavigationUIDocument(null, fullPath, ISolutionRepository.ACTION_EXECUTE);\n\n if( doc != null ) {\n Element stateNode = (Element) doc.selectSingleNode( \"state-file/state\" ); //$NON-NLS-1$\n if( stateNode != null ) {\n // write the loaded state to the output stream\n out.write( stateNode.getText().getBytes( ) );\n return;\n }\n }\n \n out.write( Messages.getErrorString(\"SolutionRepo.ERROR_0001_LOAD_FAILED\", fullPath).getBytes() ); //$NON-NLS-1$\n \n }", "public void save(Content c) {\n Path path = this.contentPath.resolve(c.getKey());\n\n try (DataOutputStream out = new DataOutputStream(new BufferedOutputStream(Files.newOutputStream(path)))) {\n // write version\n out.writeInt(2);\n\n // write name\n out.writeUTF(c.getKey());\n\n // write content type\n byte[] contextType = c.getContentType().getBytes();\n out.writeInt(contextType.length);\n out.write(contextType);\n\n // write expiry time\n out.writeLong(c.getExpiry());\n\n // write last modified\n out.writeLong(c.getLastModified());\n\n // write modifiable state data\n out.writeBoolean(c.isModifiable());\n if (c.isModifiable()) {\n out.writeUTF(c.getAuthKey());\n }\n\n // write encoding\n byte[] encoding = c.getEncoding().getBytes();\n out.writeInt(encoding.length);\n out.write(encoding);\n\n // write content\n out.writeInt(c.getContent().length);\n out.write(c.getContent());\n } catch (IOException e) {\n LOGGER.error(\"Exception occurred saving '\" + path + \"'\", e);\n }\n }", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void deploy(SQLiteDatabase sqlLiteDb, InputStream dbStream) throws IOException {\n ZipInputStream zis = new ZipInputStream(new BufferedInputStream(dbStream));\n ZipEntry entry = null;\n while ((entry = zis.getNextEntry()) != null) {\n Log.i(TAG, \"deploying zip entry: \" + entry);\n InputStreamReader dbReader = new InputStreamReader(zis);\n deploy(sqlLiteDb, dbReader);\n }\n }", "public void storeContentsToFile(File destination) throws Exception {\n InputStream is = request.getInputStream();\n StreamHelper.copyStreamToFile(is, destination);\n }", "public void persist() {\n\t\ttry {\n\t\t\tFileOutputStream fos = this._context.openFileOutput(\n\t\t\t\t\tConstants.CATALOG_XML_FILE_NAME, Context.MODE_PRIVATE);\n\t\t\tfos.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\\n\".getBytes());\n\t\t\tfos.write(\"<orders>\\n\".getBytes());\n\t\t\tfor (int i = 0; i < getOrderEntryCount(); i++) {\n\t\t\t\tOrderEntry oe = getOrderEntry(i);\n\t\t\t\tfos.write(oe.toXMLString().getBytes());\n\t\t\t}\n\t\t\tfos.write(\"</orders>\\n\".getBytes());\n\t\t\tfos.flush();\n\t\t\tfos.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tLog.d(Constants.LOGTAG, \" \" + OrderList.CLASSTAG\n\t\t\t\t\t+ \"Failed to write out file?\" + e.getMessage());\n\t\t}\n\t}", "public void storePartCapturedContent() {\n // storePart only works for the classic external index format.\n // for internal, we just ignore it (will be fully stored eventually by final call to store())\n\n getDocWriter().storeInContentStore(null, new TextContent(content), captureContentFieldName, \"contents\");\n }", "public void put(String content, String remotePath) throws Exception\r\n {\r\n\r\n if (cf.checkExists().forPath(remotePath) != null)\r\n cf.setData().forPath(remotePath, content.getBytes());\r\n else {\r\n cf.create().creatingParentsIfNeeded().forPath(remotePath, content.getBytes());\r\n }\r\n }", "protected void writeContent(final String filename, final byte[] content) {\r\n\t\tFile file = new File(filename);\r\n\t\tif (file.exists()) {\r\n\t\t\tthrow new FileException(\"file [\" + file.getAbsolutePath() + \"] already exists\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFileOutputStream os = new FileOutputStream(file);\r\n\t\t\tos.write(content);\r\n\t\t\tos.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new FileException(\"could not write file [\" + file.getAbsolutePath() + \"]\", e);\r\n\t\t}\r\n\t}", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "public void save(OutputStream os) throws IOException;", "public void zip(String directoryInZip, \n String filePath) throws Exception\n {\n File thisFile = new File(filePath);\n\n if (thisFile.exists()) {\n\n try {\n FileInputStream fi = new FileInputStream(thisFile);\n\n origin = new BufferedInputStream(fi, BUFFER);\n\n ZipEntry entry = new ZipEntry(directoryInZip + File.separator\n + thisFile.getName());\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + filePath + \" not found !!\", e);\n } catch (IOException e) {\n logger.error(\"Could not write to Zip File \", e);\n throw new Exception(\"Could not write to Zip File \", e);\n }\n\n } else {\n // Log message if file does not exist\n logger.info(\"File \" + thisFile.getName()\n + \" does not exist on file system\");\n\n } \t\t\n }", "public void setFileContents(Path path, String contents,\n\t\t\tCompressionType compressionType) throws IOException {\n\t\tfiles.put(path, MockStringContentFactory.getBytesFromString(contents,\n\t\t\t\tcompressionType));\n\t\tPath parent = path.getParent();\n\t\tif (parent != null) {\n\t\t\tsetFileContents(parent, DIRECTORY_MARKER_STRING);\n\t\t}\n\t}", "private void addFile( ZipOutputStream output, File file, String prefix, boolean compress) throws IOException {\n //Make sure file exists\n long checksum = 0;\n if ( ! file .exists() ) {\n return ;\n }\n ZipEntry entry = new ZipEntry( getEntryName( file, prefix ) );\n entry .setTime( file .lastModified() );\n entry .setSize( file .length() );\n if (! compress){\n entry.setCrc(calcChecksum(file));\n }\n FileInputStream input = new FileInputStream( file );\n addToOutputStream(output, input, entry);\n }", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}", "public static void zip(File src, OutputStream os) throws IOException {\n\t\tzip(src, os, Charset.defaultCharset().name(), true);\n\t}", "private static void writeFile(ZipInputStream zipIn, String filePath) throws IOException {\n\n String parent = filePath.replace(filePath.substring(filePath.lastIndexOf('/')), \"\");\n createParents(parent);\n\n BufferedOutputStream bos = null;\n\n try {\n bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n }", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "private static void writeToFileInZip2 (FileSystem zipFs, String[] data) throws IOException {\r\n\t\tFiles.write(zipFs.getPath(\"/newFile2.txt\"), Arrays.asList(data), Charset.defaultCharset(), StandardOpenOption.CREATE);\r\n\t}", "public static void zip(BasicShell shell, File archive, List<File> filesToZip) {\n\t\ttry {\n\t\t\tshell.printOut(\"Creating archive '\" + archive.getPath() + \"'.\");\n\t\t\tfinal BufferedOutputStream archiveStream = new BufferedOutputStream(new FileOutputStream(archive));\n\t\t\tZipOutputStream zipStream = new ZipOutputStream(archiveStream);\n\t\t\tzipStream.setLevel(7);\n\t\t\t\n\t\t\tString pwd = shell.pwd().getPath();\n\t\t\tfor ( File file : filesToZip) {\n\t\t\t\tString name = file.getPath();\n\t\t\t\tif (name.equals(pwd)) continue;\n\t\t\t\t\n\t\t\t\tif ( name.startsWith(pwd) ) {\n\t\t\t\t\tname = name.substring(pwd.length()+1);\n\t\t\t\t}\n\t\t\t\tZipEntry entry = new ZipEntry(name);\n\t\t\t\tzipStream.putNextEntry(entry);\n\t\t\t\tif ( file.isFile() ) {\n\t\t\t\t\tBufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(file));\n\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\tint count = fileStream.read(buffer);\n\t\t\t\t\twhile ( count > -1 ) {\n\t\t\t\t\t\tzipStream.write(buffer, 0, count);\n\t\t\t\t\t\tcount = fileStream.read(buffer);\n\t\t\t\t\t}\n\t\t\t\t\tfileStream.close();\n\t\t\t\t}\n\t\t\t\tshell.printOut(\"File '\" + entry.getName() + \"' added.\");\n\t\t\t}\n\t\t\tzipStream.close();\n\t\t} catch (Exception e) {\n\t\t\tshell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + \": \"+ e.getMessage());\n\t\t}\n\t}", "public synchronized int store(FileOutputStream outputStream) throws IOException {\n WritableByteChannel channel = Channels.newChannel(outputStream);\n backingData.position(origo);\n channel.write(backingData); // TODO: Only write bytecount bytes\n return byteCount;\n }", "public final void store(final OutputStream out) {\n if (s_log.isDebugEnabled()) {\n s_log.debug(\"Storing \" + this);\n }\n\n Assert.exists(out, OutputStream.class);\n\n try {\n m_props.store(out, s_header);\n } catch (IOException ioe) {\n throw new UncheckedWrapperException(ioe);\n }\n }", "private long processSpecificationArchive(Publication publication, InputStream archiveContent) throws DAOException {\n\t\ttry {\n\t\t\tEntityManager em = getEntityManager();\n\t\t\tSpecificationCollator collator = new SpecificationCollator( publication );\n\t\t\tString archiveFilename = getArchiveFilename( publication );\n\t\t\tFileContent archiveFile = publication.getArchiveContent();\n\t\t\t\n\t\t\tlog.info(\"Saving File Content: \" + archiveFilename);\n\t\t\tif (archiveFile != null) {\n\t\t\t\tpersistFileContent( archiveFile, archiveContent );\n\t\t\t} else {\n\t\t\t\tarchiveFile = persistFileContent( archiveContent );\n\t\t\t\tpublication.setArchiveContent( archiveFile );\n\t\t\t}\n\t\t\tpublication.setArchiveFilename( archiveFilename );\n\t\t\tem.flush();\n\t\t\t\n\t\t\t// First Pass - Create the publication items for the new specification\n\t\t\ttry (InputStream archiveStream = new InflaterInputStream( new ByteArrayInputStream( archiveFile.getFileBytes() ) )) {\n\t\t\t\tZipInputStream zipStream = new ZipInputStream( archiveStream );\n\t\t\t\tZipEntry zipEntry;\n\t\t\t\t\n\t\t\t\twhile ((zipEntry = zipStream.getNextEntry()) != null) {\n\t\t\t\t\tif (zipEntry.isDirectory()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t} else if (collator.isReleaseNotes( zipEntry )) {\n\t\t\t\t\t\tFileContent releaseNotesFile = publication.getReleaseNotesContent();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (releaseNotesFile != null) {\n\t\t\t\t\t\t\tpersistFileContent( releaseNotesFile, zipStream );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpublication.setReleaseNotesContent( persistFileContent( zipStream ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpublication.setReleaseNotesFilename( collator.getFilename( zipEntry ) );\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tPublicationItem item = collator.addItem( zipEntry );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (item != null) {\n\t\t\t\t\t\t\tlog.info(\"Saving File Content: \" + item.getItemFilename());\n\t\t\t\t\t\t\tFileContent itemFile = item.getItemContent();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (itemFile != null) {\n\t\t\t\t\t\t\t\tpersistFileContent( itemFile, zipStream );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titem.setItemContent( persistFileContent( zipStream ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"Error reading from publication archive.\", e);\n\t\t\t\tthrow new DAOException(\"Error reading from publication archive.\", e);\n\t\t\t}\n\t\t\t\n\t\t\t// Second Pass - Create publication items for any nested archives that fall under\n\t\t\t// the \"special case\" of a standalone nested archive that is the only member of\n\t\t\t// its publication group.\n\t\t\ttry (InputStream archiveStream = new InflaterInputStream( new ByteArrayInputStream( archiveFile.getFileBytes() ) )) {\n\t\t\t\tZipInputStream zipStream = new ZipInputStream( archiveStream );\n\t\t\t\tZipEntry zipEntry;\n\t\t\t\t\n\t\t\t\twhile ((zipEntry = zipStream.getNextEntry()) != null) {\n\t\t\t\t\tif (zipEntry.isDirectory()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t} else if (collator.isSpecialCaseArchive( zipEntry )) {\n\t\t\t\t\t\tZipInputStream nestedZipStream = new ZipInputStream( zipStream );\n\t\t\t\t\t\tZipEntry nestedEntry;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ((nestedEntry = nestedZipStream.getNextEntry()) != null) {\n\t\t\t\t\t\t\tif (nestedEntry.isDirectory()) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tPublicationItem item = collator.addArchiveItem( zipEntry, nestedEntry );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (item != null) {\n\t\t\t\t\t\t\t\t\tlog.info(\"Saving File Content: \" + item.getItemFilename());\n\t\t\t\t\t\t\t\t\titem.setItemContent( persistFileContent( nestedZipStream ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"Error reading from publication archive.\", e);\n\t\t\t\tthrow new DAOException(\"Error reading from publication archive.\", e);\n\t\t\t}\n\t\t\t\n\t\t\t// Finish by saving all of the non-file persistent records for the specification\n\t\t\t// and updating any items that have been removed\n\t\t\tif (publication.getId() < 0) {\n\t\t\t\tem.persist( publication );\n\t\t\t}\n\t\t\t\n\t\t\tfor (PublicationItem deletedItem : collator.getDeletedItems()) {\n\t\t\t\tdeletedItem.setRemoved( true );\n\t\t\t}\n\t\t\t\n\t\t\tfor (PublicationGroup group : collator.getGroups()) {\n\t\t\t\tboolean emptyGroup = true;\n\t\t\t\t\n\t\t\t\tif (group.getId() < 0) {\n\t\t\t\t\tem.persist( group );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (PublicationItem item : group.getPublicationItems()) {\n\t\t\t\t\tif (item.getId() < 0) {\n\t\t\t\t\t\tem.persist( item );\n\t\t\t\t\t}\n\t\t\t\t\temptyGroup &= item.isRemoved();\n\t\t\t\t}\n\t\t\t\tgroup.setRemoved( emptyGroup );\n\t\t\t}\n\t\t\tem.flush();\n\t\t\tDAOFactory.invalidateCollectionCache();\n\t\t\t\n\t\t\treturn publication.getId();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"An error occurred while publishing the specification.\", e);\n\t\t\tthrow new DAOException(\"An error occurred while publishing the specification.\", e);\n\t\t}\n\t}", "public static void PackageArchive(File directoryName, File fileName) throws IOException\r\n {\r\n final String ARCHIVE_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-16\\\"?>\\n<archive major_version=\\\"0\\\" minor_version=\\\"1\\\" />\";\r\n\r\n TarArchiveWriter archive = new TarArchiveWriter(new GZIPOutputStream(new FileOutputStream(fileName)));\r\n\r\n // Create the archive.xml file\r\n archive.writeFile(\"archive.xml\", ARCHIVE_XML);\r\n\r\n // Add the assets\r\n File dir = new File(directoryName, ArchiveConstants.ASSETS_PATH);\r\n String[] files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.ASSETS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the objects\r\n dir = new File(directoryName, ArchiveConstants.OBJECTS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.OBJECTS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the terrain(s)\r\n dir = new File(directoryName, ArchiveConstants.TERRAINS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.TERRAINS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the parcels(s)\r\n dir = new File(directoryName, ArchiveConstants.LANDDATA_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.LANDDATA_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the setting(s)\r\n dir = new File(directoryName, ArchiveConstants.SETTINGS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.SETTINGS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n archive.close();\r\n }", "private void writeContent(OutputStream os) throws Exception {\n os.write(HTMLcontent.getBytes());\n}", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "public void copyDataBase() throws IOException {\n InputStream assetInput = context.getAssets().open(ZIP_DB_NAME);\r\n Log.i(LOG_TAG, \"opened zip_db\");\r\n ZipInputStream zipIn = new ZipInputStream(assetInput);\r\n\r\n ZipEntry entry = zipIn.getNextEntry();\r\n\r\n entry.getName();\r\n\r\n // path to the just created empty database\r\n String DBFileName = DB_PATH + DB_NAME;\r\n\r\n OutputStream DBOutput = new FileOutputStream(DBFileName);\r\n\r\n byte[] buffer = new byte[1024];\r\n\r\n int length;\r\n\r\n while ((length = zipIn.read(buffer)) > 0) {\r\n DBOutput.write(buffer, 0, length);\r\n Log.i(LOG_TAG, \"zipread\" + length);\r\n }\r\n Log.i(LOG_TAG, \"read end\");\r\n // close the streams\r\n DBOutput.flush();\r\n DBOutput.close();\r\n\r\n zipIn.close();\r\n assetInput.close();\r\n }", "public void setZippedWorkDir(byte[] value) {\n this.zippedWorkDir = value;\n }", "public interface ZIPContent {\n\n /**\n * Set entry name for zip file.\n *\n * @param ename Entry name\n */\n public void setEntryName(String ename);\n\n /**\n * If model implement this method, return entry name in .epub file\n *\n * @return String entryname or null\n */\n public String getEntryName();\n}", "void save() {\n File file = new File(main.myPath + \"state.xml\");\n Framework.backup(main.myPath + \"state.xml\");\n Framework.transform(stateDoc, new StreamResult(file), null);\n setDirty(false);\n }", "void encode(StreamingContent content, OutputStream out) throws IOException;", "public void saveCart() throws IOException {\n String fileName = userid + \"cart.txt\";\n File file=new File(fileName);\n if(file.exists())\n {\n FileOutputStream fos = new FileOutputStream(fileName);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this.cartContents);\n oos.flush();\n oos.close();\n fos.close();\n }\n else{\n file.createNewFile();\n }\n }", "private void parsePackageFile( Part part, HttpServletResponse resp ) throws IOException\n {\n String fileName = part.getSubmittedFileName();\n CompressionType compressionType = CompressionType.getCompressionType( fileName );\n\n try ( InputStream is = part.getInputStream() )\n {\n LocalRepository repo = getRepository();\n repo.put( is, compressionType );\n ok( resp, \"Package successfully saved\" );\n }\n catch ( IOException ex )\n {\n internalServerError( resp, \"Failed to upload package: \" + ex.getMessage() );\n }\n }", "public void storeTestContent(String url) throws Exception {\n log.debug3(\"storeTestContent() url: \" + url);\n InputStream input = null;\n CIProperties props = null;\n // issue table of content\n if (url.endsWith(\"8601\") && url.contains(\"download\")) { \n // pdf\n input = new StringInputStream(\"\");\n props = getPdfProperties();\n } else if (url.endsWith(\"8110\")) {\n // abs - for metadata/\n input = new StringInputStream(abstractMetadata);\n props = getHtmlProperties();\n } else {\n \t// default blank html\n input = new StringInputStream(\"<html></html>\");\n props = getHtmlProperties();\n }\n UrlData ud = new UrlData(input, props, url);\n UrlCacher uc = au.makeUrlCacher(ud);\n uc.storeContent();\n }", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "private void writeContent(String content) throws IOException {\n FileChannel ch = lockFile.getChannel();\n\n byte[] bytes = content.getBytes();\n\n ByteBuffer buf = ByteBuffer.allocate(bytes.length);\n buf.put(bytes);\n\n buf.flip();\n\n ch.write(buf, 1);\n\n ch.force(false);\n }", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "public void save(DataOutput stream)\n throws IOException\n {\n stream.write(getBytes());\n }", "private void addDirContents( ZipOutputStream output, File dir, String prefix, boolean compress ) throws IOException {\n String[] contents = dir .list();\n for ( int i = 0; i < contents .length; ++i ) {\n String name = contents[i];\n File file = new File( dir, name );\n if ( file .isDirectory() ) {\n addDirContents( output, file, prefix + name + '/', compress );\n }\n else {\n addFile( output, file, prefix, compress );\n }\n }\n }", "public boolean ZipFile(String sSourceFilePath, String sDestinationZipFilePath, boolean bReplaceExisting) {\n byte[] buffer = new byte[30720];\n FileInputStream fin = null;\n FileOutputStream fout = null;\n ZipOutputStream zout = null;\n int length;\n String sZipEntryFileName = \"\";\n File objFile = null;\n try {\n //check for source file\n if (sSourceFilePath.trim().equalsIgnoreCase(\"\")) {\n throw new Exception(\"Invalid Source File : \" + sSourceFilePath);\n }\n objFile = new File(sSourceFilePath);\n if (!objFile.exists()) {\n throw new Exception(\"Source file not found : \" + sSourceFilePath);\n }\n\n //check for destination Zip file\n if (sDestinationZipFilePath.trim().equalsIgnoreCase(\"\") || sDestinationZipFilePath == null) {\n String stmp_Path = objFile.getAbsolutePath();\n String stmp_Name = objFile.getName();\n if (stmp_Name.contains(\".\")) { //check for removing extension\n int indx = 0;\n try {\n indx = stmp_Name.indexOf(\".\", stmp_Name.length() - 5);\n } catch (Exception e) {\n indx = 0;\n }\n if (indx <= 0) {\n indx = stmp_Name.length();\n }\n\n stmp_Name = stmp_Name.substring(0, indx);\n stmp_Name = stmp_Name + \".zip\";\n }\n sDestinationZipFilePath = stmp_Path + File.separator + stmp_Name;\n }\n\n objFile = new File(sDestinationZipFilePath);\n if (objFile.exists()) {\n if (bReplaceExisting) {\n objFile.delete();\n } else {\n throw new Exception(\"Destination ZipFile Already exists : \" + sDestinationZipFilePath);\n }\n }\n\n //Zipping File\n sZipEntryFileName = sSourceFilePath.substring(sSourceFilePath.lastIndexOf(\"\\\\\") + 1);\n fout = new FileOutputStream(sDestinationZipFilePath);\n zout = new ZipOutputStream(fout);\n fin = new FileInputStream(sSourceFilePath);\n zout.putNextEntry(new ZipEntry(sZipEntryFileName));\n while ((length = fin.read(buffer)) > 0) {\n zout.write(buffer, 0, length);\n }\n\n return true;\n\n } catch (Exception exp) {\n println(\"Src = \" + sSourceFilePath + \" : Dest = \" + sDestinationZipFilePath + \" : \" + exp.toString());\n return false;\n } finally {\n try {\n fin.close();\n } catch (Exception exp) {\n }\n try {\n zout.closeEntry();\n } catch (Exception exp) {\n }\n try {\n zout.close();\n } catch (Exception exp) {\n }\n }\n }", "@Override\n public void run() {\n txt_Nombre.setVisible(false);\n //ocultamos el boton Enviar\n btnaceptar.setVisible(false);\n //ocultamos boton Eliminar archivo\n btnEliminarArchivo.setVisible(false);\n //Ocultamos boton Seleccionar archivo\n btnselecionar.setVisible(false);\n //preparamos la salida de datos del Zip\n ZipOutputStream zout;\n //preparamos la salida de datos para el archivo\n BufferedOutputStream bos;\n try {\n //creamos el archivo y lo guardamos \n ruta=nombreZip+\".zip\";\n //creamos el flujo de salida hacia el archivo Zip\n bos = new BufferedOutputStream(new FileOutputStream(ruta));\n zout = new ZipOutputStream(bos);\n int i=0;\n //Hacemos visibles todos los componentes de las barras de progreso\n lblGeneral.setVisible(true);\n barraGeneral.setVisible(true);\n barra.setVisible(true);\n barra.setStringPainted(true);\n //ponemosd de color verde la barra\n barraGeneral.setForeground(Color.GREEN);\n //habilitamos el String del porcentaje\n barraGeneral.setStringPainted(true);\n //ponemos el valor Maximo de la barra\n barraGeneral.setMaximum((int)(pesoTotal/100));\n //ponemos el valor Minimo\n barraGeneral.setMinimum(0);\n //variable para el progreso de la barra General\n long leidoTotal=0;\n lbInfo.setHorizontalAlignment(JLabel.LEFT);\n for (String documento : documentos) {\n //creamos una nueva entrada/ducumento para el Zip\n ZipEntry ze = new ZipEntry(nombres.get(i));\n //agregamos la entrada al Zip\n zout.putNextEntry(ze);\n //obtenemos el archivo \n File arch=new File(documentos.get(i));\n //Indicamos cual archivo se esta comprimiendo\n lbInfo.setText(\"comprimiendo: \"+arch.getName());\n //obtenemos el tamaño del archivo\n long tamañoArch=arch.length();\n //ponemos el valor maximo de a la barra individual\n barra.setMaximum((int)(tamañoArch/100));\n //ponemos el valor minimo\n barra.setMinimum(0);\n //cambiamos el color de la barra\n barra.setForeground(Color.GREEN);\n barra.setValue(0);\n //creamos el Stream de entrada del archivo\n BufferedInputStream bis=new BufferedInputStream(new FileInputStream(documentos.get(i)));\n //tamaño de buffer para lectura del archivo\n byte[] info=new byte[4096];\n //variable para el progreso de la barra individual\n long leido=0;\n //Ciclo para lectura del archivo\n while(leido<tamañoArch)\n {\n //Verifica que se puedan leer otros 4KB \n if((leido+4096)<tamañoArch)\n {\n //leemos 4KB del Archivo\n bis.read(info);\n //agregamos los 4KB a las variables de progreso\n leido+=4096;\n leidoTotal+=4096;\n }\n else\n {\n //si no se puede leer 4KB lee el resto del archivo\n int resto=(int)(tamañoArch-leido);\n //damos el tamaño al arreglo\n info=new byte[resto];\n //leemos el resto del archivo\n bis.read(info);\n //agregamos el resto del a las variables de progreso\n leido+=resto;\n leidoTotal+=resto;\n }\n //escribimos en el archivo Zip\n zout.write(info);\n //ponemos el valor en la barra individual\n barra.setValue((int)(leido/100));\n //ponemos el valor en la barra general\n barraGeneral.setValue((int)(leidoTotal/100));\n }\n //cerramos la escritura a la entradadel Zip\n zout.closeEntry();\n //aumentamos el valor del contador\n i++;\n }\n //cerramos la escritura al archivo Zip\n zout.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } \n //verificamos que tipo de envio se selecciono\n if(rbtnSimultaneo.isSelected())\n {\n //orden para archivos simultaneos y envios individuales\n orden.enviarArchivoSimultaneo(ruta,ip);\n }\n else\n {\n //orden para envio Secuencial\n orden.envioArchivoSecuencial(ruta);\n }\n //llamamos el metodo cerrar para cerrar la ventana\n cerrar();\n }", "public void saveData() {\n\t\t//place to save notes e.g to file\n\t}", "public abstract boolean moveToArchive(K id) throws ServiceException;", "void saveFrom(String key, InputStream stream);", "public void setZip(String zip);", "protected void writeData(OutputStream out) throws IOException {\r\n out.write(content);\r\n }", "private void addFilesToZip(List<File> files,String outputPath) throws IOException \r\n\t{\r\n\t\t// create a zip output stream\r\n\t\tString zipFileName = outputPath + File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\tOutputStreamWithLength chunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\t\tdouble totalBytesRead = 0L;\r\n\t\tint count = 10; \r\n\t\tfor(File file:files)\r\n\t\t{\r\n\t\t\t// reset the file index\r\n\t\t\tfileIndex = 0;\r\n\t\t\tString zipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\r\n\t\t\tif(file.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tZipEntry entry =new ZipEntry(zipEntryPath+\"/\");\r\n\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\t// add the current file to the zip\r\n\t\t\tZipEntry entry =new ZipEntry(zipEntryPath);\r\n\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\tbyte[] buffer = new byte[1024]; \t \r\n\r\n\t\t\tFileInputStream inputFileStream = new FileInputStream(file);\r\n\t\t\tint len; \r\n\t\t\twhile ((len = inputFileStream.read(buffer)) > 0) \r\n\t\t\t{ \r\n\t\t\t\tif((chunkedFile.getCurrentWriteLength() + len ) > maxSplitSize){\r\n\t\t\t\t\t// close current zip output stream\r\n\t\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\t\tzipOutputStream.finish();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset the write length\r\n\t\t\t\t\tchunkedFile.setCurrentWriteLength(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// create new zip output stream\r\n\t\t\t\t\tzipIndex += 1;\r\n\t\t\t\t\tzipFileName = outputPath+ File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\t\t\t\tchunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\t\t\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\r\n\t\t\t\t\t// add the current file to write remaining bytes\r\n\t\t\t\t\tzipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t\t\tentry = new ZipEntry(zipEntryPath);\r\n\t\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Show progress\r\n\t\t\t\ttotalBytesRead += len;\r\n\t\t\t\tdouble progress = totalBytesRead / totalBytes;\r\n\t\t\t\tif (progress*100 > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\ttotalBytesRead = 0L;\r\n\t\t\t\t\tcount += 10;\r\n\t\t\t\t\tSystem.out.println(\"Finished \" + count +\"%\");\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\tinputFileStream.close();\r\n\t\t}\r\n\r\n\t\tzipOutputStream.closeEntry();\r\n\t\tzipOutputStream.finish();\r\n\t}", "private static File createTempFile(final byte[] data) throws IOException {\r\n \t// Genera el archivo zip temporal a partir del InputStream de entrada\r\n final File zipFile = File.createTempFile(\"sign\", \".zip\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n final FileOutputStream fos = new FileOutputStream(zipFile);\r\n\r\n fos.write(data);\r\n fos.flush();\r\n fos.close();\r\n\r\n return zipFile;\r\n }", "public void saveArchive() throws FileNotFoundException {\n jsonWriter.open();\n Archive archive = new Archive(cameraCollection, filmCollection);\n jsonWriter.write(archive);\n jsonWriter.close();\n }", "void onUnzipCompleted(String output);", "public void setZip(String s) {\r\n\t\tzip = s;\t\r\n\t}", "void generateContent(OutputStream output) throws Exception;", "public void save() \n throws IOException \n {\n File tickDir = new File(TextUtil.expand(TICKS_DIR));\n\n File tickFile = getTickFile(mExport);\n if (!mTicks.isEmpty() \n || (tickFile.exists() && !tickFile.getParentFile().equals(tickDir))) \n {\n tickFile.getParentFile().mkdirs();\n \n ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(tickFile));\n try {\n String basename = mFile.getName();\n // file\n {\n ZipEntry fileEntry = new ZipEntry(basename);\n zip.putNextEntry(fileEntry);\n zip.write(mText.getBytes());\n zip.closeEntry();\n } \n // ticks\n {\n ZipEntry tickEntry = new ZipEntry(basename + TickConstants.TICK_ENTRY_EXT);\n zip.putNextEntry(tickEntry);\n zip.write(saveTicks());\n zip.closeEntry();\n }\n } finally {\n FileUtil.close(zip);\n }\n } else {\n tickFile.delete();\n }\n }", "protected void attachFile(final File source, final String name) {\n try {\n final ZipEntry ze = new ZipEntry(name);\n _zip.putNextEntry(ze);\n final byte[] buffer = new byte[4096];\n try (FileInputStream in = new FileInputStream(source)) {\n int bytes;\n while ((bytes = in.read(buffer)) > 0) {\n _zip.write(buffer, 0, bytes);\n }\n }\n _zip.closeEntry();\n } catch (final IOException e) {\n throw new OpenGammaRuntimeException(\"Couldn't write \" + name + \" to ZIP file\", e);\n }\n }", "private void zipActionListener( View v ) {\n SharedPreferences sp = Objects.requireNonNull( this.getContext() ).getSharedPreferences( Weather_Preference, 0 );\n SharedPreferences.Editor e = sp.edit();\n home.stopGPS();\n String inputZip = mZipView.getText().toString();\n if ( !inputZip.isEmpty() ) {\n if ( inputZip.length() > 4 ) {\n try {\n Integer.parseInt( inputZip );\n e.putString( ZIP_KEY, mZipView.getText().toString() );\n Toast.makeText( home, \"Zip Code Applied\\n\" + inputZip, Toast.LENGTH_SHORT ).show();\n\n } catch ( Exception except ) {\n Log.e( \"LOCATION INPUT INVALID\", \"[Settings Fragment]\" + String.valueOf( except ) );\n mZipView.setError( \"Invalid Postal Code!\" );\n }\n } else {\n mZipView.setError( \"Zip code must be 5 or more digits\" );\n }\n } else {\n mZipView.setError( \"Enter a Zip Code\" );\n }\n e.apply();\n }", "public void save(Cacheable[] data) throws IOException, NullPointerException {\n validate(data);\n\n // write the header\n writeHeader(data);\n\n // write the data\n writeData(data);\n\n // close the file\n close();\n }", "public void flush()\r\n {\r\n if ( content != null )\r\n {\r\n content.flush();\r\n }\r\n }", "private static void createZipOrXmlFile(Document createdDocument) {\n if(attachmentList.size() > 0){\n File zipFile = new File(OUTPUT_ZIP_PATH);\n ZipOutputStream zipOutputStream = null;\n String fileName;\n byte[] decoded;\n\n try {\n zipOutputStream = new ZipOutputStream(new FileOutputStream(zipFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n for (Attachment attachment : attachmentList) {\n try {\n //create a new zip entry\n //add the zip entry and write the decoded data\n assert zipOutputStream != null;\n fileName = attachment.filename;\n decoded = attachment.data;\n ZipEntry imageOutputStream = new ZipEntry(ImportUtils.PHOTO_FILE_PATH + fileName);\n zipOutputStream.putNextEntry(imageOutputStream);\n zipOutputStream.write(decoded);\n\n } catch (IllegalArgumentException | IOException e) {\n e.printStackTrace();\n }\n }\n //add the xml after the attachments have been added\n ZipEntry xmlOutputStream = new ZipEntry(ImportUtils.GENERATED_XML_FILENAME);\n try {\n zipOutputStream.putNextEntry(xmlOutputStream);\n zipOutputStream.write(Entry.toBytes(createdDocument));\n //closing the stream\n //! not closing the stream can result in malformed zip files\n zipOutputStream.finish();\n zipOutputStream.flush();\n zipOutputStream.closeEntry();\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }else{\n //if no attachments found\n // add the xml file only\n OutputFormat format = OutputFormat.createPrettyPrint();\n try {\n OutputStream outputStream = new FileOutputStream(OUTPUT_XML_PATH);\n XMLWriter writer = new XMLWriter(outputStream, format);\n writer.write(createdDocument);\n } catch (IOException e ) {\n e.printStackTrace();\n }\n }\n }", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void putEphemeral(String content, String remotePath) throws Exception\r\n {\r\n\r\n if (cf.checkExists().forPath(remotePath) != null)\r\n cf.setData().forPath(remotePath, content.getBytes());\r\n else {\r\n cf.create().creatingParentsIfNeeded().withMode(CreateMode.EPHEMERAL).forPath(remotePath, content.getBytes());\r\n }\r\n }", "String store(InputStream is, String name, Properties meta) throws AlreadyExistentException, IOException;", "void perform(Transaction tx,\n String userPrincipal,\n FedoraId fedoraId,\n String filename,\n String contentType,\n Collection<URI> digests,\n InputStream contentBody,\n long size,\n ExternalContent externalContent);", "protected File createObjectArchive(String format, String jobId, JSONObject jobObject, String database, String collection, String query) throws IOException {\n\t\tFile archive = File.createTempFile(jobId, \".zip.tmp\");\n\t\tFileOutputStream fos = null;\n\t\tZipOutputStream zos = null;\n\n\t\t// try to add to the archive\n\t\ttry {\n\t\t\tfos = new FileOutputStream(archive);\n\t\t\tzos = new ZipOutputStream(fos);\n\t\t\tlogger.debug(String.format(\" [%s] Archive file: %s\", jobId, archive.getAbsolutePath()));\n\n\t\t\tint cursor = 0;\n\t\t\tint archived = 0;\n\n\t\t\tJSONObject initialJson = ObjectHelper.getInstance(authorizationHeader).search(query, database, collection, 0, 1);\n\t\t\tint total = initialJson.getInt(\"total\");\n\t\t\twhile(cursor < total) {\n\t\t\t\tJSONObject json = ObjectHelper.getInstance(authorizationHeader).search(query, database, collection, cursor, objectBatchSize);\n\t\t\t\tJSONArray items = json.getJSONArray(\"items\");\n\n\t\t\t\tfor (int i = 0; i < items.length(); i++) {\n\t\t\t\t\t// Get the item\n\t\t\t\t\tJSONObject item = items.getJSONObject(i);\n\t\t\t\t\t// Get the data to output\n\t\t\t\t\tString output = item.toString();\n\t\t\t\t\tif (\"xml\".equalsIgnoreCase(format))\n\t\t\t\t\toutput = XML.toString(new JSONObject(output.replaceAll(\"\\\\$\", \"\")), \"source\");\n\t\t\t\t\t// Define the filename\n\t\t\t\t\tString filename = item.getJSONObject(\"_id\").getString(\"$oid\") + \".\" + format;\n\t\t\t\t\t// Create a new entry in the zip file\n\t\t\t\t\tZipEntry ze = new ZipEntry(filename);\n\t\t\t\t\tzos.putNextEntry(ze);\n\t\t\t\t\tzos.write(output.getBytes());\n\t\t\t\t\tzos.closeEntry();\n\n\t\t\t\t\tarchived += 1;\n\t\t\t\t}\n\n\t\t\t\tlogger.debug(String.format(\" [%s] Archived items: %5d / %5d\", jobId, archived, total));\n\n\t\t\t\t// update the cursor\n\t\t\t\tcursor += objectBatchSize;\n\n\t\t\t\t// Update progress\n\t\t\t\tjobObject.put(\"progress\", PROGRESS_REQUESTINGDATA * cursor / total);\n\t\t\t\tObjectHelper.getInstance(authorizationHeader).updateObject(jobId, jobObject);\n\t\t\t}\n\n\t\t\tlogger.debug(String.format(\" [%s] ... Archiving completed: %s\", jobId, archive.getAbsolutePath()));\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e);\n\t\t} finally {\n\t\t\tif (zos != null)\n\t\t\t\tzos.close();\n\t\t\tif (fos != null)\n\t\t\t\tfos.close();\n\t\t}\n\n\t\treturn archive;\n\t}", "public void setContent (ByteArray data ,boolean doCompress =true ){\r\n\t\t\tif(data != null && data.length > 0) {\r\n\t\t\t\tdata.position = 0;\r\n\t\t\t\tdata.readBytes(_content, 0, data.length());\r\n\t\t\t\t_crc32 = ChecksumUtil.CRC32(_content);\r\n\t\t\t\t_hasAdler32 = false;\r\n\t\t\t} else {\r\n\t\t\t\t_content.length = 0;\r\n\t\t\t\t_content.position = 0;\r\n\t\t\t\tisCompressed = false;\r\n\t\t\t}\r\n\t\t\tif(doCompress) {\r\n\t\t\t\tcompress();\r\n\t\t\t} else {\r\n\t\t\t\t_sizeUncompressed = _sizeCompressed = _content.length;\r\n\t\t\t}\r\n\t\t}", "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException 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} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void addToJar(String name, InputStream content, IProgressMonitor monitor) throws JarException\n\t{\n\t\tIPath fullPath = new Path(name);\n\t\tif (!ResourceUtils.isValidPath(fullPath.makeAbsolute().toString(), IResource.FILE))\n\t\t{\n\t\t\tthrow new JarException(\"The name of the file to add is not a valid path\"); //$NON-NLS-1$\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tJarEntry entry;\n\t\t\tString[] seg = fullPath.segments();\n\t\t\tString destPath = \"\"; //$NON-NLS-1$\n\n\t\t\tfor (int i = 0; i < seg.length - 1; i++)\n\t\t\t{\n\t\t\t\tdestPath += seg[i] + \"/\"; //$NON-NLS-1$\n\t\t\t\tentry = new JarEntry(destPath);\n\t\t\t\tif (!entryList.contains(entry.getName()))\n\t\t\t\t{\n\t\t\t\t\tjarStream.putNextEntry(entry);\n\t\t\t\t\tjarStream.flush();\n\t\t\t\t\tjarStream.closeEntry();\n\t\t\t\t\tentryList.add(entry.getName());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// read the content input stream\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\tint byteNr;\n\t\t\t// last segment,the file\n\t\t\tdestPath += fullPath.lastSegment();\n\t\t\tentry = new JarEntry(destPath);\n\t\t\tjarStream.putNextEntry(entry);\n\t\t\tString fileName = fullPath.lastSegment().toString();\n\t\t\tif (monitor != null)\n\t\t\t{\n\t\t\t\tmonitor.beginTask(\"Adding file \" + fileName, content.available()); //$NON-NLS-1$\n\t\t\t}\n\t\t\twhile ((byteNr = content.read(buffer, 0, BUFFER_SIZE)) != -1)\n\t\t\t{\n\t\t\t\tif (monitor != null && monitor.isCanceled())\n\t\t\t\t{\n\t\t\t\t\tthrow (JarException) new JarException().initCause(new OperationCanceledException());\n\t\t\t\t}\n\t\t\t\tjarStream.write(buffer, 0, byteNr);\n\t\t\t\tif (monitor != null)\n\t\t\t\t{\n\t\t\t\t\tmonitor.worked(byteNr);\n\t\t\t\t}\n\t\t\t}\n\t\t\tjarStream.flush();\n\t\t\tjarStream.closeEntry();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tthrow (JarException) new JarException().initCause(e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif (monitor != null)\n\t\t\t{\n\t\t\t\tmonitor.done();\n\t\t\t}\n\t\t}\n\t}", "public void save() {\r\n File distDataFile = new File(path);\r\n\r\n //String basePath = path;\r\n String endOfPath = path.substring(path.lastIndexOf(\"/\"));\r\n\r\n File rootDataFile;\r\n if (!path.contains(\"artists\")) {\r\n rootDataFile = new File(BASEDIR + \"/resources/data\" + endOfPath);\r\n } else {\r\n rootDataFile = new File(BASEDIR + \"/resources/data/artists\" + endOfPath);\r\n }\r\n\r\n File distTempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n File rootTempFile;\r\n if (!path.contains(\"artists\")) {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/myTempFile.txt\");\r\n } else {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/artists/myTempFile.txt\");\r\n }\r\n \r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(distTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n distDataFile.delete();\r\n distTempFile.renameTo(distDataFile);\r\n\r\n BufferedWriter bw2 = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(rootTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw2.write(line);\r\n bw2.newLine();\r\n }\r\n\r\n bw2.close();\r\n rootDataFile.delete();\r\n rootTempFile.renameTo(rootDataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOExceptoin in save1 : FileData\");\r\n }\r\n }", "public void respaldo() {\n if (seleccionados != null && seleccionados.length > 0) {\n ZipOutputStream salidaZip; //Donde va a quedar el archivo zip\n\n File file = new File(FacesContext.getCurrentInstance()\n .getExternalContext()\n .getRealPath(\"/temporales/\") + archivoRespaldo + \".zip\");\n\n try {\n salidaZip\n = new ZipOutputStream(new FileOutputStream(file));\n ZipEntry entradaZip;\n\n for (String s : seleccionados) {\n if (s.contains(\"Paises\")) {\n\n entradaZip = new ZipEntry(\"paises.json\");\n salidaZip.putNextEntry(entradaZip);\n byte data[]\n = PaisGestion.generaJson().getBytes();\n salidaZip.write(data, 0, data.length);\n salidaZip.closeEntry();\n }\n }\n salidaZip.close();\n\n // Descargar el archivo zip\n //Se carga el zip en un arreglo de bytes...\n byte[] zip = Files.readAllBytes(file.toPath());\n\n //Generar la página de respuesta...\n HttpServletResponse respuesta\n = (HttpServletResponse) FacesContext\n .getCurrentInstance()\n .getExternalContext()\n .getResponse();\n\n ServletOutputStream salida\n = respuesta.getOutputStream();\n\n //Defino los encabezados de la página de respuesta\n respuesta.setContentType(\"application/zip\");\n respuesta.setHeader(\"Content-Disposition\",\n \"attachement; filename=\" + archivoRespaldo + \".zip\");\n\n salida.write(zip);\n salida.flush();\n\n //Todo listo\n FacesContext.getCurrentInstance().responseComplete();\n file.delete();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }", "@Override\n\tpublic String store(InputStream inputStream, String fileName) {\n\t\treturn null;\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tFile LogFolder=new File(\"/sdcard/network_log\");\r\n\t\t\t\tif(!LogFolder.exists())\r\n\t\t\t\t{\r\n\t\t\t\t\t//not exist\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tFile[] LogList=LogFolder.listFiles();\r\n\t\t\t\t\tFile tempFolder=new File(\"/sdcard/.network_log_temp\");\r\n\t\t\t\t\tif(tempFolder.exists())\r\n\t\t\t\t\t\ttempFolder.delete();\r\n\t\t\t\t\ttempFolder.mkdir();\r\n\t\t\t\t\tFile tempZip=new File(\"/sdcard/.network_log_temp/temp.zip\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\ttempZip.createNewFile();\r\n\t\t\t\t\t} catch (IOException 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\tString[] srcFilePath=new String[LogList.length];\r\n\t\t\t\t\tfor(int i=0;i<LogList.length;i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsrcFilePath[i]=LogList[i].getAbsolutePath();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString desFilePath=tempZip.getAbsolutePath();\r\n\t\t\t\t\t\r\n\t\t\t\t\tZipCompressor zc=new ZipCompressor();\r\n\t\t\t\t\tzc.zipCompress(srcFilePath, desFilePath);\r\n\t\t\t\t\t\r\n\t\t\t\t\tUploader ul=new Uploader(tempZip);\r\n\t\t\t\t\tul.start();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}", "public static void store() {\r\n//\t\tSystem.out.println(\"mar\"+readMAR().getStr());\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Write memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n\t\t\r\n\t\tcontent = readMBR();\r\n\t\tgetBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)] = content.getStr();\r\n\t\tTraceINF.write(\"Write finished.\");\r\n\t}", "public void setArchiver(String sArchiver);", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }", "private static void zipFolder(ZipOutputStream out, File folder) throws IOException {\n\n final int BUFFER = 2048;\n\n File[] fileList = folder.listFiles();\n BufferedInputStream origin;\n\n for (File file : fileList) {\n if (file.isDirectory()) {\n zipFolder(out, file);\n } else {\n byte data[] = new byte[BUFFER];\n\n String unmodifiedFilePath = file.getPath();\n FileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\n origin = new BufferedInputStream(fi, BUFFER);\n ZipEntry entry = new ZipEntry(file.getName());\n\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n\n out.closeEntry();\n origin.close();\n }\n }\n\n // Finish the zip stream and close it\n out.finish();\n out.close();\n }" ]
[ "0.6361827", "0.6061013", "0.5738215", "0.5727646", "0.55008113", "0.5378546", "0.5373098", "0.52861434", "0.5238124", "0.5182399", "0.5056666", "0.5032724", "0.49996433", "0.499212", "0.49816284", "0.49781796", "0.49723515", "0.4971199", "0.49403712", "0.4928753", "0.48988727", "0.48700577", "0.4862425", "0.48603052", "0.4851068", "0.48487622", "0.4846922", "0.48426104", "0.483462", "0.480644", "0.47709242", "0.47608775", "0.47583959", "0.47462404", "0.4740354", "0.4735629", "0.4730718", "0.472884", "0.47279748", "0.47064966", "0.4692986", "0.46816096", "0.46799862", "0.46722552", "0.4668856", "0.46624017", "0.46539262", "0.46468207", "0.4640249", "0.46292403", "0.4628069", "0.4627389", "0.46180755", "0.46158233", "0.45868835", "0.45762214", "0.45613346", "0.45560285", "0.45444992", "0.45440307", "0.45426187", "0.4540169", "0.44963822", "0.44959417", "0.44799647", "0.44744307", "0.44728395", "0.44714043", "0.44705856", "0.44702742", "0.44700074", "0.44640082", "0.44559708", "0.4451982", "0.44517297", "0.4447164", "0.44454968", "0.44451088", "0.4419058", "0.4416729", "0.44061607", "0.44014755", "0.43992573", "0.43894428", "0.4383871", "0.4380401", "0.43788865", "0.43706864", "0.43693045", "0.43661708", "0.4357686", "0.43576726", "0.43523636", "0.43461972", "0.43435776", "0.4343103", "0.43409535", "0.4340085", "0.43342608", "0.4332998" ]
0.54476136
5